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/odmg OJB.java
Date Thu, 06 Feb 2003 20:58:24 GMT
brj         2003/02/06 12:58:24

  Modified:    src/java/org/apache/ojb/odmg OJB.java
  Log:
  avoid deprecated Identity constructor
  
  Revision  Changes    Path
  1.12      +7 -4      db-ojb/src/java/org/apache/ojb/odmg/OJB.java
  
  Index: OJB.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/odmg/OJB.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- OJB.java	8 Nov 2002 13:31:51 -0000	1.11
  +++ OJB.java	6 Feb 2003 20:58:23 -0000	1.12
  @@ -307,21 +307,24 @@
       public String getObjectId(Object obj)
       {
           Identity oid = null;
  +        PersistenceBroker broker;
  +        
           if (getCurrentDatabase() != null)
           {
               /**
                * is there an open database we are calling getObjectId against? if yes, use
it
                */
  -            PersistenceBroker broker = PersistenceBrokerFactory.createPersistenceBroker(getCurrentDatabase().getPBKey());
  -            oid = new Identity(obj, broker);
  +            broker = PersistenceBrokerFactory.createPersistenceBroker(getCurrentDatabase().getPBKey());
           }
           else
           {
               /**
                * otherwise, use default.
                */
  -            oid = new Identity(obj);
  +            broker = PersistenceBrokerFactory.defaultPersistenceBroker();
           }
  +        
  +        oid = new Identity(obj, broker);
           return new String(oid.serialize());
       }
   
  
  
  

Mime
View raw message