db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/otm/copy MetadataObjectCopyStrategy.java
Date Sat, 22 May 2004 11:39:18 GMT
brj         2004/05/22 04:39:18

  Modified:    src/java/org/apache/ojb/otm/core ConcreteEditingContext.java
               src/java/org/apache/ojb/otm/copy
                        MetadataObjectCopyStrategy.java
  Log:
  removed unused imports, minor refactorings
  
  Revision  Changes    Path
  1.47      +22 -13    db-ojb/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java
  
  Index: ConcreteEditingContext.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/otm/core/ConcreteEditingContext.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- ConcreteEditingContext.java	15 May 2004 20:07:13 -0000	1.46
  +++ ConcreteEditingContext.java	22 May 2004 11:39:18 -0000	1.47
  @@ -300,7 +300,6 @@
           ObjectReferenceDescriptor rds = null;
           PersistentField f;
           Object relUserObj;
  -        Object relCacheObj;
           Identity relOid;
           boolean isDependent;
   
  @@ -689,19 +688,30 @@
                   {
                       entry.userObject = swizzlingStrategy.getRealTarget(entry.userObject);
                       entry.cacheObject = swizzlingStrategy.swizzle(
  -                            // we create the special ObjectCache implememntation
  +                    // we create the special ObjectCache implememntation
                               // that returns cacheObject, not userObject
  -                            entry.userObject, entry.cacheObject, _pb,
  -                            new ObjectCache()
  +                            entry.userObject, entry.cacheObject, _pb, new ObjectCache()
                               {
  -                                public Object lookup(Identity oid)
  +                                public Object lookup(Identity anOid)
                                   {
  -                                    ContextEntry entry = (ContextEntry) _objects.get(oid);
  -                                    return (entry == null ? null : entry.cacheObject);
  +                                    ContextEntry ent = (ContextEntry) _objects.get(anOid);
  +                                    return (ent == null ? null : ent.cacheObject);
  +                                }
  +
  +                                public void cache(Identity anOid, Object obj)
  +                                {
  +                                    // do nothing
  +                                }
  +
  +                                public void clear()
  +                                {
  +                                    // do nothing
  +                                }
  +
  +                                public void remove(Identity anOid)
  +                                {
  +                                    // do nothing
                                   }
  -                                public void cache(Identity oid, Object obj) {}
  -                                public void clear() {}
  -                                public void remove(Identity oid) {}
                               });
                   }
               }
  @@ -1531,10 +1541,8 @@
           }
       }
   
  -    private class OTMCollectionProxyListener
  -            implements CollectionProxyListener
  +    private class OTMCollectionProxyListener implements CollectionProxyListener
       {
  -
           private final CollectionDescriptor _cds;
           private final ArrayList[] _collections;
           private final int _index;
  @@ -1551,6 +1559,7 @@
   
           public void beforeLoading(CollectionProxyDefaultImpl colProxy)
           {
  +            // do nothing
           }
   
           /**
  
  
  
  1.22      +0 -1      db-ojb/src/java/org/apache/ojb/otm/copy/MetadataObjectCopyStrategy.java
  
  Index: MetadataObjectCopyStrategy.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/otm/copy/MetadataObjectCopyStrategy.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- MetadataObjectCopyStrategy.java	4 May 2004 17:37:55 -0000	1.21
  +++ MetadataObjectCopyStrategy.java	22 May 2004 11:39:18 -0000	1.22
  @@ -20,7 +20,6 @@
   import org.apache.ojb.broker.metadata.fieldaccess.PersistentField;
   import org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl;
   import org.apache.ojb.broker.core.proxy.ProxyHelper;
  -import org.apache.ojb.broker.util.BrokerHelper;
   import org.apache.ojb.broker.util.ConstructorHelper;
   import org.apache.ojb.broker.util.IdentityMapFactory;
   
  
  
  

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