db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker OJB.java
Date Sun, 05 Dec 2004 19:51:45 GMT
tomdz       2004/12/05 11:51:45

  Modified:    src/java/org/apache/ojb/broker OJB.java
  Log:
  Added convenience methods for dealing with the defalt persistence configuration
  
  Revision  Changes    Path
  1.6       +18 -1     db-ojb/src/java/org/apache/ojb/broker/OJB.java
  
  Index: OJB.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/OJB.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- OJB.java	28 Nov 2004 03:16:38 -0000	1.5
  +++ OJB.java	5 Dec 2004 19:51:44 -0000	1.6
  @@ -217,6 +217,17 @@
       // PersistenceConfiguration methods
       //======================================================
       /**
  +     * Get the default {@link org.apache.ojb.broker.PersistenceConfiguration}. If none
  +     * exists but a default connection descriptor exists, a new configuration will be created.
  +     *
  +     * @return The configuration
  +     */
  +    public PersistenceConfiguration getDefaultConfiguration() throws ConfigurationException
  +    {
  +        return getConfiguration(null);
  +    }
  +
  +    /**
        * Get the {@link org.apache.ojb.broker.PersistenceConfiguration} for given key. If
none
        * exists but a connection descriptor exists for this key, a new configuration will
be created.
        *
  @@ -388,6 +399,12 @@
           return lookupBroker(key);
       }
   
  +    public PBKey getDefaultKey()
  +    {
  +        initDynamicSystem();
  +        return metadataManager.getDefaultPBKey();
  +    }
  +    
       /**
        * Releases all connections from all persistence configurations that this runtime has.
        */
  
  
  

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