db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r538370 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java
Date Tue, 15 May 2007 23:06:24 GMT
Author: arminw
Date: Tue May 15 16:06:23 2007
New Revision: 538370

URL: http://svn.apache.org/viewvc?view=rev&rev=538370
Log:
add PersistenceChecker support

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java?view=diff&rev=538370&r1=538369&r2=538370
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/metadata/JdbcConnectionDescriptor.java
Tue May 15 16:06:23 2007
@@ -22,10 +22,13 @@
 import org.apache.commons.lang.builder.ToStringBuilder;
 import org.apache.commons.lang.builder.ToStringStyle;
 import org.apache.ojb.broker.PBKey;
+import org.apache.ojb.broker.PersistenceChecker;
+import org.apache.ojb.broker.core.PersistenceCheckerSolidImpl;
 import org.apache.ojb.broker.platforms.Platform;
 import org.apache.ojb.broker.platforms.PlatformFactory;
-import org.apache.ojb.broker.util.XmlHelper;
 import org.apache.ojb.broker.util.ConvertHelper;
+import org.apache.ojb.broker.util.ShortcutMapper;
+import org.apache.ojb.broker.util.XmlHelper;
 import org.apache.ojb.broker.util.logging.Logger;
 import org.apache.ojb.broker.util.logging.LoggerFactory;
 
@@ -44,6 +47,8 @@
     public static final int AUTO_COMMIT_SET_TRUE_AND_TEMPORARY_FALSE = 1;
     public static final int AUTO_COMMIT_SET_FALSE = 2;
     protected static final String ATTRIBUTE_NATIVE_LIMIT_OFFSET = "nativeLimitOffset";
+    protected static final String ATTRIBUTE_PERSISTENCE_CHECKER = "persistenceChecker";
+    protected static final String ATTRIBUTE_OBJECT_CONTEXT_MANAGER = "objectContextManager";
 
     private String m_jcdAlias;
     private String m_Dbms;
@@ -65,6 +70,8 @@
     private ConnectionPoolDescriptor cpd;
     private SequenceDescriptor sequenceDescriptor;
     private ObjectCacheDescriptor objectCacheDescriptor;
+    private Class persistenceCheckerClass;
+    //private Class objectContextManagerClass;
 
     private transient DataSource dataSource;
     private transient Platform platform;
@@ -76,6 +83,7 @@
     {
         cpd = new ConnectionPoolDescriptor();
         objectCacheDescriptor = new ObjectCacheDescriptor();
+        sequenceDescriptor = new SequenceDescriptor();
     }
 
     /**
@@ -464,6 +472,38 @@
         return platform;
     }
 
+    public Class getPersistenceChecker()
+    {
+        if(persistenceCheckerClass == null)
+        {
+            String name = getAttribute(ATTRIBUTE_PERSISTENCE_CHECKER);
+            persistenceCheckerClass = ShortcutMapper.resolve(
+                    name, PersistenceChecker.class, PersistenceCheckerSolidImpl.class);
+        }
+        return persistenceCheckerClass;
+    }
+
+    public void setPersistenceChecker(Class persistenceChecker)
+    {
+        this.persistenceCheckerClass = persistenceChecker;
+    }
+
+//    public Class getObjectContextManager()
+//    {
+//        if(objectContextManagerClass == null)
+//        {
+//            String name = getAttribute(ATTRIBUTE_OBJECT_CONTEXT_MANAGER);
+//            objectContextManagerClass = ShortcutMapper.resolve(
+//                    name, ObjectContextManager.class, ObjectContextManagerWeakImpl.class);
+//        }
+//        return objectContextManagerClass;
+//    }
+//
+//    public void setObjectContextManager(Class objectContextManagerClass)
+//    {
+//        this.objectContextManagerClass = objectContextManagerClass;
+//    }
+
     /**
      * Returns a String representation of this class.
      */
@@ -486,7 +526,10 @@
         append("batchMode", m_batchMode).
         append("useAutoCommit", getUseAutoCommitAsString(useAutoCommit)).
         append("ignoreAutoCommitExceptions", ignoreAutoCommitExceptions).
-        append("sequenceDescriptor", sequenceDescriptor);
+        append("sequenceDescriptor", sequenceDescriptor).
+        append("persistenceChecker", persistenceCheckerClass).
+        //append("objectContextManager", objectContextManagerClass).
+        append("custom-attributes ==> ", getProperties());
         return buf.toString();
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message