Object array with all of the
* parameters.
*/
- Object executeWithArray (Object[] parameters);
+ Object executeWithArray (Object... parameters);
/** Get the PersistenceManager associated with this
* Query.
@@ -529,7 +529,7 @@
* @return the number of instances of the candidate class that were deleted
* @since 2.0
*/
- long deletePersistentAll (Object[] parameters);
+ long deletePersistentAll (Object... parameters);
/**
* Deletes all the instances of the candidate class that pass the
Index: src/java/javax/jdo/datastore/DataStoreCache.java
===================================================================
--- src/java/javax/jdo/datastore/DataStoreCache.java (revision 582408)
+++ src/java/javax/jdo/datastore/DataStoreCache.java (working copy)
@@ -52,7 +52,7 @@
* @param oids the object ids of the instance to evict.
* @since 2.0
*/
- void evictAll (Object[] oids);
+ void evictAll (Object... oids);
/** Evict the parameter instances from the second-level cache.
* @param oids the object ids of the instance to evict.
@@ -83,7 +83,7 @@
* @param oids the object ids of the instances to pin.
* @since 2.0
*/
- void pinAll (Object[] oids);
+ void pinAll (Object... oids);
/** Pin instances in the second-level cache.
* @param pcClass the class of instances to pin
@@ -108,7 +108,7 @@
* @param oids the object id of the instance to evict.
* @since 2.0
*/
- void unpinAll(Object[] oids);
+ void unpinAll(Object... oids);
/** Unpin instances from the second-level cache.
* @param pcClass the class of instances to unpin
@@ -134,7 +134,7 @@
public void evictAll() {
}
- public void evictAll(Object[] oids) {
+ public void evictAll(Object... oids) {
}
public void evictAll(Collection oids) {
@@ -146,7 +146,7 @@
public void pin(Object oid) {
}
- public void pinAll(Object[] oids) {
+ public void pinAll(Object... oids) {
}
public void pinAll(Collection oids) {
@@ -158,7 +158,7 @@
public void unpin(Object oid) {
}
- public void unpinAll(Object[] oids) {
+ public void unpinAll(Object... oids) {
}
public void unpinAll(Collection oids) {
Index: src/java/javax/jdo/annotations/Implements.java
===================================================================
--- src/java/javax/jdo/annotations/Implements.java (revision 582408)
+++ src/java/javax/jdo/annotations/Implements.java (working copy)
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package javax.jdo.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation for the interfaces implemented by a class.
- * Corresponds to the xml element "implements".
- *
- * @version 2.1
- * @since 2.1
- */
-@Target(ElementType.TYPE)
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Implements
-{
- /** Interfaces implemented by this PersistenceCapable.
- * @return the interfaces implemented by the class
- */
- Class[] value();
-}
\ No newline at end of file
Index: src/java/javax/jdo/PersistenceManagerFactory.java
===================================================================
--- src/java/javax/jdo/PersistenceManagerFactory.java (revision 582408)
+++ src/java/javax/jdo/PersistenceManagerFactory.java (working copy)
@@ -513,7 +513,7 @@
* @return the Collection of Strings representing
* the supported options.
*/
- Collection supportedOptions();
+ CollectionCollection of instances as no longer needed in the
* cache.
@@ -131,7 +131,7 @@
* @see #refresh(Object pc)
* @param pcs the array of instances to refresh.
*/
- void refreshAll (Object[] pcs);
+ void refreshAll (Object... pcs);
/** Refresh the state of a Collection of instances from the
* data store.
@@ -452,21 +452,36 @@
* @return the objects that were looked up, in the
* same order as the oids parameter.
* @see #getObjectById(Object,boolean)
+ * @see #getObjectsById(boolean,Object...)
+ * @deprecated
* @since 2.0
*/
Object[] getObjectsById (Object[] oids, boolean validate);
/**
+ * Return the objects with the given oids.
+ * @param oids the oids of the objects to return
+ * @param validate if true, the existance of the objects in
+ * the datastore will be validated.
+ * @return the objects that were looked up, in the
+ * same order as the oids parameter.
+ * @see #getObjectById(Object,boolean)
+ * @see #getObjectsById(boolean,Object...)
+ * @since 2.1
+ */
+ Object[] getObjectsById (boolean validate, Object... oids);
+
+ /**
* Return the objects with the given oids. This method is equivalent
- * to calling {@link #getObjectsById(Object[],boolean)}
+ * to calling {@link #getObjectsById(boolean,Object...)}
* with the validate flag true.
* @param oids the oids of the objects to return
* @return the objects that were looked up, in the
* same order as the oids parameter.
- * @see #getObjectsById(Object[],boolean)
+ * @see #getObjectsById(boolean,Object...)
* @since 2.0
*/
- Object[] getObjectsById (Object[] oids);
+ Object[] getObjectsById (Object... oids);
/** Make the parameter instance persistent in this
* PersistenceManager.
@@ -525,7 +540,7 @@
*/
Collection of instances persistent.
* @param pcs a Collection of instances
@@ -563,7 +578,7 @@
* @param pcs a Collection of persistent instances
* @see #deletePersistent(Object pc)
*/
- void deletePersistentAll (Object[] pcs);
+ void deletePersistentAll (Object... pcs);
/** Delete a Collection of instances from the data store.
* @param pcs a Collection of persistent instances
@@ -589,7 +604,7 @@
* is preserved unchanged.
* @param pcs the instances to make transient.
*/
- void makeTransientAll (Object[] pcs);
+ void makeTransientAll (Object... pcs);
/** Make a Collection of instances transient, removing them
* from management by this PersistenceManager.
@@ -640,12 +655,35 @@
* @param pcs the root instances to make transient.
* @param useFetchPlan whether to use the current fetch plan to determine
* which fields to load and which instances to make transient
+ * @see #makeTransientAll(boolean,Object...)
+ * @deprecated
* @since 2.0
*/
void makeTransientAll (Object[] pcs, boolean useFetchPlan);
/** Make instances transient, removing them from management
* by this PersistenceManager. If the useFetchPlan parameter
+ * is false, this method behaves exactly as makeTransientAll(Object[] pcs).
+ * The affected instance(s) lose their JDO identity and are no longer
+ * associated with any PersistenceManager. The state
+ * of fields is unchanged.
+ *
If the useFetchPlan parameter is true, then the current FetchPlan + * is applied to the pcs parameters and the entire graph of instances + * reachable via loaded fields is made transient. The state of fields + * in the affected instances is as specified by the FetchPlan. + *
Unlike detachCopy, the instances are not detached; there is no + * detachment information in the instances. + *
The instances to be made transient do not need to
+ * implement the javax.jdo.spi.Detachable interface.
+ * @param pcs the root instances to make transient.
+ * @param useFetchPlan whether to use the current fetch plan to determine
+ * which fields to load and which instances to make transient
+ * @since 2.1
+ */
+ void makeTransientAll (boolean useFetchPlan, Object... pcs);
+
+ /** Make instances transient, removing them from management
+ * by this PersistenceManager. If the useFetchPlan parameter
* is false, this method behaves exactly as
* makeTransientAll(Collection pcs).
*
The affected instance(s) lose their JDO identity and are no longer
@@ -687,7 +725,7 @@
* @param pcs the array of instances to make transactional.
* @see #makeTransactional(Object pc)
*/
- void makeTransactionalAll (Object[] pcs);
+ void makeTransactionalAll (Object... pcs);
/** Make a Collection of instances subject to transactional
* boundaries.
@@ -713,7 +751,7 @@
* @param pcs the array of instances to make nontransactional.
* @see #makeNontransactional(Object pc)
*/
- void makeNontransactionalAll (Object[] pcs);
+ void makeNontransactionalAll (Object... pcs);
/** Make a Collection of instances non-transactional after
* commit.
@@ -789,7 +827,7 @@
* the class to retrieve associated instances.
* @param pcs the instances
*/
- void retrieveAll (Object[] pcs);
+ void retrieveAll (Object... pcs);
/** Retrieve field values of instances from the store. This tells
* the PersistenceManager that the application intends to use
@@ -808,10 +846,33 @@
* @param pcs the instances
* @param useFetchPlan whether to use the current fetch plan to determine
* which fields to load and which instances to retrieve.
+ * @deprecated
+ * @see #retrieveAll(boolean,Object...)
* @since 1.0.1
*/
void retrieveAll (Object[] pcs, boolean useFetchPlan);
+ /** Retrieve field values of instances from the store. This tells
+ * the PersistenceManager that the application intends to use
+ * the instances, and their field values should be retrieved. The fields
+ * in the current fetch group must be retrieved, and the implementation
+ * might retrieve more fields than the current fetch group.
+ *
If the useFetchPlan parameter is false, this method behaves exactly
+ * as the corresponding method without the useFetchPlan parameter.
+ * If the useFetchPlan parameter is true, and the fetch plan has not been
+ * modified from its default setting, all fields in the current fetch plan
+ * are fetched, and other fields might be fetched lazily by the
+ * implementation. If the useFetchPlan parameter is true, and the fetch
+ * plan has been changed from its default setting, then the fields
+ * specified by the fetch plan are loaded, along with related instances
+ * specified by the fetch plan.
+ * @param pcs the instances
+ * @param useFetchPlan whether to use the current fetch plan to determine
+ * which fields to load and which instances to retrieve.
+ * @since 2.1
+ */
+ void retrieveAll (boolean useFetchPlan, Object... pcs);
+
/** The application can manage the The affected instance(s) lose their JDO identity and are no longer
+ * associated with any If the useFetchPlan parameter is true, then the current FetchPlan
+ * is applied to the pcs parameters and the entire graph of instances
+ * reachable via loaded fields is made transient. The state of fields
+ * in the affected instances is as specified by the FetchPlan.
+ * Unlike detachCopy, the instances are not detached; there is no
+ * detachment information in the instances.
+ * The instances to be made transient do not need to
+ * implement the javax.jdo.spi.Detachable interface.
+ * @param pcs the root instances to make transient.
+ * @param useFetchPlan whether to use the current fetch plan to determine
+ * which fields to load and which instances to make transient
+ * @since 2.1
+ */
+ void makeTransientAll (boolean useFetchPlan, Object[] pcs);
+
+ /** Make instances transient, removing them from management
+ * by this The affected instance(s) lose their JDO identity and are no longer
@@ -801,10 +838,33 @@
* @param pcs the instances
* @param useFetchPlan whether to use the current fetch plan to determine
* which fields to load and which instances to retrieve.
+ * @deprecated
+ * @see #retrieveAll(boolean,Object)
* @since 1.0.1
*/
void retrieveAll (Object[] pcs, boolean useFetchPlan);
+ /** Retrieve field values of instances from the store. This tells
+ * the If the useFetchPlan parameter is false, this method behaves exactly
+ * as the corresponding method without the useFetchPlan parameter.
+ * If the useFetchPlan parameter is true, and the fetch plan has not been
+ * modified from its default setting, all fields in the current fetch plan
+ * are fetched, and other fields might be fetched lazily by the
+ * implementation. If the useFetchPlan parameter is true, and the fetch
+ * plan has been changed from its default setting, then the fields
+ * specified by the fetch plan are loaded, along with related instances
+ * specified by the fetch plan.
+ * @param pcs the instances
+ * @param useFetchPlan whether to use the current fetch plan to determine
+ * which fields to load and which instances to retrieve.
+ * @since 2.1
+ */
+ void retrieveAll (boolean useFetchPlan, Object[] pcs);
+
/** The application can manage the PersistenceManager instances
* more easily by having an application object associated with each
* PersistenceManager instance.
@@ -990,7 +1051,7 @@
* @see #getFetchPlan
* @since 2.0
*/
- PersistenceManager. If the useFetchPlan parameter
+ * is false, this method behaves exactly as makeTransientAll(Object[] pcs).
+ * PersistenceManager. The state
+ * of fields is unchanged.
+ * PersistenceManager. If the useFetchPlan parameter
* is false, this method behaves exactly as
* makeTransientAll(Collection pcs).
* PersistenceManager that the application intends to use
+ * the instances, and their field values should be retrieved. The fields
+ * in the current fetch group must be retrieved, and the implementation
+ * might retrieve more fields than the current fetch group.
+ * PersistenceManager instances
* more easily by having an application object associated with each
* PersistenceManager instance.
Index: ../tck2/src/conf/jdo-2_1-signatures.txt
===================================================================
--- ../tck2/src/conf/jdo-2_1-signatures.txt (revision 583962)
+++ ../tck2/src/conf/jdo-2_1-signatures.txt (working copy)
@@ -202,16 +202,16 @@
public interface javax.jdo.datastore.DataStoreCache {
public void evict(Object oid);
public void evictAll();
- public void evictAll(Object[] oids);
+ public varargs void evictAll(Object[] oids);
public void evictAll(java.util.Collection oids);
public void evictAll(Class pcClass, boolean subclasses);
public void pin(Object oid);
public void pinAll(java.util.Collection oids);
- public void pinAll(Object[] oids);
+ public varargs void pinAll(Object[] oids);
public void pinAll(Class pcClass, boolean subclasses);
public void unpin(Object oid);
public void unpinAll(java.util.Collection oids);
- public void unpinAll(Object[] oids);
+ public varargs void unpinAll(Object[] oids);
public void unpinAll(Class pcClass, boolean subclasses);
}
@@ -229,7 +229,7 @@
public long currentValue();
}
-public interface javax.jdo.Extent {
+public interface javax.jdo.Extent extends java.lang.Iterable {
public java.util.Iterator iterator();
public boolean hasSubclasses();
public Class getCandidateClass();
@@ -251,13 +251,13 @@
public javax.jdo.FetchPlan clearGroups();
public java.util.Set getGroups();
public javax.jdo.FetchPlan setGroups(java.util.Collection fetchGroupNames);
- public javax.jdo.FetchPlan setGroups(String[]fetchGroupNames);
+ public varargs javax.jdo.FetchPlan setGroups(String[]fetchGroupNames);
public javax.jdo.FetchPlan setGroup(String fetchGroupName);
public javax.jdo.FetchPlan setMaxFetchDepth(int fetchDepth);
public int getMaxFetchDepth();
public javax.jdo.FetchPlan setDetachmentRoots(java.util.Collection roots);
public java.util.Collection getDetachmentRoots();
- public javax.jdo.FetchPlan setDetachmentRootClasses(Class[] rootClasses);
+ public varargs javax.jdo.FetchPlan setDetachmentRootClasses(Class[] rootClasses);
public Class[] getDetachmentRootClasses();
public javax.jdo.FetchPlan setFetchSize(int fetchSize);
public int getFetchSize();
@@ -609,12 +609,12 @@
public void close();
public javax.jdo.Transaction currentTransaction();
public void evict(Object pc);
- public void evictAll(Object[] pcs);
+ public varargs void evictAll(Object[] pcs);
public void evictAll(java.util.Collection pcs);
public void evictAll(java.lang.Class, boolean);
public void evictAll();
public void refresh(Object pc);
- public void refreshAll(Object[] pcs);
+ public varargs void refreshAll(Object[] pcs);
public void refreshAll(java.util.Collection pcs);
public void refreshAll();
public void refreshAll(javax.jdo.JDOException jdoe);
@@ -640,31 +640,34 @@
public java.util.Collection getObjectsById(java.util.Collection oids, boolean validate);
public java.util.Collection getObjectsById(java.util.Collection oids);
public Object[] getObjectsById(Object[] oids, boolean validate);
- public Object[] getObjectsById(Object[] oids);
+ public varargs Object[] getObjectsById(boolean validate,Object[] oids);
+ public varargs Object[] getObjectsById(Object[] oids);
public Object makePersistent(Object pc);
- public Object[] makePersistentAll(Object[] pcs);
+ public varargs Object[] makePersistentAll(Object[] pcs);
public java.util.Collection makePersistentAll(java.util.Collection pcs);
public void deletePersistent(Object pc);
- public void deletePersistentAll(Object[] pcs);
+ public varargs void deletePersistentAll(Object[] pcs);
public void deletePersistentAll(java.util.Collection pcs);
public void makeTransient(Object pc);
- public void makeTransientAll(Object[] pcs);
+ public varargs void makeTransientAll(Object[] pcs);
public void makeTransientAll(java.util.Collection pcs);
public void makeTransient(Object pc, boolean useFetchPlan);
public void makeTransientAll(Object[] pcs, boolean useFetchPlan);
+ public varargs void makeTransientAll(boolean useFetchPlan, Object[] pcs);
public void makeTransientAll(java.util.Collection pcs, boolean useFetchPlan);
public void makeTransactional(Object pc);
- public void makeTransactionalAll(Object[] pcs);
+ public varargs void makeTransactionalAll(Object[] pcs);
public void makeTransactionalAll(java.util.Collection pcs);
public void makeNontransactional(Object pc);
- public void makeNontransactionalAll(Object[] pcs);
+ public varargs void makeNontransactionalAll(Object[] pcs);
public void makeNontransactionalAll(java.util.Collection pcs);
public void retrieve(Object pc);
public void retrieve(Object pc, boolean FGOnly);
public void retrieveAll(java.util.Collection pcs);
public void retrieveAll(java.util.Collection pcs, boolean FGOnly);
- public void retrieveAll(Object[] pcs);
+ public varargs void retrieveAll(Object[] pcs);
public void retrieveAll(Object[] pcs, boolean FGOnly);
+ public varargs void retrieveAll(boolean FGOnly, Object[] pcs);
public void setUserObject(Object o);
public Object getUserObject();
public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory();
@@ -679,7 +682,7 @@
public void setCopyOnAttach(boolean flag);
public Object detachCopy(Object pc);
public java.util.Collection detachCopyAll(java.util.Collection pcs);
- public Object[] detachCopyAll(Object [] pcs);
+ public varargs Object[] detachCopyAll(Object [] pcs);
public Object putUserObject(Object key, Object val);
public Object getUserObject(Object key);
public Object removeUserObject(Object key);
@@ -690,7 +693,7 @@
public java.util.Date getServerDate();
public javax.jdo.datastore.Sequence getSequence(String name);
public javax.jdo.datastore.JDOConnection getDataStoreConnection();
- public void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener, Class[] classes);
+ public varargs void addInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener, Class[] classes);
public void removeInstanceLifecycleListener(javax.jdo.listener.InstanceLifecycleListener listener);
}
@@ -770,7 +773,7 @@
public Object execute(Object p1, Object p2);
public Object execute(Object p1, Object p2, Object p3);
public Object executeWithMap(java.util.Map parameters);
- public Object executeWithArray(Object[] parameters);
+ public varargs Object executeWithArray(Object[] parameters);
public javax.jdo.PersistenceManager getPersistenceManager();
public void close(Object queryResult);
public void closeAll();
@@ -783,7 +786,7 @@
public void addExtension(String key, Object value);
public void setExtensions(java.util.Map extensions);
public javax.jdo.FetchPlan getFetchPlan();
- public long deletePersistentAll(Object[] parameters);
+ public varargs long deletePersistentAll(Object[] parameters);
public long deletePersistentAll(java.util.Map parameters);
public long deletePersistentAll();
public void setUnmodifiable();
Index: ../tck2-legacy/src/conf/jdo-2_1-signatures.txt
===================================================================
--- ../tck2-legacy/src/conf/jdo-2_1-signatures.txt (revision 577821)
+++ ../tck2-legacy/src/conf/jdo-2_1-signatures.txt (working copy)
@@ -634,6 +634,7 @@
public java.util.Collection getObjectsById(java.util.Collection oids, boolean validate);
public java.util.Collection getObjectsById(java.util.Collection oids);
public Object[] getObjectsById(Object[] oids, boolean validate);
+ public Object[] getObjectsById(boolean validate,Object[] oids);
public Object[] getObjectsById(Object[] oids);
public Object makePersistent(Object pc);
public Object[] makePersistentAll(Object[] pcs);
@@ -646,6 +647,7 @@
public void makeTransientAll(java.util.Collection pcs);
public void makeTransient(Object pc, boolean useFetchPlan);
public void makeTransientAll(Object[] pcs, boolean useFetchPlan);
+ public void makeTransientAll(boolean useFetchPlan, Object[] pcs);
public void makeTransientAll(java.util.Collection pcs, boolean useFetchPlan);
public void makeTransactional(Object pc);
public void makeTransactionalAll(Object[] pcs);
@@ -659,6 +661,7 @@
public void retrieveAll(java.util.Collection pcs, boolean FGOnly);
public void retrieveAll(Object[] pcs);
public void retrieveAll(Object[] pcs, boolean FGOnly);
+ public void retrieveAll(boolean FGOnly, Object[] pcs);
public void setUserObject(Object o);
public Object getUserObject();
public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory();
Index: ../tck2/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java
===================================================================
--- ../tck2/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java (revision 583962)
+++ ../tck2/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java (working copy)
@@ -893,6 +893,7 @@
else if (t.equals("strictfp")) m |= Modifier.STRICT;
else if (t.equals("synchronized")) m |= Modifier.SYNCHRONIZED;
else if (t.equals("transient")) m |= Modifier.TRANSIENT;
+ else if (t.equals("varargs")) m |= Modifier.TRANSIENT;
else if (t.equals("volatile")) m |= Modifier.VOLATILE;
else {
setLookAhead(t); // not a modifier
Index: ../tck2-legacy/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java
===================================================================
--- ../tck2-legacy/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java (revision 577821)
+++ ../tck2-legacy/src/java/org/apache/jdo/tck/util/signature/SignatureVerifier.java (working copy)
@@ -893,6 +893,7 @@
else if (t.equals("strictfp")) m |= Modifier.STRICT;
else if (t.equals("synchronized")) m |= Modifier.SYNCHRONIZED;
else if (t.equals("transient")) m |= Modifier.TRANSIENT;
+ else if (t.equals("varargs")) m |= Modifier.TRANSIENT;
else if (t.equals("volatile")) m |= Modifier.VOLATILE;
else {
setLookAhead(t); // not a modifier