cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1409949 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb: HSQLDBAdapter.java HSQLDBNoSchemaAdapter.java
Date Thu, 15 Nov 2012 19:42:55 GMT
Author: aadamchik
Date: Thu Nov 15 19:42:54 2012
New Revision: 1409949

URL: http://svn.apache.org/viewvc?rev=1409949&view=rev
Log:
CAY-1772  Real support for DbEntity catalogs

fixing a few inconsistencies

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java?rev=1409949&r1=1409948&r2=1409949&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBAdapter.java
Thu Nov 15 19:42:54 2012
@@ -74,6 +74,16 @@ public class HSQLDBAdapter extends JdbcA
     }
 
     /**
+     * Returns DbEntity schema name for 1.8 and on. Subclass generates
+     * unqualified name.
+     * 
+     * @since 1.2
+     */
+    protected String getSchemaName(DbEntity entity) {
+        return entity.getSchema();
+    }
+
+    /**
      * Uses special action builder to create the right action.
      * 
      * @since 1.2

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java?rev=1409949&r1=1409948&r2=1409949&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/hsqldb/HSQLDBNoSchemaAdapter.java
Thu Nov 15 19:42:54 2012
@@ -27,6 +27,7 @@ import org.apache.cayenne.access.types.E
 import org.apache.cayenne.access.types.ExtendedTypeFactory;
 import org.apache.cayenne.configuration.Constants;
 import org.apache.cayenne.configuration.RuntimeProperties;
+import org.apache.cayenne.dba.QuotingStrategy;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbEntity;
 
@@ -51,19 +52,20 @@ public class HSQLDBNoSchemaAdapter exten
      */
     @Override
     protected String getTableName(DbEntity entity) {
-        return entity.getName();
+        QuotingStrategy context = getQuotingStrategy(entity.getDataMap().isQuotingSQLIdentifiers());
+        return context.quotedIdentifier(entity.getName());
     }
 
     /**
-     * Generate unqualified name.
+     * Returns NULL.
      * 
      * @since 1.2
      */
     @Override
     protected String getSchemaName(DbEntity entity) {
-        return "";
+        return null;
     }
-
+ 
     @Override
     public Collection<String> dropTableStatements(DbEntity table) {
         // hsqldb doesn't support schema namespaces, so remove if found



Mime
View raw message