cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1577838 - in /cayenne/main/trunk: cayenne-server/src/main/java/org/apache/cayenne/access/ cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/ cayenne-server/src/main/java/org/apache/cayenne/access/trans/ cayenne-server/src/main/ja...
Date Sat, 15 Mar 2014 12:18:23 GMT
Author: aadamchik
Date: Sat Mar 15 12:18:22 2014
New Revision: 1577838

URL: http://svn.apache.org/r1577838
Log:
CAY-1912 BatchQueryBuilder refactoring

Added:
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslator.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslatorFactory.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorFactory.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultBatchQueryBuilderFactory.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslator.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslator.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslator.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteTranslatorFactory.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteQueryBuilderFactory.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslator.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/BatchTranslatorTest.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/BatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorTest.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorTest.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorTest.java
      - copied, changed from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilderTest.java
Removed:
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultBatchQueryBuilderFactory.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteQueryBuilderFactory.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/BatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilderTest.java
Modified:
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/DataNode.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DataDomainProvider.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java
    cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleLOBBatchQueryBuilder.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseBatchQueryBuilderFactoryProvider.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
    cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/DataNode.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/DataNode.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/DataNode.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/DataNode.java Sat Mar 15 12:18:22 2014
@@ -34,11 +34,11 @@ import javax.sql.DataSource;
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.dbsync.SchemaUpdateStrategy;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.ColumnDescriptor;
 import org.apache.cayenne.access.jdbc.RowDescriptor;
 import org.apache.cayenne.access.jdbc.reader.RowReader;
 import org.apache.cayenne.access.jdbc.reader.RowReaderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.log.NoopJdbcEventLogger;
@@ -68,7 +68,7 @@ public class DataNode implements QueryEn
 
     private JdbcEventLogger jdbcEventLogger;
     private RowReaderFactory rowReaderFactory;
-    private BatchQueryBuilderFactory batchQueryBuilderFactory;
+    private BatchTranslatorFactory batchQueryBuilderFactory;
 
     TransactionDataSource readThroughDataSource;
 
@@ -476,14 +476,14 @@ public class DataNode implements QueryEn
     /**
      * @since 3.2
      */
-    public BatchQueryBuilderFactory getBatchQueryBuilderFactory() {
+    public BatchTranslatorFactory getBatchQueryBuilderFactory() {
         return batchQueryBuilderFactory;
     }
 
     /**
      * @since 3.2
      */
-    public void setBatchQueryBuilderFactory(BatchQueryBuilderFactory batchQueryBuilderFactory) {
+    public void setBatchQueryBuilderFactory(BatchTranslatorFactory batchQueryBuilderFactory) {
         this.batchQueryBuilderFactory = batchQueryBuilderFactory;
     }
 }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java Sat Mar 15 12:18:22 2014
@@ -33,7 +33,8 @@ import org.apache.cayenne.access.DataNod
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.access.OptimisticLockException;
 import org.apache.cayenne.access.jdbc.reader.RowReader;
-import org.apache.cayenne.access.trans.BatchQueryBuilder;
+import org.apache.cayenne.access.translator.batch.BatchTranslator;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
 import org.apache.cayenne.dba.TypesMapping;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.map.DbAttribute;
@@ -72,7 +73,7 @@ public class BatchAction extends BaseSQL
     @Override
     public void performAction(Connection connection, OperationObserver observer) throws SQLException, Exception {
 
-        BatchQueryBuilder queryBuilder = createBuilder();
+        BatchTranslator queryBuilder = createBuilder();
         boolean generatesKeys = hasGeneratedKeys();
 
         if (runningAsBatch && !generatesKeys) {
@@ -82,25 +83,25 @@ public class BatchAction extends BaseSQL
         }
     }
 
-    protected BatchQueryBuilder createBuilder() throws CayenneException {
-        BatchQueryBuilderFactory factory = dataNode.getBatchQueryBuilderFactory();
+    protected BatchTranslator createBuilder() throws CayenneException {
+        BatchTranslatorFactory factory = dataNode.getBatchQueryBuilderFactory();
 
         if (factory == null) {
             throw new IllegalStateException("Adapter BatchQueryBuilderFactory is null");
         }
 
         if (query instanceof InsertBatchQuery) {
-            return factory.createInsertQueryBuilder((InsertBatchQuery) query, dataNode.getAdapter());
+            return factory.insertTranslator((InsertBatchQuery) query, dataNode.getAdapter());
         } else if (query instanceof UpdateBatchQuery) {
-            return factory.createUpdateQueryBuilder((UpdateBatchQuery) query, dataNode.getAdapter());
+            return factory.updateTranslator((UpdateBatchQuery) query, dataNode.getAdapter());
         } else if (query instanceof DeleteBatchQuery) {
-            return factory.createDeleteQueryBuilder((DeleteBatchQuery) query, dataNode.getAdapter());
+            return factory.deleteTranslator((DeleteBatchQuery) query, dataNode.getAdapter());
         } else {
             throw new CayenneException("Unsupported batch query: " + query);
         }
     }
 
-    protected void runAsBatch(Connection con, BatchQueryBuilder queryBuilder, OperationObserver delegate)
+    protected void runAsBatch(Connection con, BatchTranslator queryBuilder, OperationObserver delegate)
             throws SQLException, Exception {
 
         String queryStr = queryBuilder.createSqlString();
@@ -156,7 +157,7 @@ public class BatchAction extends BaseSQL
     /**
      * Executes batch as individual queries over the same prepared statement.
      */
-    protected void runAsIndividualQueries(Connection connection, BatchQueryBuilder queryBuilder,
+    protected void runAsIndividualQueries(Connection connection, BatchTranslator queryBuilder,
             OperationObserver delegate, boolean generatesKeys) throws SQLException, Exception {
 
         JdbcEventLogger logger = dataNode.getJdbcEventLogger();

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslator.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslator.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslator.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslator.java Sat Mar 15 12:18:22 2014
@@ -17,7 +17,7 @@
  *  under the License.
  ****************************************************************/
 
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import java.io.IOException;
 import java.sql.PreparedStatement;
@@ -35,13 +35,13 @@ import org.apache.cayenne.query.BatchQue
 /**
  * Superclass of batch query translators.
  */
-public abstract class BatchQueryBuilder {
+public abstract class BatchTranslator {
 
     protected BatchQuery query;
     protected DbAdapter adapter;
     protected String trimFunction;
 
-    public BatchQueryBuilder(BatchQuery query, DbAdapter adapter) {
+    public BatchTranslator(BatchQuery query, DbAdapter adapter) {
         this.query = query;
         this.adapter = adapter;
     }

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslatorFactory.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslatorFactory.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslatorFactory.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/BatchTranslatorFactory.java Sat Mar 15 12:18:22 2014
@@ -16,9 +16,8 @@
  *  specific language governing permissions and limitations
  *  under the License.
  ****************************************************************/
-package org.apache.cayenne.access.jdbc;
+package org.apache.cayenne.access.translator.batch;
 
-import org.apache.cayenne.access.trans.BatchQueryBuilder;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.query.DeleteBatchQuery;
 import org.apache.cayenne.query.InsertBatchQuery;
@@ -28,28 +27,22 @@ import org.apache.cayenne.query.UpdateBa
  * Factory which creates BatchQueryBuilders for different types of queries,
  * which, in their turn, create SQL strings for batch queries.
  * 
- * @since 3.0
+ * @since 3.2
  */
-public interface BatchQueryBuilderFactory {
+public interface BatchTranslatorFactory {
 
     /**
      * Creates query builder for INSERT queries
-     * 
-     * @since 3.2
      */
-    BatchQueryBuilder createInsertQueryBuilder(InsertBatchQuery query, DbAdapter adapter);
+    BatchTranslator insertTranslator(InsertBatchQuery query, DbAdapter adapter);
 
     /**
      * Creates query builder for UPDATE queries
-     * 
-     * @since 3.2
      */
-    BatchQueryBuilder createUpdateQueryBuilder(UpdateBatchQuery query, DbAdapter adapter);
+    BatchTranslator updateTranslator(UpdateBatchQuery query, DbAdapter adapter);
 
     /**
      * Creates query builder for DELETE queries
-     * 
-     * @since 3.2
      */
-    BatchQueryBuilder createDeleteQueryBuilder(DeleteBatchQuery query, DbAdapter adapter);
+    BatchTranslator deleteTranslator(DeleteBatchQuery query, DbAdapter adapter);
 }

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorFactory.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultBatchQueryBuilderFactory.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorFactory.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorFactory.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultBatchQueryBuilderFactory.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/DefaultBatchQueryBuilderFactory.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorFactory.java Sat Mar 15 12:18:22 2014
@@ -16,35 +16,33 @@
  *  specific language governing permissions and limitations
  *  under the License.
  ****************************************************************/
-package org.apache.cayenne.access.jdbc;
+package org.apache.cayenne.access.translator.batch;
 
-import org.apache.cayenne.access.trans.BatchQueryBuilder;
-import org.apache.cayenne.access.trans.DeleteBatchQueryBuilder;
-import org.apache.cayenne.access.trans.InsertBatchQueryBuilder;
-import org.apache.cayenne.access.trans.UpdateBatchQueryBuilder;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.query.DeleteBatchQuery;
 import org.apache.cayenne.query.InsertBatchQuery;
 import org.apache.cayenne.query.UpdateBatchQuery;
 
 /**
- * Default implementation of {@link BatchQueryBuilderFactory}.
+ * Default implementation of {@link BatchTranslatorFactory}.
+ * 
+ * @since 3.2
  */
-public class DefaultBatchQueryBuilderFactory implements BatchQueryBuilderFactory {
+public class DefaultBatchTranslatorFactory implements BatchTranslatorFactory {
 
     @Override
-    public BatchQueryBuilder createDeleteQueryBuilder(DeleteBatchQuery query, DbAdapter adapter) {
-        return new DeleteBatchQueryBuilder(query, adapter);
+    public BatchTranslator deleteTranslator(DeleteBatchQuery query, DbAdapter adapter) {
+        return new DeleteBatchTranslator(query, adapter);
     }
 
     @Override
-    public BatchQueryBuilder createInsertQueryBuilder(InsertBatchQuery query, DbAdapter adapter) {
-        return new InsertBatchQueryBuilder(query, adapter);
+    public BatchTranslator insertTranslator(InsertBatchQuery query, DbAdapter adapter) {
+        return new InsertBatchTranslator(query, adapter);
     }
 
     @Override
-    public BatchQueryBuilder createUpdateQueryBuilder(UpdateBatchQuery query, DbAdapter adapter) {
-        return new UpdateBatchQueryBuilder(query, adapter);
+    public BatchTranslator updateTranslator(UpdateBatchQuery query, DbAdapter adapter) {
+        return new UpdateBatchTranslator(query, adapter);
     }
 
 }

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslator.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslator.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslator.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslator.java Sat Mar 15 12:18:22 2014
@@ -17,7 +17,7 @@
  *  under the License.
  ****************************************************************/
 
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import java.io.IOException;
 import java.sql.PreparedStatement;
@@ -34,9 +34,9 @@ import org.apache.cayenne.query.DeleteBa
  * Translator for delete BatchQueries. Creates parameterized DELETE SQL
  * statements.
  */
-public class DeleteBatchQueryBuilder extends BatchQueryBuilder {
+public class DeleteBatchTranslator extends BatchTranslator {
 
-    public DeleteBatchQueryBuilder(DeleteBatchQuery query, DbAdapter adapter) {
+    public DeleteBatchTranslator(DeleteBatchQuery query, DbAdapter adapter) {
         super(query, adapter);
     }
 

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslator.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslator.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslator.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslator.java Sat Mar 15 12:18:22 2014
@@ -17,7 +17,7 @@
  *  under the License.
  ****************************************************************/
 
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import java.io.IOException;
 import java.sql.PreparedStatement;
@@ -34,9 +34,9 @@ import org.apache.cayenne.query.InsertBa
 /**
  * Translator of InsertBatchQueries.
  */
-public class InsertBatchQueryBuilder extends BatchQueryBuilder {
+public class InsertBatchTranslator extends BatchTranslator {
 
-    public InsertBatchQueryBuilder(InsertBatchQuery query, DbAdapter adapter) {
+    public InsertBatchTranslator(InsertBatchQuery query, DbAdapter adapter) {
         super(query, adapter);
     }
 

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslator.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilder.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslator.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslator.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilder.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslator.java Sat Mar 15 12:18:22 2014
@@ -16,14 +16,13 @@
  *  specific language governing permissions and limitations
  *  under the License.
  ****************************************************************/
-package org.apache.cayenne.access.jdbc;
+package org.apache.cayenne.access.translator.batch;
 
 import java.io.IOException;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Types;
 
-import org.apache.cayenne.access.trans.DeleteBatchQueryBuilder;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.map.DbAttribute;
@@ -31,14 +30,14 @@ import org.apache.cayenne.query.BatchQue
 import org.apache.cayenne.query.DeleteBatchQuery;
 
 /**
- * Implementation of {@link DeleteBatchQueryBuilder}, which uses 'soft' delete
+ * Implementation of {@link DeleteBatchTranslator}, which uses 'soft' delete
  * (runs UPDATE and sets 'deleted' field to true instead-of running SQL DELETE)
  */
-public class SoftDeleteBatchQueryBuilder extends DeleteBatchQueryBuilder {
+public class SoftDeleteBatchTranslator extends DeleteBatchTranslator {
 
     private String deletedFieldName;
 
-    public SoftDeleteBatchQueryBuilder(DeleteBatchQuery query, DbAdapter adapter, String deletedFieldName) {
+    public SoftDeleteBatchTranslator(DeleteBatchQuery query, DbAdapter adapter, String deletedFieldName) {
         super(query, adapter);
         this.deletedFieldName = deletedFieldName;
     }

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteTranslatorFactory.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteQueryBuilderFactory.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteTranslatorFactory.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteTranslatorFactory.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteQueryBuilderFactory.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/jdbc/SoftDeleteQueryBuilderFactory.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/SoftDeleteTranslatorFactory.java Sat Mar 15 12:18:22 2014
@@ -16,17 +16,18 @@
  *  specific language governing permissions and limitations
  *  under the License.
  ****************************************************************/
-package org.apache.cayenne.access.jdbc;
+package org.apache.cayenne.access.translator.batch;
 
-import org.apache.cayenne.access.trans.BatchQueryBuilder;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.query.DeleteBatchQuery;
 
 /**
  * Implementation of {@link #BatchQueryBuilderFactory}, which uses 'soft' delete
  * (runs UPDATE and sets 'deleted' field to true instead-of running SQL DELETE)
+ * 
+ * @since 3.2
  */
-public class SoftDeleteQueryBuilderFactory extends DefaultBatchQueryBuilderFactory {
+public class SoftDeleteTranslatorFactory extends DefaultBatchTranslatorFactory {
     /**
      * Default name of 'deleted' field
      */
@@ -37,17 +38,17 @@ public class SoftDeleteQueryBuilderFacto
      */
     private String deletedFieldName;
     
-    public SoftDeleteQueryBuilderFactory() {
+    public SoftDeleteTranslatorFactory() {
         this(DEFAULT_DELETED_FIELD_NAME);
     }
     
-    public SoftDeleteQueryBuilderFactory(String deletedFieldName) {
+    public SoftDeleteTranslatorFactory(String deletedFieldName) {
         this.deletedFieldName = deletedFieldName;
     }
     
     @Override
-    public BatchQueryBuilder createDeleteQueryBuilder(DeleteBatchQuery query, DbAdapter adapter) {
-        return new SoftDeleteBatchQueryBuilder(query, adapter, deletedFieldName);
+    public BatchTranslator deleteTranslator(DeleteBatchQuery query, DbAdapter adapter) {
+        return new SoftDeleteBatchTranslator(query, adapter, deletedFieldName);
     }
     
     /**

Copied: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslator.java (from r1577832, cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilder.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslator.java?p2=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslator.java&p1=cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilder.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslator.java Sat Mar 15 12:18:22 2014
@@ -17,7 +17,7 @@
  *  under the License.
  ****************************************************************/
 
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import java.io.IOException;
 import java.sql.PreparedStatement;
@@ -35,9 +35,9 @@ import org.apache.cayenne.query.UpdateBa
  * A translator for UpdateBatchQueries that produces parameterized SQL.
  */
 
-public class UpdateBatchQueryBuilder extends BatchQueryBuilder {
+public class UpdateBatchTranslator extends BatchTranslator {
 
-    public UpdateBatchQueryBuilder(UpdateBatchQuery query, DbAdapter adapter) {
+    public UpdateBatchTranslator(UpdateBatchQuery query, DbAdapter adapter) {
         super(query, adapter);
     }
 

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DataDomainProvider.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DataDomainProvider.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DataDomainProvider.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/DataDomainProvider.java Sat Mar 15 12:18:22 2014
@@ -29,8 +29,8 @@ import org.apache.cayenne.DataChannelFil
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.dbsync.SchemaUpdateStrategy;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.reader.RowReaderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
 import org.apache.cayenne.cache.NestedQueryCache;
 import org.apache.cayenne.cache.QueryCache;
 import org.apache.cayenne.configuration.ConfigurationTree;
@@ -112,7 +112,7 @@ public class DataDomainProvider implemen
     protected RowReaderFactory rowReaderFactory;
     
     @Inject
-    protected BatchQueryBuilderFactory batchQueryBuilderFactory;
+    protected BatchTranslatorFactory batchQueryBuilderFactory;
 
     @Override
     public DataDomain get() throws ConfigurationException {

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/configuration/server/ServerModule.java Sat Mar 15 12:18:22 2014
@@ -27,10 +27,10 @@ import org.apache.cayenne.access.Default
 import org.apache.cayenne.access.ObjectMapRetainStrategy;
 import org.apache.cayenne.access.dbsync.SchemaUpdateStrategy;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
-import org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.reader.DefaultRowReaderFactory;
 import org.apache.cayenne.access.jdbc.reader.RowReaderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
+import org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory;
 import org.apache.cayenne.access.types.BigDecimalType;
 import org.apache.cayenne.access.types.BigIntegerType;
 import org.apache.cayenne.access.types.BooleanType;
@@ -247,8 +247,8 @@ public class ServerModule implements Mod
         // configured by the owning domain
         binder.bind(EntitySorter.class).to(AshwoodEntitySorter.class).withoutScope();
 
-        binder.bind(BatchQueryBuilderFactory.class).to(
-                DefaultBatchQueryBuilderFactory.class);
+        binder.bind(BatchTranslatorFactory.class).to(
+                DefaultBatchTranslatorFactory.class);
 
         // a default ObjectMapRetainStrategy used to create objects map for ObjectStore
         binder.bind(ObjectMapRetainStrategy.class).to(

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java Sat Mar 15 12:18:22 2014
@@ -30,11 +30,11 @@ import java.util.List;
 
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.EJBQLTranslatorFactory;
 import org.apache.cayenne.access.jdbc.JdbcEJBQLTranslatorFactory;
 import org.apache.cayenne.access.trans.QualifierTranslator;
 import org.apache.cayenne.access.trans.QueryAssembler;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
 import org.apache.cayenne.access.types.ExtendedType;
 import org.apache.cayenne.access.types.ExtendedTypeFactory;
 import org.apache.cayenne.access.types.ExtendedTypeMap;
@@ -77,7 +77,7 @@ public class JdbcAdapter implements DbAd
      * @deprecated since 3.2 BatchQueryBuilderfactory is attached to the DataNode.
      */
     @Inject
-    protected BatchQueryBuilderFactory batchQueryBuilderFactory;
+    protected BatchTranslatorFactory batchQueryBuilderFactory;
 
     @Inject
     protected JdbcEventLogger logger;
@@ -587,7 +587,7 @@ public class JdbcAdapter implements DbAd
      * @deprecated since 3.2 BatchQueryBuilderfactory is attached to the DataNode.
      */
     @Deprecated
-    public BatchQueryBuilderFactory getBatchQueryBuilderFactory() {
+    public BatchTranslatorFactory getBatchQueryBuilderFactory() {
         return batchQueryBuilderFactory;
     }
 
@@ -596,7 +596,7 @@ public class JdbcAdapter implements DbAd
      * @deprecated since 3.2 BatchQueryBuilderfactory is attached to the DataNode.
      */
     @Deprecated
-    public void setBatchQueryBuilderFactory(BatchQueryBuilderFactory batchQueryBuilderFactory) {
+    public void setBatchQueryBuilderFactory(BatchTranslatorFactory batchQueryBuilderFactory) {
         this.batchQueryBuilderFactory = batchQueryBuilderFactory;
     }
     

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java Sat Mar 15 12:18:22 2014
@@ -22,7 +22,7 @@ package org.apache.cayenne.dba.oracle;
 import org.apache.cayenne.CayenneException;
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.jdbc.BatchAction;
-import org.apache.cayenne.access.trans.BatchQueryBuilder;
+import org.apache.cayenne.access.translator.batch.BatchTranslator;
 import org.apache.cayenne.query.BatchQuery;
 
 /**
@@ -38,9 +38,9 @@ class OracleBatchAction extends BatchAct
     }
 
     @Override
-    protected BatchQueryBuilder createBuilder() throws CayenneException {
+    protected BatchTranslator createBuilder() throws CayenneException {
         // intercept super call to configure the builder...
-        BatchQueryBuilder builder = super.createBuilder();
+        BatchTranslator builder = super.createBuilder();
         builder.setTrimFunction(OracleAdapter.TRIM_FUNCTION);
         return builder;
     }

Modified: cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleLOBBatchQueryBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleLOBBatchQueryBuilder.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleLOBBatchQueryBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/main/java/org/apache/cayenne/dba/oracle/OracleLOBBatchQueryBuilder.java Sat Mar 15 12:18:22 2014
@@ -27,7 +27,7 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.cayenne.CayenneRuntimeException;
-import org.apache.cayenne.access.trans.BatchQueryBuilder;
+import org.apache.cayenne.access.translator.batch.BatchTranslator;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.dba.TypesMapping;
@@ -39,7 +39,7 @@ import org.apache.cayenne.query.BatchQue
  * Superclass of query builders for the DML operations involving LOBs.
  * 
  */
-abstract class OracleLOBBatchQueryBuilder extends BatchQueryBuilder {
+abstract class OracleLOBBatchQueryBuilder extends BatchTranslator {
 
     protected String newClobFunction;
     protected String newBlobFunction;

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java Sat Mar 15 12:18:22 2014
@@ -32,7 +32,7 @@ import org.apache.cayenne.access.DataNod
 import org.apache.cayenne.access.MockOperationObserver;
 import org.apache.cayenne.access.OptimisticLockException;
 import org.apache.cayenne.access.jdbc.reader.RowReaderFactory;
-import org.apache.cayenne.access.trans.DeleteBatchQueryBuilder;
+import org.apache.cayenne.access.translator.batch.DeleteBatchTranslator;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.di.AdhocObjectFactory;
@@ -81,7 +81,7 @@ public class BatchActionLockingTest exte
         batchQuery.setUsingOptimisticLocking(true);
         batchQuery.add(qualifierSnapshot);
 
-        DeleteBatchQueryBuilder batchQueryBuilder = new DeleteBatchQueryBuilder(batchQuery, adapter);
+        DeleteBatchTranslator batchQueryBuilder = new DeleteBatchTranslator(batchQuery, adapter);
 
         MockConnection mockConnection = new MockConnection();
         PreparedStatementResultSetHandler preparedStatementResultSetHandler = mockConnection
@@ -122,7 +122,7 @@ public class BatchActionLockingTest exte
         batchQuery.setUsingOptimisticLocking(true);
         batchQuery.add(qualifierSnapshot);
 
-        DeleteBatchQueryBuilder batchQueryBuilder = new DeleteBatchQueryBuilder(batchQuery, adapter);
+        DeleteBatchTranslator batchQueryBuilder = new DeleteBatchTranslator(batchQuery, adapter);
 
         MockConnection mockConnection = new MockConnection();
         PreparedStatementResultSetHandler preparedStatementResultSetHandler = mockConnection

Copied: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/BatchTranslatorTest.java (from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/BatchQueryBuilderTest.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/BatchTranslatorTest.java?p2=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/BatchTranslatorTest.java&p1=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/BatchQueryBuilderTest.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/BatchQueryBuilderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/BatchTranslatorTest.java Sat Mar 15 12:18:22 2014
@@ -18,7 +18,7 @@
  ****************************************************************/
 
 
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import static org.mockito.Mockito.mock;
 
@@ -26,6 +26,7 @@ import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.sql.Types;
 
+import org.apache.cayenne.access.translator.batch.BatchTranslator;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.di.AdhocObjectFactory;
@@ -38,14 +39,14 @@ import org.apache.cayenne.unit.di.server
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
-public class BatchQueryBuilderTest extends ServerCase {
+public class BatchTranslatorTest extends ServerCase {
     
     @Inject
     private AdhocObjectFactory objectFactory;
 
     public void testConstructor() throws Exception {
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
-        BatchQueryBuilder builder = new BatchQueryBuilder(mock(BatchQuery.class), adapter) {
+        BatchTranslator builder = new BatchTranslator(mock(BatchQuery.class), adapter) {
             @Override
             public String createSqlString() {
                 return null;
@@ -63,7 +64,7 @@ public class BatchQueryBuilderTest exten
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
         String trimFunction = "testTrim";
 
-        BatchQueryBuilder builder = new BatchQueryBuilder(mock(BatchQuery.class), adapter) {
+        BatchTranslator builder = new BatchTranslator(mock(BatchQuery.class), adapter) {
             @Override
             public String createSqlString() {
                 return null;
@@ -93,7 +94,7 @@ public class BatchQueryBuilderTest exten
     public void testAppendDbAttribute2() throws Exception {
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
 
-        BatchQueryBuilder builder = new BatchQueryBuilder(mock(BatchQuery.class), adapter) {
+        BatchTranslator builder = new BatchTranslator(mock(BatchQuery.class), adapter) {
             @Override
             public String createSqlString() {
                 return null;

Copied: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorTest.java (from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilderTest.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorTest.java?p2=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorTest.java&p1=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilderTest.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorTest.java Sat Mar 15 12:18:22 2014
@@ -17,7 +17,7 @@
  *  under the License.
  ****************************************************************/
 
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import static org.mockito.Mockito.mock;
 
@@ -26,6 +26,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.cayenne.access.translator.batch.DeleteBatchTranslator;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -40,7 +41,7 @@ import org.apache.cayenne.unit.di.server
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
 @UseServerRuntime(ServerCase.LOCKING_PROJECT)
-public class DeleteBatchQueryBuilderTest extends ServerCase {
+public class DeleteBatchTranslatorTest extends ServerCase {
 
     @Inject
     private ServerRuntime runtime;
@@ -57,7 +58,7 @@ public class DeleteBatchQueryBuilderTest
     public void testConstructor() throws Exception {
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
 
-        DeleteBatchQueryBuilder builder = new DeleteBatchQueryBuilder(mock(DeleteBatchQuery.class), adapter);
+        DeleteBatchTranslator builder = new DeleteBatchTranslator(mock(DeleteBatchQuery.class), adapter);
 
         assertSame(adapter, builder.adapter);
     }
@@ -71,7 +72,7 @@ public class DeleteBatchQueryBuilderTest
         DeleteBatchQuery deleteQuery = new DeleteBatchQuery(entity, idAttributes, Collections.<String> emptySet(), 1);
 
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
-        DeleteBatchQueryBuilder builder = new DeleteBatchQueryBuilder(deleteQuery, adapter);
+        DeleteBatchTranslator builder = new DeleteBatchTranslator(deleteQuery, adapter);
         String generatedSql = builder.createSqlString();
         assertNotNull(generatedSql);
         assertEquals("DELETE FROM " + entity.getName() + " WHERE LOCKING_TEST_ID = ?", generatedSql);
@@ -89,7 +90,7 @@ public class DeleteBatchQueryBuilderTest
         DeleteBatchQuery deleteQuery = new DeleteBatchQuery(entity, idAttributes, nullAttributes, 1);
 
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
-        DeleteBatchQueryBuilder builder = new DeleteBatchQueryBuilder(deleteQuery, adapter);
+        DeleteBatchTranslator builder = new DeleteBatchTranslator(deleteQuery, adapter);
         String generatedSql = builder.createSqlString();
         assertNotNull(generatedSql);
         assertEquals("DELETE FROM " + entity.getName() + " WHERE LOCKING_TEST_ID = ? AND NAME IS NULL", generatedSql);
@@ -105,7 +106,7 @@ public class DeleteBatchQueryBuilderTest
 
             DeleteBatchQuery deleteQuery = new DeleteBatchQuery(entity, idAttributes, Collections.<String> emptySet(), 1);
             JdbcAdapter adapter = (JdbcAdapter) this.adapter;
-            DeleteBatchQueryBuilder builder = new DeleteBatchQueryBuilder(deleteQuery, adapter);
+            DeleteBatchTranslator builder = new DeleteBatchTranslator(deleteQuery, adapter);
             String generatedSql = builder.createSqlString();
 
             String charStart = unitAdapter.getIdentifiersStartQuote();
@@ -136,7 +137,7 @@ public class DeleteBatchQueryBuilderTest
 
             JdbcAdapter adapter = (JdbcAdapter) this.adapter;
 
-            DeleteBatchQueryBuilder builder = new DeleteBatchQueryBuilder(deleteQuery, adapter);
+            DeleteBatchTranslator builder = new DeleteBatchTranslator(deleteQuery, adapter);
             String generatedSql = builder.createSqlString();
 
             String charStart = unitAdapter.getIdentifiersStartQuote();

Copied: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorTest.java (from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilderTest.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorTest.java?p2=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorTest.java&p1=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilderTest.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorTest.java Sat Mar 15 12:18:22 2014
@@ -16,10 +16,11 @@
  *  specific language governing permissions and limitations
  *  under the License.
  ****************************************************************/
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import static org.mockito.Mockito.mock;
 
+import org.apache.cayenne.access.translator.batch.InsertBatchTranslator;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -33,7 +34,7 @@ import org.apache.cayenne.unit.di.server
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
 @UseServerRuntime(ServerCase.LOCKING_PROJECT)
-public class InsertBatchQueryBuilderTest extends ServerCase {
+public class InsertBatchTranslatorTest extends ServerCase {
 
     @Inject
     private ServerRuntime runtime;
@@ -50,7 +51,7 @@ public class InsertBatchQueryBuilderTest
     public void testConstructor() throws Exception {
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
 
-        InsertBatchQueryBuilder builder = new InsertBatchQueryBuilder(mock(InsertBatchQuery.class), adapter);
+        InsertBatchTranslator builder = new InsertBatchTranslator(mock(InsertBatchQuery.class), adapter);
 
         assertSame(adapter, builder.adapter);
     }
@@ -61,7 +62,7 @@ public class InsertBatchQueryBuilderTest
 
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
         InsertBatchQuery insertQuery = new InsertBatchQuery(entity, 1);
-        InsertBatchQueryBuilder builder = new InsertBatchQueryBuilder(insertQuery, adapter);
+        InsertBatchTranslator builder = new InsertBatchTranslator(insertQuery, adapter);
         String generatedSql = builder.createSqlString();
         assertNotNull(generatedSql);
         assertEquals("INSERT INTO " + entity.getName() + " (DESCRIPTION, LOCKING_TEST_ID, NAME) VALUES (?, ?, ?)",
@@ -78,7 +79,7 @@ public class InsertBatchQueryBuilderTest
             JdbcAdapter adapter = (JdbcAdapter) this.adapter;
 
             InsertBatchQuery insertQuery = new InsertBatchQuery(entity, 1);
-            InsertBatchQueryBuilder builder = new InsertBatchQueryBuilder(insertQuery, adapter);
+            InsertBatchTranslator builder = new InsertBatchTranslator(insertQuery, adapter);
             String generatedSql = builder.createSqlString();
             String charStart = unitAdapter.getIdentifiersStartQuote();
             String charEnd = unitAdapter.getIdentifiersEndQuote();

Copied: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java (from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java?p2=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java&p1=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SoftDeleteBatchQueryBuilderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java Sat Mar 15 12:18:22 2014
@@ -16,7 +16,7 @@
  *  specific language governing permissions and limitations
  *  under the License.
  ****************************************************************/
-package org.apache.cayenne.access.jdbc;
+package org.apache.cayenne.access.translator.batch;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -26,7 +26,9 @@ import java.util.List;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.access.DataNode;
-import org.apache.cayenne.access.trans.DeleteBatchQueryBuilder;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
+import org.apache.cayenne.access.translator.batch.DeleteBatchTranslator;
+import org.apache.cayenne.access.translator.batch.SoftDeleteTranslatorFactory;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.di.AdhocObjectFactory;
@@ -44,7 +46,7 @@ import org.apache.cayenne.unit.di.server
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
 @UseServerRuntime(ServerCase.LOCKING_PROJECT)
-public class SoftDeleteBatchQueryBuilderTest extends ServerCase {
+public class SoftDeleteBatchTranslatorTest extends ServerCase {
 
     @Inject
     private ObjectContext context;
@@ -61,13 +63,13 @@ public class SoftDeleteBatchQueryBuilder
     @Inject
     private AdhocObjectFactory objectFactory;
 
-    private DeleteBatchQueryBuilder createBuilder(DeleteBatchQuery query) {
+    private DeleteBatchTranslator createBuilder(DeleteBatchQuery query) {
         JdbcAdapter adapter = objectFactory.newInstance(JdbcAdapter.class, JdbcAdapter.class.getName());
         return createBuilder(query, adapter);
     }
 
-    private DeleteBatchQueryBuilder createBuilder(DeleteBatchQuery query, JdbcAdapter adapter) {
-        return (DeleteBatchQueryBuilder) new SoftDeleteQueryBuilderFactory().createDeleteQueryBuilder(query, adapter);
+    private DeleteBatchTranslator createBuilder(DeleteBatchQuery query, JdbcAdapter adapter) {
+        return (DeleteBatchTranslator) new SoftDeleteTranslatorFactory().deleteTranslator(query, adapter);
     }
 
     public void testCreateSqlString() throws Exception {
@@ -76,7 +78,7 @@ public class SoftDeleteBatchQueryBuilder
         List<DbAttribute> idAttributes = Collections.singletonList(entity.getAttribute("SOFT_TEST_ID"));
 
         DeleteBatchQuery deleteQuery = new DeleteBatchQuery(entity, idAttributes, Collections.<String> emptySet(), 1);
-        DeleteBatchQueryBuilder builder = createBuilder(deleteQuery);
+        DeleteBatchTranslator builder = createBuilder(deleteQuery);
         String generatedSql = builder.createSqlString();
         assertNotNull(generatedSql);
         assertEquals("UPDATE " + entity.getName() + " SET DELETED = ? WHERE SOFT_TEST_ID = ?", generatedSql);
@@ -91,7 +93,7 @@ public class SoftDeleteBatchQueryBuilder
         Collection<String> nullAttributes = Collections.singleton("NAME");
 
         DeleteBatchQuery deleteQuery = new DeleteBatchQuery(entity, idAttributes, nullAttributes, 1);
-        DeleteBatchQueryBuilder builder = createBuilder(deleteQuery);
+        DeleteBatchTranslator builder = createBuilder(deleteQuery);
         String generatedSql = builder.createSqlString();
         assertNotNull(generatedSql);
         assertEquals("UPDATE " + entity.getName() + " SET DELETED = ? WHERE SOFT_TEST_ID = ? AND NAME IS NULL",
@@ -108,7 +110,7 @@ public class SoftDeleteBatchQueryBuilder
 
             DeleteBatchQuery deleteQuery = new DeleteBatchQuery(entity, idAttributes, Collections.<String> emptySet(), 1);
             JdbcAdapter adapter = (JdbcAdapter) this.adapter;
-            DeleteBatchQueryBuilder builder = createBuilder(deleteQuery, adapter);
+            DeleteBatchTranslator builder = createBuilder(deleteQuery, adapter);
             String generatedSql = builder.createSqlString();
 
             String charStart = unitAdapter.getIdentifiersStartQuote();
@@ -128,9 +130,9 @@ public class SoftDeleteBatchQueryBuilder
         final DbEntity entity = context.getEntityResolver().getObjEntity(SoftTest.class).getDbEntity();
 
         JdbcAdapter adapter = (JdbcAdapter) this.adapter;
-        BatchQueryBuilderFactory oldFactory = dataNode.getBatchQueryBuilderFactory();
+        BatchTranslatorFactory oldFactory = dataNode.getBatchQueryBuilderFactory();
         try {
-            dataNode.setBatchQueryBuilderFactory(new SoftDeleteQueryBuilderFactory());
+            dataNode.setBatchQueryBuilderFactory(new SoftDeleteTranslatorFactory());
 
             final SoftTest test = context.newObject(SoftTest.class);
             test.setName("SoftDeleteBatchQueryBuilderTest");

Copied: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorTest.java (from r1577832, cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilderTest.java)
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorTest.java?p2=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorTest.java&p1=cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilderTest.java&r1=1577832&r2=1577838&rev=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/trans/UpdateBatchQueryBuilderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorTest.java Sat Mar 15 12:18:22 2014
@@ -17,7 +17,7 @@
  *  under the License.
  ****************************************************************/
 
-package org.apache.cayenne.access.trans;
+package org.apache.cayenne.access.translator.batch;
 
 import static org.mockito.Mockito.mock;
 
@@ -26,6 +26,7 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.cayenne.access.translator.batch.UpdateBatchTranslator;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
@@ -39,7 +40,7 @@ import org.apache.cayenne.unit.di.server
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
 @UseServerRuntime(ServerCase.LOCKING_PROJECT)
-public class UpdateBatchQueryBuilderTest extends ServerCase {
+public class UpdateBatchTranslatorTest extends ServerCase {
 
     @Inject
     private ServerRuntime runtime;
@@ -55,7 +56,7 @@ public class UpdateBatchQueryBuilderTest
 
     public void testConstructor() throws Exception {
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
-        UpdateBatchQueryBuilder builder = new UpdateBatchQueryBuilder(mock(UpdateBatchQuery.class), adapter);
+        UpdateBatchTranslator builder = new UpdateBatchTranslator(mock(UpdateBatchQuery.class), adapter);
         assertSame(adapter, builder.adapter);
     }
 
@@ -70,7 +71,7 @@ public class UpdateBatchQueryBuilderTest
                 Collections.<String> emptySet(), 1);
 
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
-        UpdateBatchQueryBuilder builder = new UpdateBatchQueryBuilder(updateQuery, adapter);
+        UpdateBatchTranslator builder = new UpdateBatchTranslator(updateQuery, adapter);
         String generatedSql = builder.createSqlString();
         assertNotNull(generatedSql);
         assertEquals("UPDATE " + entity.getName() + " SET DESCRIPTION = ? WHERE LOCKING_TEST_ID = ?", generatedSql);
@@ -89,7 +90,7 @@ public class UpdateBatchQueryBuilderTest
         UpdateBatchQuery updateQuery = new UpdateBatchQuery(entity, idAttributes, updatedAttributes, nullAttributes, 1);
 
         DbAdapter adapter = objectFactory.newInstance(DbAdapter.class, JdbcAdapter.class.getName());
-        UpdateBatchQueryBuilder builder = new UpdateBatchQueryBuilder(updateQuery, adapter);
+        UpdateBatchTranslator builder = new UpdateBatchTranslator(updateQuery, adapter);
         String generatedSql = builder.createSqlString();
         assertNotNull(generatedSql);
 
@@ -110,7 +111,7 @@ public class UpdateBatchQueryBuilderTest
                     Collections.<String> emptySet(), 1);
             JdbcAdapter adapter = (JdbcAdapter) this.adapter;
 
-            UpdateBatchQueryBuilder builder = new UpdateBatchQueryBuilder(updateQuery, adapter);
+            UpdateBatchTranslator builder = new UpdateBatchTranslator(updateQuery, adapter);
             String generatedSql = builder.createSqlString();
 
             String charStart = unitAdapter.getIdentifiersStartQuote();
@@ -141,7 +142,7 @@ public class UpdateBatchQueryBuilderTest
                     nullAttributes, 1);
             JdbcAdapter adapter = (JdbcAdapter) this.adapter;
 
-            UpdateBatchQueryBuilder builder = new UpdateBatchQueryBuilder(updateQuery, adapter);
+            UpdateBatchTranslator builder = new UpdateBatchTranslator(updateQuery, adapter);
             String generatedSql = builder.createSqlString();
             assertNotNull(generatedSql);
 

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DataDomainProviderTest.java Sat Mar 15 12:18:22 2014
@@ -32,9 +32,9 @@ import org.apache.cayenne.access.DataNod
 import org.apache.cayenne.access.dbsync.SchemaUpdateStrategy;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
 import org.apache.cayenne.access.dbsync.ThrowOnPartialOrCreateSchemaStrategy;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
-import org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.reader.RowReaderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
+import org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory;
 import org.apache.cayenne.ashwood.AshwoodEntitySorter;
 import org.apache.cayenne.cache.QueryCache;
 import org.apache.cayenne.configuration.ConfigurationNameMapper;
@@ -187,7 +187,7 @@ public class DataDomainProviderTest exte
                 binder.bind(SchemaUpdateStrategy.class).toInstance(new SkipSchemaUpdateStrategy());
                 binder.bind(DbAdapterFactory.class).to(DefaultDbAdapterFactory.class);
                 binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
-                binder.bind(BatchQueryBuilderFactory.class).to(DefaultBatchQueryBuilderFactory.class);
+                binder.bind(BatchTranslatorFactory.class).to(DefaultBatchTranslatorFactory.class);
 
                 binder.bind(DataSourceFactory.class).toInstance(new MockDataSourceFactory());
                 binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/DefaultDbAdapterFactoryTest.java Sat Mar 15 12:18:22 2014
@@ -29,7 +29,7 @@ import java.util.List;
 
 import junit.framework.TestCase;
 
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
 import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.configuration.DefaultRuntimeProperties;
@@ -113,7 +113,7 @@ public class DefaultDbAdapterFactoryTest
                 binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
                 binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
                 binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
-                binder.bind(BatchQueryBuilderFactory.class).toInstance(mock(BatchQueryBuilderFactory.class));
+                binder.bind(BatchTranslatorFactory.class).toInstance(mock(BatchTranslatorFactory.class));
             }
         };
 
@@ -148,7 +148,7 @@ public class DefaultDbAdapterFactoryTest
                 binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
                 binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
                 binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
-                binder.bind(BatchQueryBuilderFactory.class).toInstance(mock(BatchQueryBuilderFactory.class));
+                binder.bind(BatchTranslatorFactory.class).toInstance(mock(BatchTranslatorFactory.class));
             }
         };
 

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/SchemaBuilder.java Sat Mar 15 12:18:22 2014
@@ -36,8 +36,8 @@ import org.apache.cayenne.access.DataDom
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.DbGenerator;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
-import org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.reader.DefaultRowReaderFactory;
+import org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory;
 import org.apache.cayenne.ashwood.AshwoodEntitySorter;
 import org.apache.cayenne.cache.MapQueryCache;
 import org.apache.cayenne.dba.DbAdapter;
@@ -154,7 +154,7 @@ public class SchemaBuilder {
 
         node.setSchemaUpdateStrategy(new SkipSchemaUpdateStrategy());
         node.setRowReaderFactory(new DefaultRowReaderFactory());
-        node.setBatchQueryBuilderFactory(new DefaultBatchQueryBuilderFactory());
+        node.setBatchQueryBuilderFactory(new DefaultBatchTranslatorFactory());
         domain.addNode(node);
     }
 

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseBatchQueryBuilderFactoryProvider.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseBatchQueryBuilderFactoryProvider.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseBatchQueryBuilderFactoryProvider.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseBatchQueryBuilderFactoryProvider.java Sat Mar 15 12:18:22 2014
@@ -19,14 +19,14 @@
 package org.apache.cayenne.unit.di.server;
 
 import org.apache.cayenne.ConfigurationException;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
-import org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
+import org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory;
 import org.apache.cayenne.di.Provider;
 
 public class ServerCaseBatchQueryBuilderFactoryProvider implements
-        Provider<BatchQueryBuilderFactory> {
+        Provider<BatchTranslatorFactory> {
 
-    public BatchQueryBuilderFactory get() throws ConfigurationException {
-        return new DefaultBatchQueryBuilderFactory();
+    public BatchTranslatorFactory get() throws ConfigurationException {
+        return new DefaultBatchTranslatorFactory();
     }
 }

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseDataDomainProvider.java Sat Mar 15 12:18:22 2014
@@ -22,8 +22,8 @@ import org.apache.cayenne.access.DataDom
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.UnitTestDomain;
 import org.apache.cayenne.access.dbsync.SkipSchemaUpdateStrategy;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
 import org.apache.cayenne.access.jdbc.reader.RowReaderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
 import org.apache.cayenne.configuration.server.DataDomainProvider;
 import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.di.Inject;
@@ -50,7 +50,7 @@ class ServerCaseDataDomainProvider exten
     protected RowReaderFactory rowReaderFactory;
     
     @Inject
-    protected BatchQueryBuilderFactory batchQueryBuilderFactory;
+    protected BatchTranslatorFactory batchQueryBuilderFactory;
 
     @Override
     protected DataDomain createDataDomain(String name) {

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java (original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseModule.java Sat Mar 15 12:18:22 2014
@@ -26,7 +26,7 @@ import org.apache.cayenne.access.DataCon
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.DefaultObjectMapRetainStrategy;
 import org.apache.cayenne.access.ObjectMapRetainStrategy;
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
 import org.apache.cayenne.access.types.BigDecimalType;
 import org.apache.cayenne.access.types.BigIntegerType;
 import org.apache.cayenne.access.types.BooleanType;
@@ -196,7 +196,7 @@ public class ServerCaseModule implements
         // this factory is a hack that allows to inject to DbAdapters loaded outside of
         // server runtime... BatchQueryBuilderFactory is hardcoded and whatever is placed
         // in the ServerModule is ignored
-        binder.bind(BatchQueryBuilderFactory.class).toProvider(
+        binder.bind(BatchTranslatorFactory.class).toProvider(
                 ServerCaseBatchQueryBuilderFactoryProvider.class);
         binder.bind(DataChannelInterceptor.class).to(
                 ServerCaseDataChannelInterceptor.class);

Modified: cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java (original)
+++ cayenne/main/trunk/cayenne-tools/src/main/java/org/apache/cayenne/tools/configuration/ToolsModule.java Sat Mar 15 12:18:22 2014
@@ -18,8 +18,8 @@
  ****************************************************************/
 package org.apache.cayenne.tools.configuration;
 
-import org.apache.cayenne.access.jdbc.BatchQueryBuilderFactory;
-import org.apache.cayenne.access.jdbc.DefaultBatchQueryBuilderFactory;
+import org.apache.cayenne.access.translator.batch.BatchTranslatorFactory;
+import org.apache.cayenne.access.translator.batch.DefaultBatchTranslatorFactory;
 import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.DefaultRuntimeProperties;
 import org.apache.cayenne.configuration.RuntimeProperties;
@@ -87,7 +87,7 @@ public class ToolsModule implements Modu
         binder.bind(ResourceLocator.class).to(ClassLoaderResourceLocator.class);
 
         binder.bind(RuntimeProperties.class).to(DefaultRuntimeProperties.class);
-        binder.bind(BatchQueryBuilderFactory.class).to(DefaultBatchQueryBuilderFactory.class);
+        binder.bind(BatchTranslatorFactory.class).to(DefaultBatchTranslatorFactory.class);
         binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
 
         // TODO: this is cloned from ServerModule... figure out how to reuse

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1577838&r1=1577837&r2=1577838&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Sat Mar 15 12:18:22 2014
@@ -37,6 +37,7 @@ CAY-1904 Simple injection-friendly const
 CAY-1907 RowReaderFactory
 CAY-1908 Refactor all SQLActions to work with DataNode
 CAY-1911 BatchQuery refactoring - make Iterable
+CAY-1912 BatchQueryBuilder refactoring
 
 Bug Fixes:
 



Mime
View raw message