cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r606468 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DbGenerator.java
Date Sat, 22 Dec 2007 17:15:08 GMT
Author: aadamchik
Date: Sat Dec 22 09:15:04 2007
New Revision: 606468

URL: http://svn.apache.org/viewvc?rev=606468&view=rev
Log:
generics

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DbGenerator.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DbGenerator.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DbGenerator.java?rev=606468&r1=606467&r2=606468&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DbGenerator.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DbGenerator.java
Sat Dec 22 09:15:04 2007
@@ -91,7 +91,7 @@
      * Creates and initializes new DbGenerator.
      */
     public DbGenerator(DbAdapter adapter, DataMap map) {
-        this(adapter, map, Collections.emptyList());
+        this(adapter, map, Collections.<DbEntity> emptyList());
     }
 
     /**
@@ -101,7 +101,8 @@
      * @param map DataMap whose entities will be used in schema generation
      * @param excludedEntities entities that should be ignored during schema generation
      */
-    public DbGenerator(DbAdapter adapter, DataMap map, Collection excludedEntities) {
+    public DbGenerator(DbAdapter adapter, DataMap map,
+            Collection<DbEntity> excludedEntities) {
         this(adapter, map, excludedEntities, null);
     }
 
@@ -114,8 +115,8 @@
      * @param domain optional DataDomain used to detect cross-database relationships.
      * @since 1.2
      */
-    public DbGenerator(DbAdapter adapter, DataMap map, Collection excludedEntities,
-            DataDomain domain) {
+    public DbGenerator(DbAdapter adapter, DataMap map,
+            Collection<DbEntity> excludedEntities, DataDomain domain) {
         // sanity check
         if (adapter == null) {
             throw new IllegalArgumentException("Adapter must not be null.");
@@ -318,8 +319,9 @@
 
             // drop PK
             if (shouldDropPKSupport) {
-                List<String> dropAutoPKSQL = getAdapter().getPkGenerator().dropAutoPkStatements(
-                        dbEntitiesRequiringAutoPK);
+                List<String> dropAutoPKSQL = getAdapter()
+                        .getPkGenerator()
+                        .dropAutoPkStatements(dbEntitiesRequiringAutoPK);
                 Iterator<String> it = dropAutoPKSQL.iterator();
                 while (it.hasNext()) {
                     safeExecute(connection, it.next());
@@ -562,11 +564,14 @@
 
             // check if an automatic PK generation can be potentially supported
             // in this entity. For now simply check that the key is not propagated
-            Iterator<DbRelationship> relationships = nextEntity.getRelationships().iterator();
+            Iterator<DbRelationship> relationships = nextEntity
+                    .getRelationships()
+                    .iterator();
 
             // create a copy of the original PK list,
             // since the list will be modified locally
-            List<DbAttribute> pkAttributes = new ArrayList<DbAttribute>(nextEntity.getPrimaryKeys());
+            List<DbAttribute> pkAttributes = new ArrayList<DbAttribute>(nextEntity
+                    .getPrimaryKeys());
             while (pkAttributes.size() > 0 && relationships.hasNext()) {
                 DbRelationship nextRelationship = relationships.next();
                 if (!nextRelationship.isToMasterPK()) {



Mime
View raw message