You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by ar...@apache.org on 2003/08/12 00:54:51 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/broker/core PersistenceBrokerImpl.java PersistenceBrokerAbstractImpl.java
arminw 2003/08/11 15:54:51
Modified: src/java/org/apache/ojb/broker/core
PersistenceBrokerImpl.java
PersistenceBrokerAbstractImpl.java
Log:
- move empty "configure" method
to PBAbstractImpl
- other minor changes
Revision Changes Path
1.32 +7 -30 db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
Index: PersistenceBrokerImpl.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- PersistenceBrokerImpl.java 2 Aug 2003 08:27:22 -0000 1.31
+++ PersistenceBrokerImpl.java 11 Aug 2003 22:54:51 -0000 1.32
@@ -66,8 +66,8 @@
import org.apache.ojb.broker.accesslayer.*;
import org.apache.ojb.broker.accesslayer.sql.SqlGenerator;
import org.apache.ojb.broker.accesslayer.sql.SqlGeneratorFactory;
-import org.apache.ojb.broker.cache.ObjectCache;
import org.apache.ojb.broker.cache.ObjectCacheFactory;
+import org.apache.ojb.broker.cache.ObjectCache;
import org.apache.ojb.broker.metadata.ClassDescriptor;
import org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException;
import org.apache.ojb.broker.metadata.CollectionDescriptor;
@@ -91,8 +91,6 @@
import org.apache.ojb.broker.util.ObjectModification;
import org.apache.ojb.broker.util.ProxyHelper;
import org.apache.ojb.broker.util.collections.RemovalAwareCollection;
-import org.apache.ojb.broker.util.configuration.Configuration;
-import org.apache.ojb.broker.util.configuration.ConfigurationException;
import org.apache.ojb.broker.util.logging.Logger;
import org.apache.ojb.broker.util.logging.LoggerFactory;
import org.apache.ojb.broker.util.sequence.SequenceManager;
@@ -155,13 +153,6 @@
private BrokerHelper brokerHelper;
private PBKey pbKey;
-// arminw: ProxyHelper now lookup collectionProxyClass
-// /**
-// * The Class to be used for CollectionProxies
-// * if null use either ListProxy or CollectionProxy
-// */
-// private Class m_collectionProxyClass = null;
-
/**
* Lists for object registration during delete operations.
* We reuse these list to avoid excessive object creation.
@@ -1256,7 +1247,7 @@
*/
private Object getReferencedObject(Object obj, ObjectReferenceDescriptor rds, ClassDescriptor cld)
{
- Class referencedClass, referencedProxy;
+ Class referencedProxy;
Object[] pkVals = rds.getForeignKeyValues(obj, cld);
boolean allPkNull = true;
Identity id;
@@ -1279,9 +1270,7 @@
}
// ensure that top-level extents are used for Identities
- referencedClass = descriptorRepository.getTopLevelClass(rds.getItemClass());
-
- id = new Identity(rds.getItemClass(), referencedClass, pkVals);
+ id = new Identity(rds.getItemClass(), descriptorRepository.getTopLevelClass(rds.getItemClass()), pkVals);
//JMM : why not see if the object has already been loaded
if ( objectCache.lookup(id) != null )
{
@@ -1556,6 +1545,7 @@
if (c == null)
{
+ logger.info("Real class for used Identity object is 'null', use top-level class instead");
c = oid.getObjectsTopLevelClass();
}
@@ -2189,7 +2179,7 @@
{
identity = new Identity(obj, this);
}
- Object objectToRemove = objectCache.lookup(identity);
+ // Object objectToRemove = objectCache.lookup(identity);
/*
objects must also be remove from LoadedObjectsRegistry
Fix by Jamie Burns
@@ -2422,17 +2412,6 @@
return getRsIteratorFromQuery(query, cld, factory);
}
- /*
- * @see org.apache.ojb.broker.util.configuration.Configurable#configure(Configuration)
- */
- public void configure(Configuration pConfig) throws ConfigurationException
- {
-// PersistenceBrokerConfiguration config = (PersistenceBrokerConfiguration) pConfig;
-//
-// m_collectionProxyClass = config.getCollectionProxyClass();
- }
-
-
/**
* @see org.odbms.ObjectContainer#query()
*/
@@ -2457,7 +2436,6 @@
}
}
-
/**
* clean up the maps for reuse by the next transaction.
*/
@@ -2563,7 +2541,6 @@
+"] right["+rightClass+"]");
}
-
if(leftObject == null || rightObject == null)
{
//TODO: to be implemented, must change MtoNImplementor
@@ -2584,7 +2561,7 @@
}
/**
- * @see org.apache.ojb.broker.PersistenceBroker#addMtoNImplementor()
+ * @see org.apache.ojb.broker.PersistenceBroker#addMtoNImplementor
*/
public void addMtoNImplementor(MtoNImplementor m2n) throws PersistenceBrokerException
{
1.4 +13 -4 db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerAbstractImpl.java
Index: PersistenceBrokerAbstractImpl.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerAbstractImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PersistenceBrokerAbstractImpl.java 15 May 2003 11:59:44 -0000 1.3
+++ PersistenceBrokerAbstractImpl.java 11 Aug 2003 22:54:51 -0000 1.4
@@ -63,6 +63,8 @@
import org.apache.ojb.broker.PersistenceBrokerEvent;
import org.apache.ojb.broker.PersistenceBrokerException;
import org.apache.ojb.broker.util.logging.LoggerFactory;
+import org.apache.ojb.broker.util.configuration.Configuration;
+import org.apache.ojb.broker.util.configuration.ConfigurationException;
/**
* Abstract Implementation of the {@link org.apache.ojb.broker.PersistenceBroker}
@@ -82,9 +84,6 @@
private static final PBStateListener[] NO_STATE_LISTENERS = new PBStateListener[0];
private static final PBLifeCycleListener[] NO_LIFECYCLE_LISTENERS = new PBLifeCycleListener[0];
- private static final Boolean TRUE = new Boolean("true");
- private static final Boolean FALSE = new Boolean("false");
-
/**
* Array containing all permanent {@link org.apache.ojb.broker.PBStateListener}
* instances.
@@ -108,6 +107,16 @@
* instances.
*/
private PBLifeCycleListener[] temporaryLifeCycleListeners = NO_LIFECYCLE_LISTENERS;
+
+ /**
+ * Override if needed.
+ *
+ * @see org.apache.ojb.broker.util.configuration.Configurable#configure(Configuration)
+ */
+ public void configure(Configuration pConfig) throws ConfigurationException
+ {
+ // noop
+ }
/**
* @see org.apache.ojb.broker.PersistenceBroker#addListener(PBListener listener)
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org