cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1079996 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access: jdbc/ trans/
Date Wed, 09 Mar 2011 21:10:50 GMT
Author: aadamchik
Date: Wed Mar  9 21:10:50 2011
New Revision: 1079996

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

preliminary cleanup and reformatting

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java?rev=1079996&r1=1079995&r2=1079996&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BatchQueryBuilderFactory.java
Wed Mar  9 21:10:50 2011
@@ -1,43 +1,46 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.access.jdbc;
-
-import org.apache.cayenne.access.trans.BatchQueryBuilder;
-import org.apache.cayenne.dba.DbAdapter;
-
-/**
- * Factory which creates BatchQueryBuilders for different types of queries,
- * which, in their turn, create SQL strings
- */
-public interface BatchQueryBuilderFactory {
-    /**
-     * Creates query builder for INSERT queries
-     */
-    public BatchQueryBuilder createInsertQueryBuilder(DbAdapter adapter);
-    
-    /**
-     * Creates query builder for UPDATE queries
-     */
-    public BatchQueryBuilder createUpdateQueryBuilder(DbAdapter adapter);
-    
-    /**
-     * Creates query builder for DELETE queries
-     */
-    public BatchQueryBuilder createDeleteQueryBuilder(DbAdapter adapter);
-}
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.access.jdbc;
+
+import org.apache.cayenne.access.trans.BatchQueryBuilder;
+import org.apache.cayenne.dba.DbAdapter;
+
+/**
+ * Factory which creates BatchQueryBuilders for different types of queries, which, in
+ * their turn, create SQL strings for batch queries.
+ * 
+ * @since 3.0
+ */
+public interface BatchQueryBuilderFactory {
+
+    /**
+     * Creates query builder for INSERT queries
+     */
+    BatchQueryBuilder createInsertQueryBuilder(DbAdapter adapter);
+
+    /**
+     * Creates query builder for UPDATE queries
+     */
+    BatchQueryBuilder createUpdateQueryBuilder(DbAdapter adapter);
+
+    /**
+     * Creates query builder for DELETE queries
+     */
+    BatchQueryBuilder createDeleteQueryBuilder(DbAdapter adapter);
+}

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java?rev=1079996&r1=1079995&r2=1079996&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/BatchQueryBuilder.java
Wed Mar  9 21:10:50 2011
@@ -34,12 +34,14 @@ import org.apache.cayenne.query.BatchQue
 /**
  * Superclass of batch query translators.
  */
-
 public abstract class BatchQueryBuilder {
 
     protected DbAdapter adapter;
     protected String trimFunction;
 
+    /**
+     * @deprecated since 3.1 unused
+     */
     public BatchQueryBuilder() {
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java?rev=1079996&r1=1079995&r2=1079996&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/DeleteBatchQueryBuilder.java
Wed Mar  9 21:10:50 2011
@@ -33,7 +33,6 @@ import org.apache.cayenne.query.DeleteBa
 /**
  * Translator for delete BatchQueries. Creates parametrized DELETE SQL statements.
  */
-
 public class DeleteBatchQueryBuilder extends BatchQueryBuilder {
 
     public DeleteBatchQueryBuilder(DbAdapter adapter) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java?rev=1079996&r1=1079995&r2=1079996&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/InsertBatchQueryBuilder.java
Wed Mar  9 21:10:50 2011
@@ -36,7 +36,7 @@ import org.apache.cayenne.query.BatchQue
 public class InsertBatchQueryBuilder extends BatchQueryBuilder {
 
     public InsertBatchQueryBuilder(DbAdapter adapter) {
-        super.setAdapter(adapter);
+        super(adapter);
     }
 
     /**



Mime
View raw message