cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1079998 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/access/ main/java/org/apache/cayenne/access/jdbc/ main/java/org/apache/cayenne/dba/ main/java/org/apache/cayenne/dba/hsqldb/ main/java/...
Date Wed, 09 Mar 2011 21:12:48 GMT
Author: aadamchik
Date: Wed Mar  9 21:12:47 2011
New Revision: 1079998

URL: http://svn.apache.org/viewvc?rev=1079998&view=rev
Log:
CAY-1549 Migrate BatchQueryBuilderFactory to DI

* refactoring: attaching BatchQueryBuilderFactory to JdbcAdapter and passing it down
SQLActions. This way we only need a single injection point - the adapter itself

Removed:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainActionBuilder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainDeleteQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainInsertQuery.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainUpdateQuery.java
Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainDeleteBucket.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainUpdateBucket.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BaseSQLAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/ProcedureAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/SelectAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcActionBuilder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8ActionBuilder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8SelectAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleActionBuilder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleProcedureAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomain.java Wed Mar  9 21:12:47 2011
@@ -125,6 +125,8 @@ public class DataDomain implements Query
     /**
      * Factory for creating QueryBuilders. Might be null, then default one will be used.
      * Server-only.
+     * 
+     * @deprecated since 3.1 BatchQueryBuilderFactory is injected into JdbcAdapter.
      */
     private BatchQueryBuilderFactory queryBuilderFactory;
 
@@ -868,6 +870,7 @@ public class DataDomain implements Query
 
     /**
      * Sets factory for creating QueryBuilders
+     * @deprecated since 3.1 BatchQueryBuilderFactory is injected into JdbcAdapter.
      */
     public void setQueryBuilderFactory(BatchQueryBuilderFactory queryBuilderFactory) {
         this.queryBuilderFactory = queryBuilderFactory;
@@ -875,6 +878,7 @@ public class DataDomain implements Query
 
     /**
      * @return factory for creating QueryBuilders. Might be null
+     * @deprecated since 3.1 BatchQueryBuilderFactory is injected into JdbcAdapter.
      */
     public BatchQueryBuilderFactory getQueryBuilderFactory() {
         return queryBuilderFactory;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainDeleteBucket.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainDeleteBucket.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainDeleteBucket.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainDeleteBucket.java Wed Mar  9 21:12:47 2011
@@ -79,7 +79,8 @@ class DataDomainDeleteBucket extends Dat
 
                 // remove object set for dependent entity, so that it does not show up
                 // on post processing
-                List<Persistent> objects = objectsByDescriptor.get(descriptor.getClassDescriptor());
+                List<Persistent> objects = objectsByDescriptor.get(descriptor
+                        .getClassDescriptor());
                 if (objects.isEmpty()) {
                     continue;
                 }
@@ -108,9 +109,8 @@ class DataDomainDeleteBucket extends Dat
 
                     DeleteBatchQuery batch = (DeleteBatchQuery) batches.get(batchKey);
                     if (batch == null) {
-                        batch = new DataDomainDeleteQuery(parent.getDomain(),
-                                dbEntity, qualifierBuilder.getAttributes(), 
-                                nullQualifierNames, 27);
+                        batch = new DeleteBatchQuery(dbEntity, qualifierBuilder
+                                .getAttributes(), nullQualifierNames, 27);
                         batch.setUsingOptimisticLocking(qualifierBuilder
                                 .isUsingOptimisticLocking());
                         batches.put(batchKey, batch);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainInsertBucket.java Wed Mar  9 21:12:47 2011
@@ -60,8 +60,7 @@ class DataDomainInsertBucket extends Dat
             Collection<DbEntityClassDescriptor> descriptors = descriptorsByDbEntity
                     .get(dbEntity);
 
-            InsertBatchQuery batch = 
-                new DataDomainInsertQuery(parent.getDomain(), dbEntity, 27);
+            InsertBatchQuery batch = new InsertBatchQuery(dbEntity, 27);
             for (DbEntityClassDescriptor descriptor : descriptors) {
 
                 diffBuilder.reset(descriptor);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainUpdateBucket.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainUpdateBucket.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainUpdateBucket.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataDomainUpdateBucket.java Wed Mar  9 21:12:47 2011
@@ -65,9 +65,8 @@ class DataDomainUpdateBucket extends Dat
                 qualifierBuilder.reset(descriptor);
                 boolean isRootDbEntity = entity.getDbEntity() == dbEntity;
 
-                Iterator<Persistent> objects = objectsByDescriptor
-                        .get(descriptor.getClassDescriptor())
-                        .iterator();
+                Iterator<Persistent> objects = objectsByDescriptor.get(
+                        descriptor.getClassDescriptor()).iterator();
                 while (objects.hasNext()) {
                     Persistent o = objects.next();
                     ObjectDiff diff = parent.objectDiff(o.getObjectId());
@@ -107,8 +106,7 @@ class DataDomainUpdateBucket extends Dat
 
                     UpdateBatchQuery batch = (UpdateBatchQuery) batches.get(batchKey);
                     if (batch == null) {
-                        batch = new DataDomainUpdateQuery(
-                                parent.getDomain(),
+                        batch = new UpdateBatchQuery(
                                 dbEntity,
                                 qualifierBuilder.getAttributes(),
                                 updatedAttributes(dbEntity, snapshot),

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BaseSQLAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BaseSQLAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BaseSQLAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BaseSQLAction.java Wed Mar  9 21:12:47 2011
@@ -27,7 +27,7 @@ import org.apache.cayenne.CayenneExcepti
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.access.QueryLogger;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.QueryMetadata;
@@ -40,15 +40,15 @@ import org.apache.cayenne.query.SQLActio
  */
 public abstract class BaseSQLAction implements SQLAction {
 
-    protected DbAdapter adapter;
+    protected JdbcAdapter adapter;
     protected EntityResolver entityResolver;
 
-    public BaseSQLAction(DbAdapter adapter, EntityResolver entityResolver) {
+    public BaseSQLAction(JdbcAdapter adapter, EntityResolver entityResolver) {
         this.adapter = adapter;
         this.entityResolver = entityResolver;
     }
 
-    public DbAdapter getAdapter() {
+    public JdbcAdapter getAdapter() {
         return adapter;
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchAction.java Wed Mar  9 21:12:47 2011
@@ -34,7 +34,7 @@ import org.apache.cayenne.access.Optimis
 import org.apache.cayenne.access.QueryLogger;
 import org.apache.cayenne.access.ResultIterator;
 import org.apache.cayenne.access.trans.BatchQueryBuilder;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.dba.TypesMapping;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.EntityResolver;
@@ -51,18 +51,13 @@ public class BatchAction extends BaseSQL
     protected boolean batch;
     protected BatchQuery query;
     protected RowDescriptor keyRowDescriptor;
-    
-    /**
-     * Custom BatchQueryBuilderFactory. Can be null, then default will be used.
-     */
-    protected BatchQueryBuilderFactory queryBuilderFactory;
 
-    public BatchAction(BatchQuery batchQuery, DbAdapter adapter,
+    public BatchAction(BatchQuery batchQuery, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(adapter, entityResolver);
         this.query = batchQuery;
     }
-    
+
     /**
      * @return Query which originated this action
      */
@@ -91,25 +86,14 @@ public class BatchAction extends BaseSQL
             runAsIndividualQueries(connection, queryBuilder, observer, generatesKeys);
         }
     }
-    
-    /**
-     * @return factory that creates BatchQueryBuilders
-     */
-    public BatchQueryBuilderFactory getQueryBuilderFactory() {
-        return queryBuilderFactory;
-    }
-    
-    public void setQueryBuilderFactory(BatchQueryBuilderFactory queryBuilderFactory) {
-        this.queryBuilderFactory = queryBuilderFactory;
-    }
 
     protected BatchQueryBuilder createBuilder() throws CayenneException {
-        BatchQueryBuilderFactory factory = getQueryBuilderFactory();
-           
+        BatchQueryBuilderFactory factory = adapter.getBatchQueryBuilderFactory();
+
         if (factory == null) {
-            factory = new DefaultBatchQueryBuilderFactory();
+            throw new IllegalStateException("Adapter BatchQueryBuilderFactory is null");
         }
-        
+
         if (query instanceof InsertBatchQuery) {
             return factory.createInsertQueryBuilder(adapter);
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/ProcedureAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/ProcedureAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/ProcedureAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/ProcedureAction.java Wed Mar  9 21:12:47 2011
@@ -32,7 +32,7 @@ import org.apache.cayenne.access.Operati
 import org.apache.cayenne.access.QueryLogger;
 import org.apache.cayenne.access.trans.ProcedureTranslator;
 import org.apache.cayenne.access.types.ExtendedType;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.map.Procedure;
 import org.apache.cayenne.map.ProcedureParameter;
@@ -54,7 +54,7 @@ public class ProcedureAction extends Bas
      */
     protected int processedResultSets;
 
-    public ProcedureAction(ProcedureQuery query, DbAdapter adapter,
+    public ProcedureAction(ProcedureQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(adapter, entityResolver);
         this.query = query;
@@ -71,7 +71,7 @@ public class ProcedureAction extends Bas
 
         try {
             initStatement(statement);
-            
+
             // stored procedure may contain a mixture of update counts and result sets,
             // and out parameters. Read out parameters first, then
             // iterate until we exhaust all results
@@ -230,13 +230,16 @@ public class ProcedureAction extends Bas
             delegate.nextRows(query, Collections.singletonList(result));
         }
     }
-    
+
     /**
      * Initializes statement with query parameters
-     * @throws Exception 
+     * 
+     * @throws Exception
      */
     void initStatement(CallableStatement statement) throws Exception {
-        int statementFetchSize = query.getMetaData(getEntityResolver()).getStatementFetchSize();
+        int statementFetchSize = query
+                .getMetaData(getEntityResolver())
+                .getStatementFetchSize();
         if (statementFetchSize != 0) {
             statement.setFetchSize(statementFetchSize);
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/SelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/SelectAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/SelectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/SelectAction.java Wed Mar  9 21:12:47 2011
@@ -30,7 +30,7 @@ import org.apache.cayenne.access.Operati
 import org.apache.cayenne.access.QueryLogger;
 import org.apache.cayenne.access.ResultIterator;
 import org.apache.cayenne.access.trans.SelectTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.PrefetchProcessor;
 import org.apache.cayenne.query.PrefetchTreeNode;
@@ -46,7 +46,7 @@ public class SelectAction extends BaseSQ
 
     protected SelectQuery query;
 
-    public SelectAction(SelectQuery query, DbAdapter adapter,
+    public SelectAction(SelectQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(adapter, entityResolver);
         this.query = query;
@@ -69,7 +69,7 @@ public class SelectAction extends BaseSQ
         SelectTranslator translator = createTranslator(connection);
         PreparedStatement prepStmt = translator.createStatement();
         ResultSet rs;
-        
+
         // need to run in try-catch block to close statement properly if exception happens
         try {
             rs = prepStmt.executeQuery();

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcActionBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcActionBuilder.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcActionBuilder.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcActionBuilder.java Wed Mar  9 21:12:47 2011
@@ -83,7 +83,7 @@ public class JdbcActionBuilder implement
     /**
      * Returns DbAdapter used associated with this action builder.
      */
-    public DbAdapter getAdapter() {
+    public JdbcAdapter getAdapter() {
         return adapter;
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/JdbcAdapter.java Wed Mar  9 21:12:47 2011
@@ -29,12 +29,14 @@ import java.util.Iterator;
 
 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.types.ExtendedType;
 import org.apache.cayenne.access.types.ExtendedTypeMap;
+import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbJoin;
@@ -70,6 +72,12 @@ public class JdbcAdapter implements DbAd
     protected ResourceLocator resourceLocator;
 
     /**
+     * @since 3.1
+     */
+    @Inject
+    protected BatchQueryBuilderFactory batchQueryBuilderFactory;
+
+    /**
      * @since 3.0
      */
     public String getIdentifiersStartQuote() {
@@ -100,7 +108,6 @@ public class JdbcAdapter implements DbAd
         this.configureExtendedTypes(extendedTypes);
         this.ejbqlTranslatorFactory = createEJBQLTranslatorFactory();
         initIdentifiersQuotes();
-
     }
 
     /**
@@ -586,4 +593,19 @@ public class JdbcAdapter implements DbAd
             return new NoQuoteStrategy();
         }
     }
+
+    /**
+     * @since 3.1
+     */
+    public BatchQueryBuilderFactory getBatchQueryBuilderFactory() {
+        return batchQueryBuilderFactory;
+    }
+
+    /**
+     * @since 3.1
+     */
+    public void setBatchQueryBuilderFactory(
+            BatchQueryBuilderFactory batchQueryBuilderFactory) {
+        this.batchQueryBuilderFactory = batchQueryBuilderFactory;
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLSelectAction.java Wed Mar  9 21:12:47 2011
@@ -22,7 +22,7 @@ import java.sql.Connection;
 
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.SelectQuery;
 
@@ -31,7 +31,7 @@ import org.apache.cayenne.query.SelectQu
  */
 class HSQLSelectAction extends SelectAction {
 
-    HSQLSelectAction(SelectQuery query, DbAdapter adapter, EntityResolver entityResolver) {
+    HSQLSelectAction(SelectQuery query, JdbcAdapter adapter, EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLProcedureAction.java Wed Mar  9 21:12:47 2011
@@ -28,7 +28,7 @@ import org.apache.cayenne.access.QueryLo
 import org.apache.cayenne.access.jdbc.ProcedureAction;
 import org.apache.cayenne.access.jdbc.RowDescriptor;
 import org.apache.cayenne.access.trans.ProcedureTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.ProcedureQuery;
 
@@ -37,7 +37,7 @@ import org.apache.cayenne.query.Procedur
  */
 class MySQLProcedureAction extends ProcedureAction {
 
-    public MySQLProcedureAction(ProcedureQuery query, DbAdapter adapter,
+    public MySQLProcedureAction(ProcedureQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/mysql/MySQLSelectAction.java Wed Mar  9 21:12:47 2011
@@ -22,7 +22,7 @@ import java.sql.Connection;
 
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.SelectQuery;
 
@@ -31,7 +31,8 @@ import org.apache.cayenne.query.SelectQu
  */
 class MySQLSelectAction extends SelectAction {
 
-    MySQLSelectAction(SelectQuery query, DbAdapter adapter, EntityResolver entityResolver) {
+    MySQLSelectAction(SelectQuery query, JdbcAdapter adapter,
+            EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8ActionBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8ActionBuilder.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8ActionBuilder.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8ActionBuilder.java Wed Mar  9 21:12:47 2011
@@ -51,7 +51,7 @@ class Oracle8ActionBuilder extends Oracl
     public SQLAction batchAction(BatchQuery query) {
         // special handling for LOB updates
         if (OracleAdapter.isSupportsOracleLOB() && OracleAdapter.updatesLOBColumns(query)) {
-            // Special action for Oracle8.  See CAY-1307.
+            // Special action for Oracle8. See CAY-1307.
             return new Oracle8LOBBatchAction(query, getAdapter());
         }
         else {
@@ -62,7 +62,7 @@ class Oracle8ActionBuilder extends Oracl
 
             OracleBatchAction action = new OracleBatchAction(
                     query,
-                    getAdapter(),
+                    adapter,
                     getEntityResolver());
             action.setBatch(runningAsBatch);
             return action;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8SelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8SelectAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8SelectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/Oracle8SelectAction.java Wed Mar  9 21:12:47 2011
@@ -21,7 +21,7 @@ package org.apache.cayenne.dba.oracle;
 import java.sql.Connection;
 
 import org.apache.cayenne.access.trans.SelectTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.SelectQuery;
 
@@ -30,7 +30,7 @@ import org.apache.cayenne.query.SelectQu
  */
 class Oracle8SelectAction extends OracleSelectAction {
 
-    Oracle8SelectAction(SelectQuery query, DbAdapter adapter,
+    Oracle8SelectAction(SelectQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleActionBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleActionBuilder.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleActionBuilder.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleActionBuilder.java Wed Mar  9 21:12:47 2011
@@ -36,7 +36,7 @@ class OracleActionBuilder extends JdbcAc
     OracleActionBuilder(JdbcAdapter adapter, EntityResolver resolver) {
         super(adapter, resolver);
     }
-    
+
     @Override
     public SQLAction sqlAction(SQLTemplate query) {
         return new OracleSQLTemplateAction(query, adapter, getEntityResolver());
@@ -58,7 +58,7 @@ class OracleActionBuilder extends JdbcAc
 
             OracleBatchAction action = new OracleBatchAction(
                     query,
-                    getAdapter(),
+                    adapter,
                     getEntityResolver());
             action.setBatch(runningAsBatch);
             return action;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleBatchAction.java Wed Mar  9 21:12:47 2011
@@ -22,7 +22,7 @@ package org.apache.cayenne.dba.oracle;
 import org.apache.cayenne.CayenneException;
 import org.apache.cayenne.access.jdbc.BatchAction;
 import org.apache.cayenne.access.trans.BatchQueryBuilder;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.BatchQuery;
 
@@ -31,7 +31,8 @@ import org.apache.cayenne.query.BatchQue
  */
 class OracleBatchAction extends BatchAction {
 
-    OracleBatchAction(BatchQuery batchQuery, DbAdapter adapter, EntityResolver entityResolver) {
+    OracleBatchAction(BatchQuery batchQuery, JdbcAdapter adapter,
+            EntityResolver entityResolver) {
         super(batchQuery, adapter, entityResolver);
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleProcedureAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleProcedureAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleProcedureAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleProcedureAction.java Wed Mar  9 21:12:47 2011
@@ -24,6 +24,7 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.util.Collections;
 import java.util.List;
+
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.access.QueryLogger;
@@ -31,7 +32,7 @@ import org.apache.cayenne.access.jdbc.Co
 import org.apache.cayenne.access.jdbc.ProcedureAction;
 import org.apache.cayenne.access.jdbc.RowDescriptor;
 import org.apache.cayenne.access.types.ExtendedType;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.map.ProcedureParameter;
 import org.apache.cayenne.query.ProcedureQuery;
@@ -43,7 +44,7 @@ import org.apache.cayenne.query.Procedur
  */
 class OracleProcedureAction extends ProcedureAction {
 
-    OracleProcedureAction(ProcedureQuery query, DbAdapter adapter,
+    OracleProcedureAction(ProcedureQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/oracle/OracleSelectAction.java Wed Mar  9 21:12:47 2011
@@ -23,7 +23,7 @@ import java.sql.Connection;
 
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.SelectQuery;
 
@@ -32,7 +32,7 @@ import org.apache.cayenne.query.SelectQu
  */
 class OracleSelectAction extends SelectAction {
 
-    public OracleSelectAction(SelectQuery query, DbAdapter adapter,
+    public OracleSelectAction(SelectQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresProcedureAction.java Wed Mar  9 21:12:47 2011
@@ -22,7 +22,7 @@ package org.apache.cayenne.dba.postgres;
 import java.sql.Connection;
 
 import org.apache.cayenne.access.trans.ProcedureTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.dba.sqlserver.SQLServerProcedureAction;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.ProcedureQuery;
@@ -37,7 +37,7 @@ import org.apache.cayenne.query.Procedur
  */
 class PostgresProcedureAction extends SQLServerProcedureAction {
 
-    PostgresProcedureAction(ProcedureQuery query, DbAdapter adapter,
+    PostgresProcedureAction(ProcedureQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/postgres/PostgresSelectAction.java Wed Mar  9 21:12:47 2011
@@ -22,7 +22,7 @@ import java.sql.Connection;
 
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.SelectQuery;
 
@@ -31,7 +31,7 @@ import org.apache.cayenne.query.SelectQu
  */
 class PostgresSelectAction extends SelectAction {
 
-    PostgresSelectAction(SelectQuery query, DbAdapter adapter,
+    PostgresSelectAction(SelectQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerBatchAction.java Wed Mar  9 21:12:47 2011
@@ -27,7 +27,7 @@ import java.util.Collections;
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.access.QueryLogger;
 import org.apache.cayenne.access.jdbc.BatchAction;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.Attribute;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.EntityResolver;
@@ -39,7 +39,7 @@ import org.apache.cayenne.query.InsertBa
  */
 public class SQLServerBatchAction extends BatchAction {
 
-    public SQLServerBatchAction(BatchQuery batchQuery, DbAdapter adapter,
+    public SQLServerBatchAction(BatchQuery batchQuery, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(batchQuery, adapter, entityResolver);
     }
@@ -62,14 +62,14 @@ public class SQLServerBatchAction extend
 
             // important: turn off IDENTITY_INSERT as SQL Server won't be able to process
             // other identity columns in the same transaction
-            
+
             // TODO: if an error happens here this would mask the parent error
             if (identityOverride) {
                 setIdentityInsert(connection, false);
             }
         }
     }
-    
+
     protected void setIdentityInsert(Connection connection, boolean on)
             throws SQLException {
 
@@ -92,7 +92,7 @@ public class SQLServerBatchAction extend
             }
         }
     }
- 
+
     /**
      * Returns whether a table has identity columns.
      */
@@ -108,7 +108,7 @@ public class SQLServerBatchAction extend
 
         // find identity attributes
         for (Attribute attribute : query.getDbEntity().getAttributes()) {
-            if (((DbAttribute)attribute).isGenerated()) {
+            if (((DbAttribute) attribute).isGenerated()) {
                 return true;
             }
         }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerProcedureAction.java Wed Mar  9 21:12:47 2011
@@ -32,7 +32,7 @@ import org.apache.cayenne.access.ResultI
 import org.apache.cayenne.access.jdbc.ProcedureAction;
 import org.apache.cayenne.access.jdbc.RowDescriptor;
 import org.apache.cayenne.access.trans.ProcedureTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.ProcedureQuery;
 import org.apache.cayenne.query.Query;
@@ -49,7 +49,7 @@ import org.apache.cayenne.query.Query;
  */
 public class SQLServerProcedureAction extends ProcedureAction {
 
-    public SQLServerProcedureAction(ProcedureQuery query, DbAdapter adapter,
+    public SQLServerProcedureAction(ProcedureQuery query, JdbcAdapter adapter,
             EntityResolver entityResolver) {
         super(query, adapter, entityResolver);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/sqlserver/SQLServerSelectAction.java Wed Mar  9 21:12:47 2011
@@ -22,16 +22,17 @@ import java.sql.Connection;
 
 import org.apache.cayenne.access.jdbc.SelectAction;
 import org.apache.cayenne.access.trans.SelectTranslator;
-import org.apache.cayenne.dba.DbAdapter;
+import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.SelectQuery;
 
 public class SQLServerSelectAction extends SelectAction {
 
-	public SQLServerSelectAction(SelectQuery query, DbAdapter adapter, EntityResolver entityResolver) {
-		super(query, adapter, entityResolver);
-	}
-	
+    public SQLServerSelectAction(SelectQuery query, JdbcAdapter adapter,
+            EntityResolver entityResolver) {
+        super(query, adapter, entityResolver);
+    }
+
     @Override
     protected SelectTranslator createTranslator(Connection connection) {
         SelectTranslator translator = new SQLServerSelectTranslator();
@@ -41,5 +42,5 @@ public class SQLServerSelectAction exten
         translator.setConnection(connection);
         return translator;
     }
-    
+
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingTest.java Wed Mar  9 21:12:47 2011
@@ -29,7 +29,6 @@ import java.util.Map;
 import org.apache.cayenne.access.MockOperationObserver;
 import org.apache.cayenne.access.OptimisticLockException;
 import org.apache.cayenne.access.trans.DeleteBatchQueryBuilder;
-import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.EntityResolver;
@@ -48,7 +47,7 @@ public class BatchActionLockingTest exte
         EntityResolver resolver = getDomain().getEntityResolver();
 
         // test with adapter that supports keys...
-        DbAdapter adapter = buildAdapter(true);
+        JdbcAdapter adapter = buildAdapter(true);
 
         DbEntity dbEntity = resolver
                 .lookupObjEntity(SimpleLockingTestEntity.class)
@@ -94,7 +93,7 @@ public class BatchActionLockingTest exte
         EntityResolver resolver = getDomain().getEntityResolver();
 
         // test with adapter that supports keys...
-        DbAdapter adapter = buildAdapter(true);
+        JdbcAdapter adapter = buildAdapter(true);
 
         DbEntity dbEntity = resolver
                 .lookupObjEntity(SimpleLockingTestEntity.class)
@@ -140,7 +139,7 @@ public class BatchActionLockingTest exte
         assertEquals(0, mockConnection.getNumberRollbacks());
     }
 
-    DbAdapter buildAdapter(boolean supportGeneratedKeys) {
+    JdbcAdapter buildAdapter(boolean supportGeneratedKeys) {
         JdbcAdapter adapter = new JdbcAdapter();
         adapter.setSupportsGeneratedKeys(supportGeneratedKeys);
         return adapter;

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java?rev=1079998&r1=1079997&r2=1079998&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/jdbc/BatchActionTest.java Wed Mar  9 21:12:47 2011
@@ -20,7 +20,6 @@
 package org.apache.cayenne.access.jdbc;
 
 import org.apache.cayenne.configuration.server.ServerRuntime;
-import org.apache.cayenne.dba.DbAdapter;
 import org.apache.cayenne.dba.JdbcAdapter;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.EntityResolver;
@@ -40,7 +39,7 @@ public class BatchActionTest extends Ser
         EntityResolver resolver = runtime.getChannel().getEntityResolver();
 
         // test with adapter that supports keys
-        DbAdapter adapter = buildAdapter(true);
+        JdbcAdapter adapter = buildAdapter(true);
 
         InsertBatchQuery batch1 = new InsertBatchQuery(resolver.lookupObjEntity(
                 GeneratedColumnTestEntity.class).getDbEntity(), 5);
@@ -55,7 +54,7 @@ public class BatchActionTest extends Ser
         EntityResolver resolver = runtime.getChannel().getEntityResolver();
 
         // test with adapter that does not support keys...
-        DbAdapter adapter = buildAdapter(false);
+        JdbcAdapter adapter = buildAdapter(false);
 
         InsertBatchQuery batch1 = new InsertBatchQuery(resolver.lookupObjEntity(
                 GeneratedColumnTestEntity.class).getDbEntity(), 5);
@@ -66,7 +65,7 @@ public class BatchActionTest extends Ser
         assertFalse(new BatchAction(batch2, adapter, resolver).hasGeneratedKeys());
     }
 
-    DbAdapter buildAdapter(boolean supportGeneratedKeys) {
+    JdbcAdapter buildAdapter(boolean supportGeneratedKeys) {
         JdbcAdapter adapter = new JdbcAdapter();
         adapter.setSupportsGeneratedKeys(supportGeneratedKeys);
         return adapter;



Mime
View raw message