openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1030579 - in /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc: conf/JDBCConfigurationImpl.java sql/DBDictionaryFactory.java sql/MaxDBDictionary.java
Date Wed, 03 Nov 2010 18:07:08 GMT
Author: mikedd
Date: Wed Nov  3 18:07:07 2010
New Revision: 1030579

URL: http://svn.apache.org/viewvc?rev=1030579&view=rev
Log:
OPENJPA-1864: Add db dictionary for MaxDB & alias in JDBCConfImpl. 

Added:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MaxDBDictionary.java
  (with props)
Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java?rev=1030579&r1=1030578&r2=1030579&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/conf/JDBCConfigurationImpl.java
Wed Nov  3 18:07:07 2010
@@ -39,6 +39,7 @@ import org.apache.openjpa.jdbc.schema.Dr
 import org.apache.openjpa.jdbc.schema.SchemaFactory;
 import org.apache.openjpa.jdbc.sql.DBDictionary;
 import org.apache.openjpa.jdbc.sql.DBDictionaryFactory;
+import org.apache.openjpa.jdbc.sql.MaxDBDictionary;
 import org.apache.openjpa.jdbc.sql.SQLFactory;
 import org.apache.openjpa.kernel.BrokerImpl;
 import org.apache.openjpa.kernel.StoreContext;
@@ -218,6 +219,7 @@ public class JDBCConfigurationImpl
             "soliddb", "org.apache.openjpa.jdbc.sql.SolidDBDictionary",
             "sqlserver", "org.apache.openjpa.jdbc.sql.SQLServerDictionary",
             "sybase", "org.apache.openjpa.jdbc.sql.SybaseDictionary",
+            "maxdb", MaxDBDictionary.class.getCanonicalName(),
         };
         dbdictionaryPlugin.setAliases(aliases);
         dbdictionaryPlugin.setInstantiatingGetter("getDBDictionaryInstance");

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java?rev=1030579&r1=1030578&r2=1030579&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionaryFactory.java
Wed Nov  3 18:07:07 2010
@@ -259,6 +259,9 @@ public class DBDictionaryFactory {
             return CacheDictionary.class.getName();
         if (prod.indexOf("derby") != -1)
             return dbdictionaryPlugin.unalias("derby");
+        if (prod.indexOf("sapdb") != -1) {
+            return dbdictionaryPlugin.unalias("maxdb");
+        }
         // test h2 in a special way, because there's a decent chance the string 
         // h2 could appear in the URL of another database
         if (prod.indexOf("jdbc:h2:") != -1)
@@ -278,8 +281,6 @@ public class DBDictionaryFactory {
             return DBDictionary.class.getName();
         if (prod.indexOf("daffodil") != -1)
             return DBDictionary.class.getName();
-        if (prod.indexOf("sapdb") != -1)
-            return DBDictionary.class.getName();
         if (prod.indexOf("idb") != -1) // instantdb
             return DBDictionary.class.getName();
 

Added: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MaxDBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MaxDBDictionary.java?rev=1030579&view=auto
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MaxDBDictionary.java
(added)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MaxDBDictionary.java
Wed Nov  3 18:07:07 2010
@@ -0,0 +1,28 @@
+/*
+ * 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.jdbc.sql;
+
+/**
+ * Database dictionary for using SAP's MaxDB Dictionary. Currently just a placeholder, the
behavior does not differ from
+ * <code> org.apache.openjpa.jdbc.sql.Dictionary</code>
+ *
+ */
+public class MaxDBDictionary extends DBDictionary {
+
+}

Propchange: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/MaxDBDictionary.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message