r1113 - xwiki/trunk/src/main/java/com/xpn/xwiki/store

Ludovic Dubost ludovic at users.forge.objectweb.org
Wed Aug 2 09:53:53 CEST 2006


Author: ludovic
Date: 2006-08-02 09:53:52 +0200 (Wed, 02 Aug 2006)
New Revision: 1113

Modified:
   xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcher.java
   xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcherFactory.java
Log:
Fix batcher (for tests) for hibernate 3.1

Modified: xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcher.java
===================================================================
--- xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcher.java	2006-08-02 07:02:55 UTC (rev 1112)
+++ xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcher.java	2006-08-02 07:53:52 UTC (rev 1113)
@@ -1,30 +1,32 @@
-/*
- * Copyright 2006, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * @author ludovic
- */
+/*
+ * Copyright 2006, XpertNet SARL, and individual contributors as indicated
+ * by the contributors.txt.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+ * @author ludovic
+ */
 package com.xpn.xwiki.store;
 
 import org.hibernate.jdbc.BatchingBatcher;
 import org.hibernate.jdbc.JDBCContext;
+import org.hibernate.jdbc.ConnectionManager;
 import org.hibernate.HibernateException;
 import org.hibernate.ScrollMode;
+import org.hibernate.Interceptor;
 import org.hibernate.dialect.Dialect;
 
 import java.sql.SQLException;
@@ -56,8 +58,8 @@
         super.addToBatch(expectedRowCount);
     }
 
-    public XWikiBatcher(JDBCContext jdbcContext) {
-        super(jdbcContext);
+    public XWikiBatcher(ConnectionManager cmgr, Interceptor interceptor) {
+        super(cmgr, interceptor);
     }
 
     public void abortBatch(SQLException sqle) {
@@ -75,9 +77,9 @@
         getSQLStats().incrementPreparedSQLCounter();
     }
 
-    public PreparedStatement prepareStatement(String sql, boolean getGeneratedKeys) throws SQLException, HibernateException {
+    public PreparedStatement prepareStatement(String sql, boolean getGeneratedKeys, String[] param) throws SQLException, HibernateException {
         addToPreparedSql(sql);
-        return super.prepareStatement(sql, getGeneratedKeys);
+        return super.prepareStatement(sql, getGeneratedKeys, param);
     }
 
     public PreparedStatement prepareSelectStatement(String sql) throws SQLException, HibernateException {

Modified: xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcherFactory.java
===================================================================
--- xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcherFactory.java	2006-08-02 07:02:55 UTC (rev 1112)
+++ xwiki/trunk/src/main/java/com/xpn/xwiki/store/XWikiBatcherFactory.java	2006-08-02 07:53:52 UTC (rev 1113)
@@ -1,30 +1,28 @@
-/*
- * Copyright 2006, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * @author ludovic
- */
+/*
+ * Copyright 2006, XpertNet SARL, and individual contributors as indicated
+ * by the contributors.txt.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+ * @author ludovic
+ */
 package com.xpn.xwiki.store;
 
-import org.hibernate.jdbc.BatchingBatcherFactory;
-import org.hibernate.jdbc.Batcher;
-import org.hibernate.jdbc.JDBCContext;
-import org.hibernate.jdbc.BatchingBatcher;
+import org.hibernate.jdbc.*;
+import org.hibernate.Interceptor;
 
 /**
  * Created by IntelliJ IDEA.
@@ -34,7 +32,8 @@
  * To change this template use File | Settings | File Templates.
  */
 public class XWikiBatcherFactory extends BatchingBatcherFactory {
-    public Batcher createBatcher(JDBCContext jdbcContext) {
-        return new XWikiBatcher( jdbcContext );
+
+    public Batcher createBatcher(ConnectionManager cmgr, Interceptor interceptor) {
+        return new XWikiBatcher( cmgr, interceptor );
     }
 }





More information about the Xwiki-notifications mailing list