db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r538218 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/ObjectEnvelope.java
Date Tue, 15 May 2007 15:30:02 GMT
Author: arminw
Date: Tue May 15 08:30:01 2007
New Revision: 538218

URL: http://svn.apache.org/viewvc?view=rev&rev=538218
Log:
optimize imports, comments, source

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/ObjectEnvelope.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/ObjectEnvelope.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/ObjectEnvelope.java?view=diff&rev=538218&r1=538217&r2=538218
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/ObjectEnvelope.java (original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/odmg/ObjectEnvelope.java Tue May
15 08:30:01 2007
@@ -292,7 +292,7 @@
     {
         if(oid == null)
         {
-            oid = getBroker().serviceIdentity().buildIdentity(getObject());
+            oid = getBroker().serviceIdentity().buildIdentity(myObj);
         }
         return oid;
     }
@@ -312,7 +312,7 @@
     {
         if(realObject == null)
         {
-            realObject = getBroker().getProxyFactory().getRealObject(getObject());
+            realObject = getBroker().getProxyFactory().getRealObject(myObj);
         }
         return realObject;
     }
@@ -497,7 +497,7 @@
      */
     public boolean needsInsert()
     {
-        return this.getModificationState().needsInsert();
+        return this.modificationState.needsInsert();
     }
 
     /**
@@ -505,7 +505,7 @@
      */
     public boolean needsUpdate()
     {
-        return this.getModificationState().needsUpdate();
+        return this.modificationState.needsUpdate();
     }
 
     /**
@@ -513,7 +513,7 @@
      */
     public boolean needsDelete()
     {
-        return this.getModificationState().needsDelete();
+        return this.modificationState.needsDelete();
     }
 
     /**
@@ -691,7 +691,7 @@
     {
         if(log.isDebugEnabled()) log.debug("Start DELETE action for " + getIdentity());
         // use specified object/proxyObject, because delete can be done without materialization
-        getBroker().delete(getObject(), getIdentity(), getClassDescriptor(), true);
+        getBroker().delete(myObj, getIdentity(), getClassDescriptor(), true);
     }
 
     public void doEvictFromCache()
@@ -735,21 +735,21 @@
         if(cld == null)
         {
             PersistenceBrokerInternal broker = getBroker();
-            cld = broker.getClassDescriptor(broker.getProxyFactory().getRealClass(getObject()));
+            cld = broker.getClassDescriptor(broker.getProxyFactory().getRealClass(myObj));
         }
         return cld;
     }
 
     void addLinkOneToOne(ObjectReferenceDescriptor ord, boolean unlink)
     {
-        LinkEntry entry = new LinkEntryOneToOne(ord, getObject(), unlink);
+        LinkEntry entry = new LinkEntryOneToOne(ord, myObj, unlink);
         linkEntryList.add(entry);
     }
 
     void addLinkOneToN(CollectionDescriptor col, Object source, boolean unlink)
     {
         if(col.isMtoNRelation()) throw new OJBRuntimeException("Expected an 1:n relation,
but specified a m:n");
-        LinkEntry entry = new LinkEntryOneToN(source, col, getObject(), unlink);
+        LinkEntry entry = new LinkEntryOneToN(source, col, myObj, unlink);
         linkEntryList.add(entry);
     }
 
@@ -767,7 +767,7 @@
     {
         // the main objects needs link/unlink of the FK to 1:1 reference,
         // so mark this dirty
-        setModificationState(getModificationState().markDirty());
+        setModificationState(modificationState.markDirty());
         // if the object is already registered, OJB knows about
         // else lock and register object, get read lock, because we
         // don't know if the object is new or moved from an existing other object
@@ -787,7 +787,7 @@
     {
         // the main objects needs link/unlink of the FK to 1:1 reference,
         // so mark this dirty
-        setModificationState(getModificationState().markDirty());
+        setModificationState(modificationState.markDirty());
         ObjectEnvelope oldRefMod = buffer.getByIdentity(oid);
         // only delete when the reference wasn't assigned with another object
         if(!buffer.isNewAssociatedObject(oid))
@@ -796,7 +796,7 @@
             // because it was removed from the main object
             if(buffer.getTransaction().cascadeDeleteFor(ord))
             {
-                oldRefMod.setModificationState(oldRefMod.getModificationState().markDelete());
+                oldRefMod.setModificationState(oldRefMod.modificationState.markDelete());
             }
             // unlink the main object
             if(needsUnlink) addLinkOneToOne(ord, true);
@@ -816,7 +816,7 @@
         // the main object
         if(mod.needsDelete())
         {
-            mod.setModificationState(mod.getModificationState().markNew());
+            mod.setModificationState(mod.modificationState.markNew());
         }
         else
         {
@@ -824,9 +824,9 @@
             arminw: if the reference is a m:n relation and the object state is
             old clean, no need to update the reference.
             */
-            if(!(cod.isMtoNRelation() && mod.getModificationState().equals(StateOldClean.getInstance())))
+            if(!(cod.isMtoNRelation() && mod.modificationState.equals(StateOldClean.getInstance())))
             {
-                mod.setModificationState(mod.getModificationState().markDirty());
+                mod.setModificationState(mod.modificationState.markDirty());
             }
         }
         // buffer this object as "new" in a list to prevent deletion
@@ -835,12 +835,12 @@
         // new referenced object found, so register all m:n relation for "linking"
         if(cod.isMtoNRelation())
         {
-            buffer.addM2NLinkEntry(cod, getObject(), refObjOrProxy);
+            buffer.addM2NLinkEntry(cod, myObj, refObjOrProxy);
         }
         else
         {
             // we have to link the new object
-            mod.addLinkOneToN(cod, getObject(), false);
+            mod.addLinkOneToN(cod, myObj, false);
         }
 // arminw: this object will be matched again in ObjectEnvelopeTable#cascadingDependents()
 // and then be added
@@ -862,14 +862,14 @@
                 boolean cascade = buffer.getTransaction().cascadeDeleteFor(cod);
                 if(cascade)
                 {
-                    mod.setModificationState(mod.getModificationState().markDelete());
+                    mod.setModificationState(mod.modificationState.markDelete());
                     // arminw: this object will be matched again in ObjectEnvelopeTable#cascadingDependents()
                     // and then be added
                     //buffer.addForDeletionDependent(mod);
                 }
                 if(cod.isMtoNRelation())
                 {
-                    buffer.addM2NUnlinkEntry(cod, getObject(), refObjOrProxy);
+                    buffer.addM2NUnlinkEntry(cod, myObj, refObjOrProxy);
                 }
                 else
                 {
@@ -878,8 +878,8 @@
                     // object
                     if(!cascade)
                     {
-                        mod.setModificationState(mod.getModificationState().markDirty());
-                        mod.addLinkOneToN(cod, getObject(), true);
+                        mod.setModificationState(mod.modificationState.markDirty());
+                        mod.addLinkOneToN(cod, myObj, true);
                     }
                 }
             }



---------------------------------------------------------------------
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