cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1577989 - in /cayenne/main/trunk/cayenne-server/src: main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/access/jdbc/ main/java/org/apache/cayenne/configuration/server/ test/java/org/apache/cayenne/access/dbsync/ test/java/or...
Date Sun, 16 Mar 2014 08:01:30 GMT
Author: aadamchik
Date: Sun Mar 16 08:01:29 2014
New Revision: 1577989

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

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/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.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/ServerCaseDataDomainProvider.java

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=1577989&r1=1577988&r2=1577989&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
Sun Mar 16 08:01:29 2014
@@ -68,7 +68,7 @@ public class DataNode implements QueryEn
 
     private JdbcEventLogger jdbcEventLogger;
     private RowReaderFactory rowReaderFactory;
-    private BatchTranslatorFactory batchQueryBuilderFactory;
+    private BatchTranslatorFactory batchTranslatorFactory;
 
     TransactionDataSource readThroughDataSource;
 
@@ -476,14 +476,14 @@ public class DataNode implements QueryEn
     /**
      * @since 3.2
      */
-    public BatchTranslatorFactory getBatchQueryBuilderFactory() {
-        return batchQueryBuilderFactory;
+    public BatchTranslatorFactory getBatchTranslatorFactory() {
+        return batchTranslatorFactory;
     }
 
     /**
      * @since 3.2
      */
-    public void setBatchQueryBuilderFactory(BatchTranslatorFactory batchQueryBuilderFactory)
{
-        this.batchQueryBuilderFactory = batchQueryBuilderFactory;
+    public void setBatchTranslatorFactory(BatchTranslatorFactory batchTranslatorFactory)
{
+        this.batchTranslatorFactory = batchTranslatorFactory;
     }
 }

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=1577989&r1=1577988&r2=1577989&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
Sun Mar 16 08:01:29 2014
@@ -97,7 +97,7 @@ public class BatchAction extends BaseSQL
     }
 
     protected BatchTranslator createTranslator() throws CayenneException {
-        BatchTranslatorFactory factory = dataNode.getBatchQueryBuilderFactory();
+        BatchTranslatorFactory factory = dataNode.getBatchTranslatorFactory();
 
         if (factory == null) {
             throw new IllegalStateException("Adapter BatchQueryBuilderFactory is null");

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=1577989&r1=1577988&r2=1577989&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
Sun Mar 16 08:01:29 2014
@@ -198,7 +198,7 @@ public class DataDomainProvider implemen
 
         dataNode.setJdbcEventLogger(jdbcEventLogger);
         dataNode.setRowReaderFactory(rowReaderFactory);
-        dataNode.setBatchQueryBuilderFactory(batchQueryBuilderFactory);
+        dataNode.setBatchTranslatorFactory(batchQueryBuilderFactory);
         
         dataNode.setDataSourceLocation(nodeDescriptor.getParameters());
 

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java?rev=1577989&r1=1577988&r2=1577989&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyTest.java
Sun Mar 16 08:01:29 2014
@@ -270,7 +270,7 @@ public class SchemaUpdateStrategyTest ex
         dataNode.setDataSourceFactory(node.getDataSourceFactory());
         dataNode.setSchemaUpdateStrategyName(node.getSchemaUpdateStrategyName());
         dataNode.setRowReaderFactory(node.getRowReaderFactory());
-        dataNode.setBatchQueryBuilderFactory(node.getBatchQueryBuilderFactory());
+        dataNode.setBatchTranslatorFactory(node.getBatchTranslatorFactory());
         dataNode.setEntityResolver(new EntityResolver(colection));
         return dataNode;
     }

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java?rev=1577989&r1=1577988&r2=1577989&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorTest.java
Sun Mar 16 08:01:29 2014
@@ -130,9 +130,9 @@ public class SoftDeleteBatchTranslatorTe
         final DbEntity entity = context.getEntityResolver().getObjEntity(SoftTest.class).getDbEntity();
 
         JdbcAdapter adapter = (JdbcAdapter) this.adapter;
-        BatchTranslatorFactory oldFactory = dataNode.getBatchQueryBuilderFactory();
+        BatchTranslatorFactory oldFactory = dataNode.getBatchTranslatorFactory();
         try {
-            dataNode.setBatchQueryBuilderFactory(new SoftDeleteTranslatorFactory());
+            dataNode.setBatchTranslatorFactory(new SoftDeleteTranslatorFactory());
 
             final SoftTest test = context.newObject(SoftTest.class);
             test.setName("SoftDeleteBatchQueryBuilderTest");
@@ -170,7 +170,7 @@ public class SoftDeleteBatchTranslatorTe
             }.runTest(200);
         } finally {
             context.performQuery(new SQLTemplate(entity, "DELETE FROM SOFT_TEST"));
-            dataNode.setBatchQueryBuilderFactory(oldFactory);
+            dataNode.setBatchTranslatorFactory(oldFactory);
         }
     }
 

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=1577989&r1=1577988&r2=1577989&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
Sun Mar 16 08:01:29 2014
@@ -154,7 +154,7 @@ public class SchemaBuilder {
 
         node.setSchemaUpdateStrategy(new SkipSchemaUpdateStrategy());
         node.setRowReaderFactory(new DefaultRowReaderFactory());
-        node.setBatchQueryBuilderFactory(new DefaultBatchTranslatorFactory());
+        node.setBatchTranslatorFactory(new DefaultBatchTranslatorFactory());
         domain.addNode(node);
     }
 

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=1577989&r1=1577988&r2=1577989&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
Sun Mar 16 08:01:29 2014
@@ -69,7 +69,7 @@ class ServerCaseDataDomainProvider exten
             node = new DataNode(dataMap.getName());
             node.setJdbcEventLogger(jdbcEventLogger);
             node.setRowReaderFactory(rowReaderFactory);
-            node.setBatchQueryBuilderFactory(batchQueryBuilderFactory);
+            node.setBatchTranslatorFactory(batchQueryBuilderFactory);
 
             // shared or dedicated DataSources can be mapped per DataMap
             node.setDataSource(dataSourceFactory.getDataSource(dataMap.getName()));



Mime
View raw message