db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer PkEnumeration.java
Date Sun, 09 Mar 2003 17:10:49 GMT
thma        2003/03/09 09:10:48

  Modified:    src/java/org/apache/ojb/odmg/collections DMapEntry.java
                        DListEntry.java DSetEntry.java
               src/java/org/apache/ojb/broker/accesslayer
                        PkEnumeration.java
  Log:
  remove deprecated Identity constructor calls
  
  Revision  Changes    Path
  1.13      +9 -4      db-ojb/src/java/org/apache/ojb/odmg/collections/DMapEntry.java
  
  Index: DMapEntry.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/collections/DMapEntry.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DMapEntry.java	8 Mar 2003 19:22:56 -0000	1.12
  +++ DMapEntry.java	9 Mar 2003 17:10:48 -0000	1.13
  @@ -61,6 +61,7 @@
   import org.apache.ojb.broker.PBKey;
   import org.apache.ojb.broker.PersistenceBrokerException;
   import org.apache.ojb.broker.PersistenceBroker;
  +import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldFactory;
   import org.apache.ojb.broker.util.logging.Logger;
  @@ -120,9 +121,11 @@
   	        id = generateNewId();
           this.dmapId = map.getId();
           this.keyRealSubject = key;
  -        this.keyOID = new Identity(key);
  +        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  +        this.keyOID = new Identity(key,broker);
           this.valueRealSubject = value;
  -        this.valueOID = new Identity(value);
  +        this.valueOID = new Identity(value,broker);
  +        broker.close();
       }
   
       /**
  @@ -206,7 +209,9 @@
               tx.lock(this, Transaction.WRITE);
           }
           valueRealSubject = obj;
  -        valueOID = new Identity(obj);
  +        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  +        valueOID = new Identity(obj,broker);
  +        broker.close();
           return obj;
       }
   
  
  
  
  1.17      +6 -1      db-ojb/src/java/org/apache/ojb/odmg/collections/DListEntry.java
  
  Index: DListEntry.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/collections/DListEntry.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- DListEntry.java	8 Mar 2003 19:22:56 -0000	1.16
  +++ DListEntry.java	9 Mar 2003 17:10:48 -0000	1.17
  @@ -58,6 +58,7 @@
   import org.apache.ojb.broker.PBKey;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerException;
  +import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
   import org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldFactory;
   import org.apache.ojb.broker.util.logging.LoggerFactory;
  @@ -123,7 +124,11 @@
           if (tx != null)
               oid = new Identity(theObject, tx.getBroker());
           else
  -            oid = new Identity(theObject);
  +        {
  +        	PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
       	
  +            oid = new Identity(theObject, broker);
  +            broker.close();
  +        }
           this.realSubject = theObject;
           if (!PersistentFieldFactory.usesAccessorsAndMutators())
               id = generateNewId();
  
  
  
  1.5       +5 -1      db-ojb/src/java/org/apache/ojb/odmg/collections/DSetEntry.java
  
  Index: DSetEntry.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/collections/DSetEntry.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DSetEntry.java	5 Oct 2002 03:37:43 -0000	1.4
  +++ DSetEntry.java	9 Mar 2003 17:10:48 -0000	1.5
  @@ -56,6 +56,8 @@
   
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.broker.PBKey;
  +import org.apache.ojb.broker.PersistenceBroker;
  +import org.apache.ojb.broker.PersistenceBrokerFactory;
   
   /**
    * Insert the type's description here.
  @@ -98,7 +100,9 @@
       public DSetEntry(DSetImpl theDSet, Object theObject)
       {
           this.position = theDSet.size();
  -        Identity OID = new Identity(theObject);
  +        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  +        Identity OID = new Identity(theObject,broker);
  +        broker.close();
           //this.serializedOID = OID.serialize();
           this.oid = OID;
           this.realSubject = theObject;
  
  
  
  1.9       +6 -2      db-ojb/src/java/org/apache/ojb/broker/accesslayer/PkEnumeration.java
  
  Index: PkEnumeration.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/PkEnumeration.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PkEnumeration.java	2 Feb 2003 03:31:17 -0000	1.8
  +++ PkEnumeration.java	9 Mar 2003 17:10:48 -0000	1.9
  @@ -57,6 +57,7 @@
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.broker.PersistenceBroker;
   import org.apache.ojb.broker.PersistenceBrokerException;
  +import org.apache.ojb.broker.PersistenceBrokerFactory;
   import org.apache.ojb.broker.PersistenceBrokerSQLException;
   import org.apache.ojb.broker.metadata.ClassDescriptor;
   import org.apache.ojb.broker.metadata.FieldDescriptor;
  @@ -157,7 +158,10 @@
                   fld.getPersistentField().set(obj, colValue);
               }
               // 3. return the representing identity object
  -            return new Identity(obj);
  +            PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
  +            Identity result = new Identity(obj, broker);
  +            broker.close();
  +            return result;
           }
           catch (SQLException e)
           {
  
  
  

Mime
View raw message