jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r695887 - in /jackrabbit/branches/1.4/jackrabbit-core: ./ src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
Date Tue, 16 Sep 2008 14:09:49 GMT
Author: jukka
Date: Tue Sep 16 07:09:48 2008
New Revision: 695887

URL: http://svn.apache.org/viewvc?rev=695887&view=rev
Log:
1.4: Merged revision 686688 (JCR-1362)

Modified:
    jackrabbit/branches/1.4/jackrabbit-core/   (props changed)
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java

Propchange: jackrabbit/branches/1.4/jackrabbit-core/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 16 07:09:48 2008
@@ -1 +1 @@
-/jackrabbit/trunk/jackrabbit-core:653417,654078,654514,655917,656240,656655,656664,658583,679389,680135,691550,694164
+/jackrabbit/trunk/jackrabbit-core:653417,654078,654514,655917,656240,656655,656664,658583,679389,680135,686688,691550,694164

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java?rev=695887&r1=695886&r2=695887&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/OracleDatabaseJournal.java
Tue Sep 16 07:09:48 2008
@@ -16,6 +16,10 @@
  */
 package org.apache.jackrabbit.core.journal;
 
+import java.sql.DatabaseMetaData;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
 import org.apache.jackrabbit.util.Text;
 
 /**
@@ -68,4 +72,24 @@
         }
         return Text.replace(sql, TABLE_SPACE_VARIABLE, tspace).trim();
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected boolean tableExists(DatabaseMetaData metaData, String tableName) throws SQLException
{
+        if (metaData.storesLowerCaseIdentifiers()) {
+            tableName = tableName.toLowerCase();
+        } else if (metaData.storesUpperCaseIdentifiers()) {
+            tableName = tableName.toUpperCase();
+        }
+
+        String userName = metaData.getUserName();
+        ResultSet rs = metaData.getTables(null, userName, tableName, null);
+
+        try {
+            return rs.next();
+        } finally {
+            rs.close();
+        }
+    }
 }



Mime
View raw message