jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r772954 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/
Date Fri, 08 May 2009 12:23:31 GMT
Author: thomasm
Date: Fri May  8 12:23:30 2009
New Revision: 772954

URL: http://svn.apache.org/viewvc?rev=772954&view=rev
Log:
JCR-97 Code cleanup

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/PostgreSQLPersistenceManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java?rev=772954&r1=772953&r2=772954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
Fri May  8 12:23:30 2009
@@ -242,8 +242,8 @@
         if (getDriver() == null) {
             setDriver(DERBY_EMBEDDED_DRIVER);
         }
-        if (getSchema() == null) {
-            setSchema("derby");
+        if (getDatabaseType() == null) {
+            setDatabaseType("derby");
         }
         if (getUrl() == null) {
             setUrl("jdbc:derby:" + context.getHomeDir().getPath() + "/db/itemState;create=true");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java?rev=772954&r1=772953&r2=772954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
Fri May  8 12:23:30 2009
@@ -81,8 +81,8 @@
         if (getUrl() == null) {
             setUrl("jdbc:h2:file:" + context.getHomeDir().getPath() + "/db/itemState");
         }
-        if (getSchema() == null) {
-            setSchema("h2");
+        if (getDatabaseType() == null) {
+            setDatabaseType("h2");
         }
         if (getSchemaObjectPrefix() == null) {
             setSchemaObjectPrefix("");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java?rev=772954&r1=772953&r2=772954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
Fri May  8 12:23:30 2009
@@ -43,7 +43,7 @@
 
     public MSSqlPersistenceManager() {
         setDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver");
-        setSchema("mssql");
+        setDatabaseType("mssql");
     }
 
     protected String createSchemaSQL(String sql) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java?rev=772954&r1=772953&r2=772954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
Fri May  8 12:23:30 2009
@@ -45,8 +45,8 @@
         if (getDriver() == null) {
             setDriver("org.gjt.mm.mysql.Driver");
         }
-        if (getSchema() == null) {
-            setSchema("mysql");
+        if (getDatabaseType() == null) {
+            setDatabaseType("mysql");
         }
         super.init(context);
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java?rev=772954&r1=772953&r2=772954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java
Fri May  8 12:23:30 2009
@@ -63,7 +63,7 @@
      */
     private static Logger log = LoggerFactory.getLogger(Oracle9PersistenceManager.class);
 
-    private Class blobClass;
+    private Class< ? > blobClass;
     private Integer duractionSessionConstant;
     private Integer modeReadWriteConstant;
 
@@ -197,7 +197,7 @@
         Method open = blobClass.getMethod("open", new Class[]{Integer.TYPE});
         open.invoke(blob, new Object[]{modeReadWriteConstant});
         Method getBinaryOutputStream = blobClass.getMethod("getBinaryOutputStream", new Class[0]);
-        OutputStream out = (OutputStream) getBinaryOutputStream.invoke(blob, null);
+        OutputStream out = (OutputStream) getBinaryOutputStream.invoke(blob);
         try {
             IOUtils.copy(in, out);
         } finally {
@@ -208,7 +208,7 @@
             out.close();
         }
         Method close = blobClass.getMethod("close", new Class[0]);
-        close.invoke(blob, null);
+        close.invoke(blob);
         return (Blob) blob;
     }
 
@@ -218,10 +218,12 @@
     protected void freeTemporaryBlob(Object blob) throws Exception {
         // blob.freeTemporary();
         Method freeTemporary = blobClass.getMethod("freeTemporary", new Class[0]);
-        freeTemporary.invoke(blob, null);
+        freeTemporary.invoke(blob);
     }
 
-    //--------------------------------------------------------< inner classes >
+    /**
+     * A blob store specially for Oracle 9.
+     */
     class OracleBLOBStore extends DbBlobStore {
 
         public OracleBLOBStore() throws SQLException {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java?rev=772954&r1=772953&r2=772954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
Fri May  8 12:23:30 2009
@@ -95,8 +95,8 @@
         if (getUrl() == null) {
             setUrl("jdbc:oracle:thin:@127.0.0.1:1521:xe");
         }
-        if (getSchema() == null) {
-            setSchema("oracle");
+        if (getDatabaseType() == null) {
+            setDatabaseType("oracle");
         }
         if (getSchemaObjectPrefix() == null) {
             setSchemaObjectPrefix(context.getHomeDir().getName() + "_");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/PostgreSQLPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/PostgreSQLPersistenceManager.java?rev=772954&r1=772953&r2=772954&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/PostgreSQLPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/PostgreSQLPersistenceManager.java
Fri May  8 12:23:30 2009
@@ -65,8 +65,8 @@
         if (getDriver() == null) {
             setDriver("org.postgresql.Driver");
         }
-        if (getSchema() == null) {
-            setSchema("postgresql");
+        if (getDatabaseType() == null) {
+            setDatabaseType("postgresql");
         }
         super.init(context);
     }



Mime
View raw message