openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r827727 [1/2] - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-kernel/src/main/java/or...
Date Tue, 20 Oct 2009 16:31:40 GMT
Author: jrbauer
Date: Tue Oct 20 16:31:39 2009
New Revision: 827727

URL: http://svn.apache.org/viewvc?rev=827727&view=rev
Log:
OPENJPA-1115 Committing code and tests contributed by Dianne Richards.  This commit cleans up some issues with manual/user specified delimiters and adds initial support for full delimiting via the delimited-identifiers element in orm.xml.

Added:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car2.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet2.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityA.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityB.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityH.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI2.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI3.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI4.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac2.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/TestDelimIdResultSetAnnotations.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/TestDelimIdSeqGen.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/TestDelimInheritance.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/TestDelimitedIdentifiers.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/TestDelimitedJoinAnnotation.java   (with props)
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/delimited-identifiers-orm.xml   (with props)
Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DynamicSchemaFactory.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schema.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DerbyDictionary.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
    openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityE.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityF.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityG.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/NativeJDBCSeq.java Tue Oct 20 16:31:39 2009
@@ -183,6 +183,8 @@
         if (schema == null)
             schema = group.addSchema(schemaName);
         schema.importSequence(_seq);
+        // TODO: temp until a more global name solution is implemented
+        schema.addDelimSequenceName(_conf.getDBDictionaryInstance().addDelimiters(_seqName), _seq);
     }
 
     @Override
@@ -250,6 +252,8 @@
         Schema schema = group.addSchema(schemaName);
 
         _seq = schema.addSequence(seqName);
+        // TODO: temp until a global name solution is implemented
+        schema.addDelimSequenceName(_conf.getDBDictionaryInstance().addDelimiters(seqName), _seq);
         _seq.setInitialValue(_initial);
         _seq.setIncrement(_increment);
         _seq.setAllocate(_allocate);

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DynamicSchemaFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DynamicSchemaFactory.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DynamicSchemaFactory.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/DynamicSchemaFactory.java Tue Oct 20 16:31:39 2009
@@ -88,8 +88,11 @@
             schemaName = _schema;
 
         Schema schema = getSchema(schemaName);
-        if (schema == null)
+        if (schema == null) {
             schema = addSchema(schemaName);
+            // TODO: temp until a more global name scheme is implemented
+            addDelimSchemaName(_dict.addDelimiters(schemaName), schema);
+        }
 
         // Ensure only valid table name(s) are added to the schema
         if (tableName.length() > _dict.maxTableNameLength) {

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schema.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schema.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schema.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/Schema.java Tue Oct 20 16:31:39 2009
@@ -36,6 +36,8 @@
     private SchemaGroup _group = null;
     private Map _tableMap = null;
     private Map _seqMap = null;
+    // TODO: temp until a more global solution is implemented
+    private Map<String, Sequence> _delimSeqMap = null;
 
     // cache
     private Table[] _tables = null;
@@ -206,7 +208,12 @@
     public Sequence getSequence(String name) {
         if (name == null || _seqMap == null)
             return null;
-        return (Sequence) _seqMap.get(name.toUpperCase());
+        // TODO: temp until a more global solution is implemented
+        Sequence seq = (Sequence) _seqMap.get(name.toUpperCase());
+        if (seq == null && _delimSeqMap != null) {
+            seq = _delimSeqMap.get(name.toUpperCase());
+        }
+        return seq;
     }
 
     /**
@@ -226,6 +233,17 @@
         _seqs = null;
         return seq;
     }
+    
+    public void addDelimSequenceName(String name, Sequence seq) {
+        SchemaGroup group = getSchemaGroup();
+        if (group != null) {
+            group.addName(name, true);
+        }
+        if (_delimSeqMap == null) {
+            _delimSeqMap = new TreeMap<String, Sequence>();
+        }
+        _delimSeqMap.put(name.toUpperCase(), seq);
+    }
 
     /**
      * Remove the given sequence from the schema.

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGenerator.java Tue Oct 20 16:31:39 2009
@@ -859,10 +859,27 @@
                 continue;
 
             schema = group.getSchema(sequenceSchema);
-            if (schema == null)
+            if (schema == null) {
+                // TODO: temp until a more global name solution is implemented
+                schema = group.getSchema(_dict.addDelimiters(sequenceSchema));
+//                schema = group.getSchema(_dict.delimitString(sequenceSchema, 
+//                    DBDictionary.DBIdentifiers.SEQUENCE_GEN_SCHEMA));
+            }
+            if (schema == null) {
                 schema = group.addSchema(sequenceSchema);
-            if (schema.getSequence(sequenceName) == null)
-                schema.addSequence(sequenceName);
+                // TODO: temp until a more global solution is implemented
+//                group.addDelimSchemaName(_dict.delimitString(sequenceSchema, 
+//                    DBDictionary.DBIdentifiers.SEQUENCE_GEN_SCHEMA), schema);
+                group.addDelimSchemaName(_dict.addDelimiters(sequenceSchema), schema);
+            }
+            if (schema.getSequence(sequenceName) == null) {
+                Sequence seq = schema.addSequence(sequenceName);
+                // TODO: temp until a more global solution is implemented
+//                schema.addDelimSequenceName(_dict.delimitString(sequenceName, 
+//                    DBDictionary.DBIdentifiers.SEQUENCE_GEN_SEQ_NAME), seq);
+                schema.addDelimSequenceName(_dict.addDelimiters(sequenceName), seq);
+            }
+                
         }
     }
 

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/schema/SchemaGroup.java Tue Oct 20 16:31:39 2009
@@ -33,6 +33,7 @@
     implements Cloneable {
 
     private Map _schemaMap = null;
+    private Map<String, Schema> _delimSchemaMap = null;
 
     // cache
     private Schema[] _schemas = null;
@@ -55,7 +56,13 @@
             return null;
         if (name != null)
             name = name.toUpperCase();
-        return (Schema) _schemaMap.get(name);
+        // TODO: temp until a more global solution is implemented
+        Schema schema = (Schema) _schemaMap.get(name);
+        if (schema == null && _delimSchemaMap != null) {
+            schema = _delimSchemaMap.get(name);
+        }
+        return schema;
+//        return (Schema) _schemaMap.get(name);
     }
 
     /**
@@ -79,6 +86,17 @@
         _schemas = null;
         return schema;
     }
+    
+    // TODO: temp until a more global solution is implemented
+    public void addDelimSchemaName(String name, Schema schema) {
+        addName(name,false);
+        if (name != null)
+            name = name.toUpperCase();
+        if (_delimSchemaMap == null) {
+            _delimSchemaMap = new HashMap<String, Schema>();
+        }
+        _delimSchemaMap.put(name, schema);
+    }
 
     /**
      * Remove the given schema from the group.

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DB2Dictionary.java Tue Oct 20 16:31:39 2009
@@ -89,9 +89,6 @@
     
     private int defaultBatchLimit = 100;
     
-    private EnumSet<DBIdentifiers> unsupportedDelimitedIds =
-        EnumSet.of(DBIdentifiers.COLUMN_COLUMN_DEFINITION); 
-    
     public DB2Dictionary() {
         platform = "DB2";
         validationSQL = "SELECT DISTINCT(CURRENT TIMESTAMP) FROM "
@@ -886,14 +883,6 @@
         return recoverable;
     }
     
-    /**
-     * @return the unsupportedDelimitedIds
-     */
-    @Override
-    protected EnumSet<DBIdentifiers> getUnsupportedDelimitedIds() {
-        return unsupportedDelimitedIds;
-    }
-    
     @Override
     protected void setDelimitedCase(DatabaseMetaData metaData) {
         delimitedCase = SCHEMA_CASE_PRESERVE;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java Tue Oct 20 16:31:39 2009
@@ -353,16 +353,18 @@
     protected final Set typeModifierSet = new HashSet();
     
     private boolean delimitIds = false;
-    protected boolean supportsDelimitedIds = false;
-    protected String delimiter = "\"";
+    // Specifies whether or not the specific DB and version supports delimited ids
+    public boolean supportsDelimitedIds = true;
+    public String delimiter = "\""; // This is public so it can be changed by a user with a property
     // Assume mixed case by default.
     protected String delimitedCase = SCHEMA_CASE_PRESERVE;
     
-    // TODO: complete the list
     public static enum DBIdentifiers {
         TABLE_NAME,
         TABLE_SCHEMA,
         TABLE_CATALOG,
+        COLLECTION_TABLE_NAME,
+        COLLECTION_TABLE_SCHEMA,
         SECONDARY_TABLE_NAME,
         SECONDARY_TABLE_SCHEMA,
         SECONDARY_TABLE_CATALOG,
@@ -372,16 +374,48 @@
         TABLE_GEN_VALUE_COLUMN,
         COLUMN_NAME,
         COLUMN_COLUMN_DEFINITION,
-        COLUMN_TABLE
+        COLUMN_TABLE,
+        MAP_KEY_COLUMN_NAME,
+        MAP_KEY_COLUMN_COLUMN_DEFINITION,
+        MAP_KEY_COLUMN_TABLE,
+        JOIN_TABLE_NAME,
+        JOIN_TABLE_SCHEMA,
+        PRIMARY_KEY_JOIN_COLUMN_NAME,
+        PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME,
+        PRIMARY_KEY_JOIN_COLUMN_COLUMN_DEFINITION,
+        JOIN_COLUMN_NAME,
+        JOIN_COLUMN_REFERENCED_COLUMN_NAME,
+        JOIN_COLUMN_COLUMN_DEFINITION,
+        JOIN_COLUMN_TABLE,
+        MAP_KEY_JOIN_COLUMN_NAME,
+        MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME,
+        MAP_KEY_JOIN_COLUMN_COLUMN_DEFINITION,
+        MAP_KEY_JOIN_COLUMN_TABLE,
+        DISCRIMINATOR_COLUMN_NAME,
+        DISCRIMINATOR_COLUMN_COLUMN_DEFINITION,
+        FIELD_RESULT_COLUMN,
+        COLUMN_REUSLT_NAME,
+        SEQUENCE_GEN_SEQ_NAME,
+        SEQUENCE_GEN_SCHEMA,
+        UNIQUE_CONSTRAINT_NAME,
+        UNIQUE_CONSTRAINT_COLUMN_NAMES,
+        ORDER_COLUMN_NAME,
+        ORDER_COLUMN_COLUMN_DEFINITION
+        
     }
     
-    // TODO: describe; maybe make private
+    // This is to temporarily disable support for columnDefinition elements until support is implemented.
     protected EnumSet<DBIdentifiers> unsupportedDelimitedIds =
-        EnumSet.noneOf(DBIdentifiers.class);
-    // TODO
-    // Should this be EnumSet.<DBIdentifiers>noneOf(....)
-    // or EnumSet<DBIdentifiers>.noneOf....?
-
+        EnumSet.of(DBIdentifiers.COLUMN_COLUMN_DEFINITION,
+            DBIdentifiers.DISCRIMINATOR_COLUMN_COLUMN_DEFINITION,
+            DBIdentifiers.JOIN_COLUMN_COLUMN_DEFINITION,
+            DBIdentifiers.MAP_KEY_COLUMN_COLUMN_DEFINITION,
+            DBIdentifiers.MAP_KEY_JOIN_COLUMN_COLUMN_DEFINITION,
+            DBIdentifiers.PRIMARY_KEY_JOIN_COLUMN_COLUMN_DEFINITION); 
+    
+//    protected EnumSet<DBIdentifiers> unsupportedDelimitedIds =
+//        EnumSet.noneOf(DBIdentifiers.class);
+    
     /**
      * If a native query begins with any of the values found here then it will
      * be treated as a select statement.  
@@ -3242,7 +3276,6 @@
                 return name;
             }
         }
-        // TODO: This is the original. Should the db supported case be checked?
         return name.toUpperCase();
     }
     
@@ -4188,7 +4221,7 @@
             return null;
 
         // Handle delimited string differently. Return unquoted name.
-        if (delimitIds || isDelimited(objectName)) {
+        if (isDelimitIds() || isDelimited(objectName)) {
             String delimCase = getDelimitedCase();
             if (SCHEMA_CASE_UPPER.equals(delimCase)) {
                 objectName.toUpperCase();
@@ -4933,8 +4966,8 @@
     }
     
     public String delimitString(String name, DBIdentifiers type) {
-        if (StringUtils.isEmpty(name)) {
-            return null;
+        if (StringUtils.isEmpty(name) || type == null) {
+            return name;
         }
         
         if (!getSupportsDelimitedIds()) {
@@ -4943,16 +4976,30 @@
             return name;
         }
         
-        if (!delimitIds) {
-            return name;
+        if (!isDelimitIds()) {
+            return convertQuotes(name);
         }
         // TODO: merge with if stmt above (maybe not, may want to log this)
         if (!supportsDelimitedId(type)) {
             // TODO: log
             return name;
         }
-        String delimitedString = delimiter + name + delimiter;
-        return delimitedString;
+        return addDelimiters(name);
+    }
+    
+    public void delimitArray(String[] names, DBIdentifiers type) {
+//        String[] delimNames = new String[names.length];
+        for (int i = 0; i < names.length; i++) {
+            names[i] = delimitString(names[i], type);
+        }
+    }
+    
+    private String convertQuotes(String name) {
+        if (name.startsWith("\"") && name.endsWith("\"")) {
+            return getDelimiter() + name.substring(1, name.length() - 1) + getDelimiter();
+        }
+        
+        return name;
     }
 
     /**
@@ -5057,7 +5104,12 @@
         xmlTypeEncoding = encoding;
     }
     
-    // TODO: Should we pass in combining char, or just assume '_'?
+    /**
+     * Combine a number of names into 1 name with each part separated by an underscore ("_").
+     * If a name part is delimited, remove the delimiters.
+     * @param names
+     * @return combined name
+     */
     public String combineNames(String... names) {
         boolean delimited = false;
         String combined = null;

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DerbyDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DerbyDictionary.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DerbyDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DerbyDictionary.java Tue Oct 20 16:31:39 2009
@@ -40,9 +40,6 @@
      */
     public boolean shutdownOnClose = true;
     
-    private EnumSet<DBIdentifiers> unsupportedDelimitedIds =
-        EnumSet.of(DBIdentifiers.COLUMN_COLUMN_DEFINITION); 
-
     public DerbyDictionary() {
         platform = "Apache Derby";
         validationSQL = "VALUES(1)";
@@ -158,12 +155,4 @@
         return recoverable;
     }
 
-    /**
-     * @return the unsupportedDelimitedIds
-     */
-    @Override
-    protected EnumSet<DBIdentifiers> getUnsupportedDelimitedIds() {
-        return unsupportedDelimitedIds;
-    }
-
 }

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java (original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MySQLDictionary.java Tue Oct 20 16:31:39 2009
@@ -139,6 +139,8 @@
 
         typeModifierSet.addAll(Arrays.asList(new String[] { "UNSIGNED",
             "ZEROFILL" }));
+
+        delimiter = "`";
     }
 
     public void connectedConfiguration(Connection conn) throws SQLException {

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java (original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/meta/SequenceMetaData.java Tue Oct 20 16:31:39 2009
@@ -344,12 +344,12 @@
      * Add standard properties to the given properties buffer.
      */
     protected void addStandardProperties(StringBuffer props) {
-        appendProperty(props, PROP_SEQUENCE, _sequence);
+        appendProperty(props, PROP_SEQUENCE, "\"" + _sequence + "\"");
         appendProperty(props, PROP_INITIAL_VALUE, _initial);
         appendProperty(props, PROP_ALLOCATE, _allocate);
         appendProperty(props, PROP_INCREMENT, _increment);
-        appendProperty(props, PROP_SCHEMA, _schema);
-        appendProperty(props, PROP_CATALOG, _catalog);
+        appendProperty(props, PROP_SCHEMA, "\"" + _schema + "\"");
+        appendProperty(props, PROP_CATALOG, "\"" + _catalog + "\"");
     }
 
     /**

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/AnnotationPersistenceMappingParser.java Tue Oct 20 16:31:39 2009
@@ -255,11 +255,8 @@
 
         meta = (SequenceMapping) getRepository().addSequenceMetaData(name);
         meta.setSequencePlugin(SequenceMapping.IMPL_VALUE_TABLE);
-        String schema = _dict.delimitString(gen.schema(), 
-            DBDictionary.DBIdentifiers.TABLE_GEN_SCHEMA);
-        String table = _dict.delimitString(gen.table(), 
-            DBDictionary.DBIdentifiers.TABLE_GEN_TABLE);
-        meta.setTable(toTableName(schema,table));
+        meta.setTable(toTableName(gen.schema(), gen.table(),
+            DBDictionary.DBIdentifiers.TABLE_GEN_SCHEMA, DBDictionary.DBIdentifiers.TABLE_GEN_TABLE));
         String pkColumnName = _dict.delimitString(gen.pkColumnName(), 
             DBDictionary.DBIdentifiers.TABLE_GEN_PK_COLUMN);
         meta.setPrimaryKeyColumn(pkColumnName);
@@ -485,15 +482,17 @@
     /**
      * Create a new schema column with information from the given annotation.
      */
-    private static Column newColumn(PrimaryKeyJoinColumn join) {
+    private Column newColumn(PrimaryKeyJoinColumn join) {
         Column col = new Column();
         col.setFlag(Column.FLAG_PK_JOIN, true);
         if (!StringUtils.isEmpty(join.name()))
-            col.setName(join.name());
+            col.setName(_dict.delimitString(join.name(), DBDictionary.DBIdentifiers.PRIMARY_KEY_JOIN_COLUMN_NAME));
         if (!StringUtils.isEmpty(join.columnDefinition()))
-            col.setTypeName(join.columnDefinition());
+            col.setTypeName(_dict.delimitString(join.columnDefinition(), 
+                DBDictionary.DBIdentifiers.PRIMARY_KEY_JOIN_COLUMN_COLUMN_DEFINITION));
         if (!StringUtils.isEmpty(join.referencedColumnName()))
-            col.setTarget(join.referencedColumnName());
+            col.setTarget(_dict.delimitString(join.referencedColumnName(),
+                DBDictionary.DBIdentifiers.PRIMARY_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME));
         return col;
     }
 
@@ -534,22 +533,20 @@
      * Set class table.
      */
     private void parseTable(ClassMapping cm, Table table) {
-        String tableName = _dict.delimitString(table.name(), 
-                        DBDictionary.DBIdentifiers.TABLE_NAME);
-        String schemaName = _dict.delimitString(table.schema(),
-            DBDictionary.DBIdentifiers.TABLE_SCHEMA);
-        String fullTableName = toTableName(schemaName, tableName);
-        if (fullTableName != null)
-            cm.getMappingInfo().setTableName(fullTableName);
-
-        addUniqueConstraints(fullTableName, cm, cm.getMappingInfo(), 
-        		table.uniqueConstraints());
+        String tableName = toTableName(table.schema(), table.name(),
+            DBDictionary.DBIdentifiers.TABLE_SCHEMA, DBDictionary.DBIdentifiers.TABLE_NAME);
+        if (tableName != null) {
+            cm.getMappingInfo().setTableName(tableName);
+        }
+        addUniqueConstraints(tableName, cm, cm.getMappingInfo(),
+            table.uniqueConstraints());
     }
     
     Unique createUniqueConstraint(MetaDataContext ctx, UniqueConstraint anno) {
         String[] columnNames = anno.columnNames();
         if (columnNames == null || columnNames.length == 0)
             throw new UserException(_loc.get("unique-no-column", ctx));
+        _dict.delimitArray(columnNames, DBDictionary.DBIdentifiers.UNIQUE_CONSTRAINT_COLUMN_NAMES);
         Unique uniqueConstraint = new Unique();
         for (int i = 0; i < columnNames.length; i++) {
             if (StringUtils.isEmpty(columnNames[i]))
@@ -559,7 +556,7 @@
             column.setName(columnNames[i]);
             uniqueConstraint.addColumn(column);
         }
-        String name = anno.name();
+        String name = _dict.delimitString(anno.name(), DBDictionary.DBIdentifiers.UNIQUE_CONSTRAINT_NAME);
         if (!StringUtils.isEmpty(name)) {
             uniqueConstraint.setName(name);
         }
@@ -583,12 +580,15 @@
     /**
      * Form a qualified table name from a schema and table name.
      */
-    private static String toTableName(String schema, String table) {
+    private String toTableName(String schema, String table, 
+        DBDictionary.DBIdentifiers schemaType, DBDictionary.DBIdentifiers nameType) {
         if (StringUtils.isEmpty(table))
             return null;
         if (StringUtils.isEmpty(schema))
-            return table;
-        return schema + "." + table;
+            return _dict.delimitString(table, nameType);
+        String delimTable = _dict.delimitString(table, nameType);
+        String delimSchema = _dict.delimitString(schema, schemaType);
+        return delimSchema + "." + delimTable;
     }
 
     /**
@@ -622,11 +622,16 @@
                     entityResult.addMapping(entityResult.DISCRIMINATOR,
                         entity.discriminatorColumn());
 
-                for (FieldResult field : entity.fields())
-                    entityResult.addMapping(field.name(), field.column());
+                for (FieldResult field : entity.fields()) {
+                    String column = _dict.delimitString(field.column(), 
+                        DBDictionary.DBIdentifiers.FIELD_RESULT_COLUMN);
+                    entityResult.addMapping(field.name(), column);
+                }
+            }
+            for (ColumnResult column : anno.columns()) {
+                result.addColumnResult(_dict.delimitString(column.name(), 
+                    DBDictionary.DBIdentifiers.COLUMN_REUSLT_NAME));
             }
-            for (ColumnResult column : anno.columns())
-                result.addColumnResult(column.name());
         }
     }
 
@@ -637,9 +642,10 @@
         DiscriminatorColumn dcol) {
         Column col = new Column();
         if (!StringUtils.isEmpty(dcol.name()))
-            col.setName(dcol.name());
+            col.setName(_dict.delimitString(dcol.name(), DBDictionary.DBIdentifiers.DISCRIMINATOR_COLUMN_NAME));
         if (!StringUtils.isEmpty(dcol.columnDefinition()))
-            col.setTypeName(dcol.columnDefinition());
+            col.setTypeName(_dict.delimitString(dcol.columnDefinition(), 
+                DBDictionary.DBIdentifiers.DISCRIMINATOR_COLUMN_COLUMN_DEFINITION));
         Discriminator discrim = cm.getDiscriminator();
         switch (dcol.discriminatorType()) {
             case CHAR:
@@ -1650,7 +1656,8 @@
      */
     private void parseJoinTable(FieldMapping fm, JoinTable join) {
     	FieldMappingInfo info = fm.getMappingInfo();
-        info.setTableName(toTableName(join.schema(), join.name()));
+        info.setTableName(toTableName(join.schema(), join.name(),
+            DBDictionary.DBIdentifiers.JOIN_TABLE_SCHEMA, DBDictionary.DBIdentifiers.JOIN_TABLE_NAME));
         parseJoinColumns(fm, info, false, join.joinColumns());
         parseJoinColumns(fm, fm.getElementMapping().getValueInfo(), false,
             join.inverseJoinColumns());
@@ -1672,8 +1679,9 @@
         for (int i = 0; i < joins.length; i++) {
             cols.add(newColumn(joins[i]));
             unique |= (joins[i].unique()) ? TRUE : FALSE;
+            String table = _dict.delimitString(joins[i].table(), DBDictionary.DBIdentifiers.JOIN_COLUMN_TABLE);
             secondary = trackSecondaryTable(fm, secondary,
-                joins[i].table(), i);
+                table, i);
             if (!secondaryAllowed && secondary != null)
                 throw new MetaDataException(_loc.get("bad-second", fm));
         }
@@ -1686,14 +1694,16 @@
     /**
      * Create a new schema column with information from the given annotation.
      */
-    private static Column newColumn(JoinColumn join) {
+    private Column newColumn(JoinColumn join) {
         Column col = new Column();
         if (!StringUtils.isEmpty(join.name()))
-            col.setName(join.name());
+            col.setName(_dict.delimitString(join.name(), DBDictionary.DBIdentifiers.JOIN_COLUMN_NAME));
         if (!StringUtils.isEmpty(join.columnDefinition()))
-            col.setTypeName(join.columnDefinition());
+            col.setTypeName(_dict.delimitString(join.columnDefinition(), 
+                DBDictionary.DBIdentifiers.JOIN_COLUMN_COLUMN_DEFINITION));
         if (!StringUtils.isEmpty(join.referencedColumnName()))
-            col.setTarget(join.referencedColumnName());
+            col.setTarget(_dict.delimitString(join.referencedColumnName(), 
+                DBDictionary.DBIdentifiers.JOIN_COLUMN_REFERENCED_COLUMN_NAME));
         col.setNotNull(!join.nullable());
         col.setFlag(Column.FLAG_UNINSERTABLE, !join.insertable());
         col.setFlag(Column.FLAG_UNUPDATABLE, !join.updatable());
@@ -1867,7 +1877,7 @@
      */
     protected void parseContainerTable(FieldMapping fm, ContainerTable ctbl) {
         fm.getMappingInfo().setTableName(toTableName(ctbl.schema(),
-            ctbl.name()));
+            ctbl.name(), null, null));
         parseXJoinColumns(fm, fm.getMappingInfo(), false, ctbl.joinColumns());
         if (ctbl.joinForeignKey().specified())
             parseForeignKey(fm.getMappingInfo(), ctbl.joinForeignKey());
@@ -1880,8 +1890,8 @@
      */
     protected void parseCollectionTable(FieldMapping fm, CollectionTable ctbl) {
         FieldMappingInfo info = fm.getMappingInfo(); 
-        info.setTableName(toTableName(ctbl.schema(),
-            ctbl.name()));
+        info.setTableName(toTableName(ctbl.schema(), ctbl.name(),
+            DBDictionary.DBIdentifiers.COLLECTION_TABLE_SCHEMA, DBDictionary.DBIdentifiers.COLLECTION_TABLE_NAME));
         //ctbl.catalog()
         parseJoinColumns(fm, fm.getMappingInfo(), false, ctbl.joinColumns());
         addUniqueConstraints(info.getTableName(), fm.getDefiningMetaData(), 
@@ -1899,9 +1909,10 @@
 
         Column col = new Column();
         if (!StringUtils.isEmpty(order.name()))
-            col.setName(order.name());
+            col.setName(_dict.delimitString(order.name(), DBDictionary.DBIdentifiers.ORDER_COLUMN_NAME));
         if (!StringUtils.isEmpty(order.columnDefinition()))
-            col.setTypeName(order.columnDefinition());
+            col.setTypeName(_dict.delimitString(order.columnDefinition(), 
+                DBDictionary.DBIdentifiers.ORDER_COLUMN_COLUMN_DEFINITION));
         if (order.precision() != 0)
             col.setSize(order.precision());
         col.setFlag(Column.FLAG_UNINSERTABLE, !order.insertable());
@@ -1917,9 +1928,10 @@
         
         Column col = new Column();
         if (!StringUtils.isEmpty(order.name()))
-            col.setName(order.name());
+            col.setName(_dict.delimitString(order.name(), DBDictionary.DBIdentifiers.ORDER_COLUMN_NAME));
         if (!StringUtils.isEmpty(order.columnDefinition()))
-            col.setTypeName(order.columnDefinition());
+            col.setTypeName(_dict.delimitString(order.columnDefinition(), 
+                DBDictionary.DBIdentifiers.ORDER_COLUMN_COLUMN_DEFINITION));
         col.setNotNull(!order.nullable());
         col.setFlag(Column.FLAG_UNINSERTABLE, !order.insertable());
         col.setFlag(Column.FLAG_UNUPDATABLE, !order.updatable());
@@ -1969,8 +1981,10 @@
     protected void parseMapKeyColumn(FieldMapping fm, MapKeyColumn anno) {
         int unique = 0;
         FieldMappingInfo info = fm.getMappingInfo();
-        if (anno.table() != null && anno.table().length() > 0)
-        info.setTableName(anno.table());
+        if (anno.table() != null && anno.table().length() > 0) {
+            String tableName = _dict.delimitString(anno.table(), DBDictionary.DBIdentifiers.MAP_KEY_COLUMN_TABLE);
+            info.setTableName(tableName);
+        }
         Column col = new Column();
         setupMapKeyColumn(fm, col, anno);
         unique |= (anno.unique()) ? TRUE : FALSE;
@@ -1980,14 +1994,17 @@
     /**
      * Setup the given column with information from the given annotation.
      */
-    private static void setupMapKeyColumn(FieldMapping fm, Column col, 
+    private void setupMapKeyColumn(FieldMapping fm, Column col, 
         MapKeyColumn anno) {
-        if (!StringUtils.isEmpty(anno.name()))
-            col.setName(anno.name());
+        if (!StringUtils.isEmpty(anno.name())) {
+            String name = _dict.delimitString(anno.name(), DBDictionary.DBIdentifiers.MAP_KEY_COLUMN_NAME);
+            col.setName(name);
+        }
         else 
             col.setName(fm.getName() + "_" + "KEY");
         if (!StringUtils.isEmpty(anno.columnDefinition()))
-            col.setTypeName(anno.columnDefinition());
+            col.setTypeName(_dict.delimitString(anno.columnDefinition(), 
+                DBDictionary.DBIdentifiers.MAP_KEY_COLUMN_COLUMN_DEFINITION));
         if (anno.precision() != 0)
             col.setSize(anno.precision());
         else if (anno.length() != 255)
@@ -2033,18 +2050,32 @@
     /**
      *  Create a new schema column with information from the given annotation.
      */
-    private static Column newColumn(MapKeyJoinColumn join) {
+    private Column newColumn(MapKeyJoinColumn join) {
         Column col = new Column();
         if (!StringUtils.isEmpty(join.name()))
-            col.setName(join.name());
+            col.setName(_dict.delimitString(join.name(), DBDictionary.DBIdentifiers.MAP_KEY_JOIN_COLUMN_NAME));
         if (!StringUtils.isEmpty(join.columnDefinition()))
-            col.setName(join.columnDefinition());
+            col.setTypeName(_dict.delimitString(join.columnDefinition(), 
+                DBDictionary.DBIdentifiers.MAP_KEY_JOIN_COLUMN_COLUMN_DEFINITION));
         if (!StringUtils.isEmpty(join.referencedColumnName()))
-            col.setTarget(join.referencedColumnName());
+            col.setTarget(_dict.delimitString(join.referencedColumnName(), 
+                DBDictionary.DBIdentifiers.MAP_KEY_JOIN_COLUMN_REFERENCED_COLUMN_NAME));
         col.setNotNull(!join.nullable());
         col.setFlag(Column.FLAG_UNINSERTABLE, !join.insertable());
         col.setFlag(Column.FLAG_UNUPDATABLE, !join.updatable ());
         return col;
     }
     
+    @Override
+    protected String delimitString(String name, DBIdentifiers type) {
+        if (type == DBIdentifiers.SEQUENCE_GEN_SCHEMA) {
+            return _dict.delimitString(name, DBDictionary.DBIdentifiers.SEQUENCE_GEN_SCHEMA);
+        }
+        else if (type == DBIdentifiers.SEQUENCE_GEN_SEQ_NAME) {
+            return _dict.delimitString(name, DBDictionary.DBIdentifiers.SEQUENCE_GEN_SEQ_NAME);
+        }
+        
+        return name;
+    }
+    
 }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingParser.java Tue Oct 20 16:31:39 2009
@@ -51,6 +51,7 @@
 import org.apache.openjpa.jdbc.schema.Column;
 import org.apache.openjpa.jdbc.schema.Table;
 import org.apache.openjpa.jdbc.schema.Unique;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.lib.log.Log;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.meta.ClassMetaData;
@@ -1405,5 +1406,13 @@
         private String _defTable;
         private String _attrName;
         private EnumSet<UniqueFlag> _unique;
-    }    
+    }  
+    
+    @Override
+    protected boolean startDelimitedIdentifiers() {
+        JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
+        DBDictionary dict = conf.getDBDictionaryInstance();
+        dict.setDelimitIds(true);
+        return true;
+    }
 }

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,105 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.Column;
+import javax.persistence.DiscriminatorColumn;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.Table;
+
+@Entity
+@Inheritance
+@DiscriminatorColumn(name="discr col", columnDefinition="VARCHAR(10)")
+@Table(name="Car")
+public class Car {
+    @Id
+    private int id;
+    
+    @Column(name="car model")
+    protected String model;
+    @Column(name="car color")
+    protected String color;
+    @Column(name="model year")
+    protected String modelYear;
+
+    public Car() {}
+    
+    public Car(int id) {
+        this.id = id;
+    }
+    
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the model
+     */
+    public String getModel() {
+        return model;
+    }
+
+    /**
+     * @param model the type to set
+     */
+    public void setModel(String model) {
+        this.model = model;
+    }
+
+    /**
+     * @return the color
+     */
+    public String getColor() {
+        return color;
+    }
+
+    /**
+     * @param color the color to set
+     */
+    public void setColor(String color) {
+        this.color = color;
+    }
+
+    /**
+     * @return the modelYear
+     */
+    public String getModelYear() {
+        return modelYear;
+    }
+
+    /**
+     * @param modelYear the modelYear to set
+     */
+    public void setModelYear(String modelYear) {
+        this.modelYear = modelYear;
+    }
+
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car2.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car2.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,99 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.ColumnResult;
+import javax.persistence.DiscriminatorColumn;
+import javax.persistence.Entity;
+import javax.persistence.EntityResult;
+import javax.persistence.FieldResult;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.SqlResultSetMapping;
+import javax.persistence.Table;
+
+@SqlResultSetMapping(name="CarResultSet",
+    entities={@EntityResult(entityClass=Car2.class,
+        fields={
+        @FieldResult(name="model", column="car model"),
+        @FieldResult(name="color", column="car color")
+    },
+    discriminatorColumn="discr col")},
+    columns={@ColumnResult(name="model year")})
+    
+@Entity
+@Inheritance
+@DiscriminatorColumn(name="discr col", columnDefinition="VARCHAR(10)")
+@Table(name="Car2")
+public class Car2 {
+    @Id
+    private int id;
+    
+    protected String model;
+    protected String color;
+
+    public Car2() {}
+    
+    public Car2(int id) {
+        this.id = id;
+    }
+    
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the model
+     */
+    public String getModel() {
+        return model;
+    }
+
+    /**
+     * @param type the type to set
+     */
+    public void setModel(String model) {
+        this.model = model;
+    }
+
+    /**
+     * @return the color
+     */
+    public String getColor() {
+        return color;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String color) {
+        this.color = color;
+    }
+
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Car2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+
+@Entity
+@DiscriminatorValue("Chevrolet")
+public class Chevrolet extends Car {
+    public Chevrolet() {}
+    
+    public Chevrolet(int id) {
+        super(id);
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet2.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet2.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+
+@Entity
+@DiscriminatorValue("Chevrolet")
+public class Chevrolet2 extends Car2 {
+    public Chevrolet2() {}
+    
+    public Chevrolet2(int id) {
+        super(id);
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Chevrolet2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityA.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityA.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityA.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityA.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,175 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.persistence.CollectionTable;
+import javax.persistence.Column;
+import javax.persistence.ElementCollection;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.MapKeyColumn;
+import javax.persistence.OrderColumn;
+import javax.persistence.SecondaryTable;
+import javax.persistence.Table;
+import javax.persistence.TableGenerator;
+import javax.persistence.UniqueConstraint;
+
+@Entity
+@Table(name="primary entityA", schema="delim id2")
+@SecondaryTable(name="secondary EntityA", schema="delim id2",
+    uniqueConstraints=
+        @UniqueConstraint(name="sec unq", 
+            columnNames={"secondary name"}))
+public class EntityA {
+    @TableGenerator(name = "id_gen", table = "id gen", schema = "delim id2",
+        pkColumnName = "gen pk", valueColumnName = "gen value")
+    @GeneratedValue(strategy = GenerationType.TABLE, generator = "id_gen")
+    @Id
+    private int id;
+    @Column(name="primary name", columnDefinition="VARCHAR")
+    private String name;
+    
+    @Column(name="secondary name", table="secondary EntityA")
+    private String secName;
+    
+    @ElementCollection
+    // CollectionTable with default name generation
+    @CollectionTable
+    private Set<String> collectionSet = new HashSet<String>();
+    
+    @ElementCollection
+    @OrderColumn(name="order col")
+    @CollectionTable(name="collection delim set", schema="delim id2")
+    private Set<String> collectionDelimSet = new HashSet<String>();
+    
+    @ElementCollection
+    // MapKeyColumn with default name generation
+    @MapKeyColumn
+    private Map<String, String> collectionMap = new HashMap<String, String>();
+    
+    @ElementCollection
+    @MapKeyColumn(name="map key", columnDefinition="varchar(20)", table="map key table")
+    private Map<String, String> delimCollectionMap = 
+        new HashMap<String, String>();
+    
+    public EntityA(){
+    }
+    
+    public EntityA(int id, String name) {
+        this.name=name;
+    }
+    
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return the secName
+     */
+    public String getSecName() {
+        return secName;
+    }
+
+    /**
+     * @param secName the secName to set
+     */
+    public void setSecName(String secName) {
+        this.secName = secName;
+    }
+
+    /**
+     * @return the collectionSet
+     */
+    public Set<String> getCollectionSet() {
+        return collectionSet;
+    }
+
+    /**
+     * @param collectionSet the collectionSet to set
+     */
+    public void setCollectionSet(Set<String> collectionSet) {
+        this.collectionSet = collectionSet;
+    }
+    
+    /**
+     * Add an item to the collectionSet
+     * @param item
+     */
+    public void addCollectionSet(String item) {
+        collectionSet.add(item);
+    }
+
+    public Set<String> getCollectionDelimSet() {
+        return collectionDelimSet;
+    }
+
+    public void setCollectionDelimSet(Set<String> collectionDelimSet) {
+        this.collectionDelimSet = collectionDelimSet;
+    }
+    
+    public void addCollectionDelimSet(String item) {
+        this.collectionDelimSet.add(item);
+    }
+
+    /**
+     * @return the delimCollectionMap
+     */
+    public Map<String, String> getDelimCollectionMap() {
+        return delimCollectionMap;
+    }
+
+    /**
+     * @param delimCollectionMap the delimCollectionMap to set
+     */
+    public void setDelimCollectionMap(Map<String, String> delimCollectionMap) {
+        this.delimCollectionMap = delimCollectionMap;
+    }
+    
+    public void addDelimCollectionMap(String key, String value) {
+        this.delimCollectionMap.put(key, value);
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityA.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityB.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityB.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityB.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityB.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,70 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.SequenceGenerator;
+import javax.persistence.Table;
+
+@Entity
+@Table(name="primary entityB", schema="delim id2")
+public class EntityB {
+    @Id
+    @SequenceGenerator(name="entityB_seq_gen_name", 
+        sequenceName="entityB seq gen", schema="delim id2")
+    @GeneratedValue(strategy=GenerationType.SEQUENCE, 
+        generator="entityB_seq_gen_name")
+    private int id;
+    @Column(name="e_name")
+    private String name;
+    
+    public EntityB(String name) {
+        this.name = name;
+    }
+    
+    
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityB.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityE.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityE.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityE.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityE.java Tue Oct 20 16:31:39 2009
@@ -31,7 +31,7 @@
 public class EntityE {
     @Id
     @SequenceGenerator(name="entityE_seq_gen_name", 
-        sequenceName="\"entityE_seq_gen\"", schema="\"delim_id\"")
+        sequenceName="\"entityE seq gen\"", schema="\"delim id\"")
     @GeneratedValue(strategy=GenerationType.SEQUENCE, 
         generator="entityE_seq_gen_name")
     private int id;

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityF.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityF.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityF.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityF.java Tue Oct 20 16:31:39 2009
@@ -42,7 +42,7 @@
         @UniqueConstraint(columnNames={"\"f name\"", "f_nonDelimName"}))
 @SecondaryTable(name="\"secondary entityF\"", schema="\"delim id\"",
     uniqueConstraints=
-        @UniqueConstraint(name="\"sec_unq\"", 
+        @UniqueConstraint(name="\"sec unq\"", 
             columnNames={"\"secondary name\""}))         
 public class EntityF {
     @TableGenerator(name = "f_id_gen", table = "\"f_id_gen\"", 

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityG.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityG.java?rev=827727&r1=827726&r2=827727&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityG.java (original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityG.java Tue Oct 20 16:31:39 2009
@@ -18,13 +18,12 @@
  */
 package org.apache.openjpa.persistence.delimited.identifiers;
 
-import javax.persistence.Column;
 import javax.persistence.Entity;
 import javax.persistence.Id;
 import javax.persistence.Table;
 
 @Entity
-@Table(name="\"entity d4\"", schema="\"delim id\"")
+@Table(name="\"entity g\"", schema="\"delim id\"")
 public class EntityG {
     @Id
     int id;

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityH.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityH.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityH.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityH.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,183 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinTable;
+import javax.persistence.ManyToMany;
+import javax.persistence.MapKeyJoinColumn;
+import javax.persistence.OneToOne;
+import javax.persistence.PrimaryKeyJoinColumn;
+import javax.persistence.SecondaryTable;
+import javax.persistence.Table;
+
+@Entity
+@Table(name="entity h", schema="delim id2")
+@SecondaryTable(name="h sec join table", schema="delim id2",
+    pkJoinColumns=@PrimaryKeyJoinColumn(name="entity h",
+        referencedColumnName="h id"))
+public class EntityH {
+    @Id
+    @Column(name="h id")
+    private int id;
+    private String name;
+    
+    @Column(table="h sec join table")
+    private String secName;
+    
+    @ManyToMany
+    @JoinTable(name="h i", schema="delim id2")
+    private Collection<EntityI> entityIs = new HashSet<EntityI>();
+    
+    @OneToOne
+    @JoinColumn(name="enti2 id", referencedColumnName="entityI2 id", table="join column")
+    private EntityI2 entityI2;
+    
+    @ManyToMany
+    @JoinTable(name="map3 join table", schema="delim id2")
+    @MapKeyJoinColumn(name="map_ei3", referencedColumnName="entityI3 id")
+    Map<EntityI3,EntityI4> map = new HashMap<EntityI3,EntityI4>();
+    
+    @ManyToMany
+    @JoinTable(name="map4 join table", schema="delim id2")
+    @MapKeyJoinColumn(name="map ei4", 
+        referencedColumnName="entityI4 id", table="map key join column")
+    Map<EntityI4,EntityI3> map2 = new HashMap<EntityI4,EntityI3>();
+
+    public EntityH() {}
+    
+    public EntityH(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return the secName
+     */
+    public String getSecName() {
+        return secName;
+    }
+
+    /**
+     * @param secName the secName to set
+     */
+    public void setSecName(String secName) {
+        this.secName = secName;
+    }
+    
+    public Collection<EntityI> getEntityIs() {
+        return entityIs;
+    }
+    /**
+     * @param entityIs the entityIs to set
+     */
+    public void setEntityIs(Collection<EntityI> entityIs) {
+        this.entityIs = entityIs;
+    }
+    
+    public void addEntityI(EntityI entityI) {
+        entityIs.add(entityI);
+    }
+
+    /**
+     * @return the entityI2
+     */
+    public EntityI2 getEntityI2() {
+        return entityI2;
+    }
+
+    /**
+     * @param entityI2 the entityI2 to set
+     */
+    public void setEntityI2(EntityI2 entityI2) {
+        this.entityI2 = entityI2;
+    }
+
+    /**
+     * @return the map
+     */
+    public Map<EntityI3, EntityI4> getMap() {
+        return map;
+    }
+
+    /**
+     * @param map the map to set
+     */
+    public void setMap(Map<EntityI3, EntityI4> map) {
+        this.map = map;
+    }
+    
+    public void addMapValues(EntityI3 key, EntityI4 value) {
+        map.put(key, value);
+    }
+
+    /**
+     * @return the map2
+     */
+    public Map<EntityI4, EntityI3> getMap2() {
+        return map2;
+    }
+
+    /**
+     * @param map2 the map2 to set
+     */
+    public void setMap2(Map<EntityI4, EntityI3> map2) {
+        this.map2 = map2;
+    }
+    
+    public void addMap2Values(EntityI4 key, EntityI3 value) {
+        map2.put(key, value);
+    }
+
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityH.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,89 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import java.util.Collection;
+import java.util.HashSet;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToMany;
+import javax.persistence.Table;
+
+@Entity
+@Table(name="entity i", schema="delim id2")
+public class EntityI {
+    @Id
+    private int id;
+    private String name;
+    @ManyToMany(mappedBy="entityIs")
+    private Collection<EntityH> entityHs = new HashSet<EntityH>();
+    
+    public EntityI() {}
+    
+    public EntityI(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return the entityHs
+     */
+    public Collection<EntityH> getEntityHs() {
+        return entityHs;
+    }
+
+    /**
+     * @param entityHs the entityHs to set
+     */
+    public void setEntityHs(Collection<EntityH> entityHs) {
+        this.entityHs = entityHs;
+    }
+    
+    public void addEntityH(EntityH entityH) {
+        entityHs.add(entityH);
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI2.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI2.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,87 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToOne;
+import javax.persistence.PrimaryKeyJoinColumn;
+import javax.persistence.Table;
+
+@Entity
+@Table(name="entity i2", schema="delim id2")
+public class EntityI2 {
+    @Id
+    @Column(name="entityI2 id")
+    private int id;
+    private String name;
+    
+    @OneToOne
+    @PrimaryKeyJoinColumn
+    private EntityI3 entityI3;
+    
+    public EntityI2() {}
+    
+    public EntityI2(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * @return the entityI3
+     */
+    public EntityI3 getEntityI3() {
+        return entityI3;
+    }
+
+    /**
+     * @param entityI3 the entityI3 to set
+     */
+    public void setEntityI3(EntityI3 entityI3) {
+        this.entityI3 = entityI3;
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI3.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI3.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI3.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI3.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name="entity i3", schema="delim id2")
+public class EntityI3 {
+    @Id
+    @Column(name="entityI3 id")
+    int id;
+    String name;
+    
+    public EntityI3() {}
+    
+    public EntityI3(int id) {
+        this.id = id;
+    }
+    
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI3.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI4.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI4.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI4.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI4.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,65 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity
+@Table(name="entity i4", schema="delim id2")
+public class EntityI4 {
+    @Id
+    @Column(name="entityI4 id")
+    int id;
+    String name;
+    
+    public EntityI4() {}
+    
+    public EntityI4(int id) {
+        this.id = id;
+    }
+    
+    /**
+     * @return the id
+     */
+    public int getId() {
+        return id;
+    }
+    /**
+     * @param id the id to set
+     */
+    public void setId(int id) {
+        this.id = id;
+    }
+    /**
+     * @return the name
+     */
+    public String getName() {
+        return name;
+    }
+    /**
+     * @param name the name to set
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/EntityI4.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+
+@Entity
+@DiscriminatorValue("Pontiac")
+public class Pontiac extends Car {
+    public Pontiac() {}
+    
+    public Pontiac(int id) {
+        super(id);
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac2.java?rev=827727&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac2.java Tue Oct 20 16:31:39 2009
@@ -0,0 +1,32 @@
+/*
+ * 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.openjpa.persistence.delimited.identifiers;
+
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Entity;
+
+@Entity
+@DiscriminatorValue("Pontiac")
+public class Pontiac2 extends Car2 {
+    public Pontiac2() {}
+    
+    public Pontiac2(int id) {
+        super(id);
+    }
+}

Propchange: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/delimited/identifiers/Pontiac2.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message