db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r159523 - incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java
Date Wed, 30 Mar 2005 20:50:22 GMT
Author: clr
Date: Wed Mar 30 12:50:20 2005
New Revision: 159523

URL: http://svn.apache.org/viewcvs?view=rev&rev=159523
Log:
added addInstanceLifecycleListener and removeInstanceLifecycleListeer methods

Modified:
    incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java

Modified: incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java?view=diff&r1=159522&r2=159523
==============================================================================
--- incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java (original)
+++ incubator/jdo/trunk/api20/src/java/javax/jdo/PersistenceManagerFactory.java Wed Mar 30
12:50:20 2005
@@ -26,6 +26,8 @@
 
 import javax.jdo.datastore.DataStoreCache;
 
+import javax.jdo.listener.InstanceLifecycleListener;
+
 /** The <code>PersistenceManagerFactory</code> is the interface to use to obtain
  * <code>PersistenceManager</code> instances.  All <code>PersistenceManager</code>
instances obtained
  * from the same <code>PersistenceManagerFactory</code> will have the same default
@@ -354,4 +356,44 @@
      * @since 2.0
      */
     DataStoreCache getDataStoreCache ();
+
+    /**
+     * Add the parameter listener to the list of
+     * instance lifecycle event listeners set as the initial listeners
+     * for each PersistenceManager created by this PersistenceManagerFactory. 
+     * The <code>addInstanceLifecycleListener</code> and 
+     * <code>removeInstanceLifecycleListener</code>
+     * methods are considered to be configuration methods and
+     * can only be called when the PersistenceManagerFactory
+     * is configurable (before the first time {@link #getPersistenceManager}
+     * is called).
+     * <p>The <code>classes</code> parameter identifies all
+     * of the classes of interest. If the <code>classes</code>
+     * parameter is specified as <code>null</code>, events for all
+     * persistent classes and interfaces will be sent to the listener.</p>
+     * <p>The listener will be called for each event for which it
+     * implements the corresponding {@link InstanceLifecycleListener}
+     * interface.</p>
+     * @param listener the lifecycle listener
+     * @param classes the classes of interest to the listener
+     * @since 2.0
+     */
+    void addInstanceLifecycleListener (InstanceLifecycleListener listener,
+        Class[] classes);
+
+    /**
+     * Remove the parameter listener instance from the list of
+     * instance lifecycle event listeners set as the initial listeners
+     * for each PersistenceManager created by this PersistenceManagerFactory. 
+     * The <code>addInstanceLifecycleListener</code> and 
+     * <code>removeInstanceLifecycleListener</code>
+     * methods are considered to be configuration methods and
+     * can only be called when the PersistenceManagerFactory
+     * is configurable (before the first time {@link #getPersistenceManager}
+     * is called).
+     * @param listener the listener instance to be removed
+     * @since 2.0
+     */
+    void removeInstanceLifecycleListener (InstanceLifecycleListener listener);
+
 }



Mime
View raw message