db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c..@apache.org
Subject svn commit: r555337 - /db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java
Date Wed, 11 Jul 2007 16:51:48 GMT
Author: clr
Date: Wed Jul 11 09:51:46 2007
New Revision: 555337

URL: http://svn.apache.org/viewvc?view=rev&rev=555337
Log:
JDO-450 Changed signatures of PersistenceManager methods to be generic.
Ran tck2 tests; same results as before.
Reviewed javadoc; new method signatures seem to javadoc ok.

Modified:
    db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java

Modified: db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java?view=diff&rev=555337&r1=555336&r2=555337
==============================================================================
--- db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java (original)
+++ db/jdo/trunk/api2/src/java/javax/jdo/PersistenceManager.java Wed Jul 11 09:51:46 2007
@@ -338,7 +338,7 @@
      * @return the corresponding persistent instance
      * @since 2.0
      */
-    Object getObjectById (Class cls, Object key);
+    <T> T getObjectById (Class<T> cls, Object key);
 
     /**
      * Looks up the instance corresponding to the specified oid. This is
@@ -516,7 +516,7 @@
      * persistent state, or the corresponding persistent instance 
      * for detached parameter instances
      */
-    Object makePersistent (Object pc);
+    <T> T makePersistent (T pc);
     
     /** Make an array of instances persistent.
      * @param pcs an array of instances
@@ -526,7 +526,7 @@
      * parameter array
      * @see #makePersistent(Object pc)
      */
-    Object[] makePersistentAll (Object[] pcs);
+    <T> T[] makePersistentAll (T[] pcs);
     
     /** Make a <code>Collection</code> of instances persistent.
      * @param pcs a <code>Collection</code> of instances
@@ -536,7 +536,7 @@
      * as in the parameter Collection
      * @see #makePersistent(Object pc)
      */
-    Collection makePersistentAll (Collection pcs);
+    <T> Collection<T> makePersistentAll (Collection<T> pcs);
     
     /** Delete the persistent instance from the data store.
      * This method must be called in an active transaction.
@@ -923,7 +923,7 @@
      * @see #detachCopyAll(Object[])
      * @since 2.0
      */
-    Object detachCopy (Object pc);
+    <T> T detachCopy (T pc);
 
     /**
      * Detach the specified instances from the <code>PersistenceManager</code>.
@@ -936,7 +936,7 @@
      * @see #detachCopyAll(Object[])
      * @since 2.0
      */
-    Collection detachCopyAll (Collection pcs);
+    <T> Collection<T> detachCopyAll (Collection<T> pcs);
 
     /**
      * Detach the specified instances from the <code>PersistenceManager</code>.
@@ -962,7 +962,7 @@
      * @see #getFetchPlan
      * @since 2.0
      */
-    Object[] detachCopyAll (Object [] pcs);
+    <T> T[] detachCopyAll (T[] pcs);
 
     /**
      * Put the specified key-value pair into the map of user objects.
@@ -1042,7 +1042,7 @@
      * @return the created instance
      * @since 2.0
      */
-    Object newInstance (Class pcClass);
+    <T> T newInstance (Class<T> pcClass);
 
     /**
      * Returns the sequence identified by <code>name</code>.



Mime
View raw message