Differences between revisions 9 and 10
Revision 9 as of 2005-10-21 21:29:43
Size: 13669
Editor: CraigRussell
Comment:
Revision 10 as of 2009-09-20 23:08:37
Size: 13669
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
These are the assertions, in addition to those for metadata (["XMLMetadata"]) and query (QueryTests), that need to be tested to complete the JDO 2.0 TCK. See the spec for more information on each assertion. If you wish to volunteer, enter a JIRA issue if one has not already been created and add your initials to the Who column. Discuss the issue with comments on JIRA. These are the assertions, in addition to those for metadata ([[XMLMetadata]]) and query (QueryTests), that need to be tested to complete the JDO 2.0 TCK. See the spec for more information on each assertion. If you wish to volunteer, enter a JIRA issue if one has not already been created and add your initials to the Who column. Discuss the issue with comments on JIRA.

JDO 2.0 TCK Assertions to be Tested

These are the assertions, in addition to those for metadata (XMLMetadata) and query (QueryTests), that need to be tested to complete the JDO 2.0 TCK. See the spec for more information on each assertion. If you wish to volunteer, enter a JIRA issue if one has not already been created and add your initials to the Who column. Discuss the issue with comments on JIRA.

Spreadsheet Tab

Number

Test

Who

JIRA

LifeCycle

A5.1-AD1

detached.

.

.

LifeCycle

A5.1-AD2

[A detached instance]... and any attempt to access unloaded fields, whether for read or write, is denied

.

.

LifeCycle

A5.1-AD3

A detached instance maintains its persistent identity and the identity can be obtained by an observer.

.

.

LifeCycle

A5.1-AD4

A detached instance allows changes to be made to loaded fields, and tracks those changes detached.

.

.

LifeCycle

A5.1-AD5

Detached instances never observe transaction boundaries.

.

.

LifeCycle

A5.5.8-AD1

JDO instances that have been removed from their persistence manager and have not been modified are detached-clean.

.

.

LifeCycle

A5.5.8-AD2

Detached-clean instances transition to detached-dirty if a loaded field is modified.

.

.

LifeCycle

A5.5.8-AD3

Attempts to change their state via any of the persistence manager methods (e.g. makePersistent, deletePersistent, etc.) throw JDOUserException.

.

.

LifeCycle

A5.5.9-AD1

the instance is detached in the persistent-dirty state while the PersistenceManager flag DetachDirty is true;

.

.

LifeCycle

A5.5.9-AD2

a field of the detached instance is explicitly modified by the application. Dirty-detached instances do not change their life cycle state.

.

.

PC

A7.5-1

PersistenceCapable jdoNewInstance(StateManager sm); A7.5-1 [This method creates a new instance of the class of the instance.]

.

.

PC

A7.5-2

A7.5-2 [If the class is abstract, null is returned.]

.

.

PC

A7.5-3

PersistenceCapable jdoNewInstance(StateManager sm, Object oid); A7.5-3 [This method creates a new instance of the class of the instance, and copies key field values from the oid parameter instance.]

.

.

PC

A7.12-1

public Object jdoNewObjectIdInstance(); A7.12-1 [This method creates a new instance of the class used for JDO identity.]

.

.

PC

A7.12-2

public Object jdoNewObjectIdInstance();A7.12-2 [If the class has been enhanced for datastore identity], or A7.12-3 [if the class is abstract, null is returned. ]

.

.

PC

A7.12-3

public Object jdoNewObjectIdInstance(); or A7.12-3 [if the class is abstract, null is returned. ]

.

.

PC

A7.12-20

Public Object jdoNewObjectIdInstance(String str); A7.12-20 [This method creates a new instance of the class used for JDO identity, using the String constructor of the object id class. It is intended only for application identity.]

.

.

PC

A7.12-21

A7.12-21 [If the class has been enhanced for datastore identity],

.

.

PC

A7.12-22

A7.12-22 [if the class is abstract], null is returned.

.

.

PC

A7.12-40

A7.12-40 [ObjectIdFieldSupplier: the field values are fetched and used to construct the single field identity instance]

.

.

PC

A7.12-41

A7.12-41 [Number: the parameter key must be an instance of the key type or, for primitive key types, the wrapper of the key type; the key is passed as a parameter to the single field identity constructor].

.

.

PC

A7.12-42

A7.12-42 [String: the String is parsed to a value of the appropriate type and the value is used to construct the single field identity instance. For ObjectIdentity, the String is decomposed into two parts using “:” as a delimiter. The first part is the class name; the second is the String representation of the value of the class]

.

.

PC

A7.12-43

A7.12-43 [Object: for ObjectIdentity, the key type must be assignable from the parameter key]

.

.

PC

A7.13-1

A7.13-1 [void jdoReplaceDetachedState(); This method calls the StateManager with the current detached state instance as a parameter and replaces the current detached state instance with the value provided by the StateManager.]

.

.

JDOHelper

A8.3-11

A8.3-11 [static Object[] getObjectIds (Object[] pcs); static Collection getObjectIds (Collection pcs); These methods return the JDO identities of the parameter instances. For each instance in the param­eter, the getObjectId method is called. They return one identity instance for each persistence-capable instance in the parameter. The order of iteration of the returned Collection exactly matches the order of iteration of the parameter Collection].

.

JDO-188

JDOHelper

A8.4-1

A8.4-1 [static Object getVersion (Object pc); This method returns the JDO version of the instance for persistent and detached instances. It returns null if the instance is transient or null or if its class is not persistence-capable.]

.

.

JDOHelper

A8.5.6-1

A8.5.6-1 [static boolean isDetached (Object pc); Instances that have been detached return true. The method returns false if the instance is transient or null or if its class is not detachable.]

.

.

JDOHelper

A8.6-4

If there are any exceptions while trying to construct the Properties instance or to call the static method, then either A8.6-4 [JDOFatalUserException] or

.

.

JDOHelper

A8.6-5

[JDOFatalInternalException is thrown], depending on whether the exception is due to the user or the implementation.

.

.

JDOHelper

A8.6-6

A8.6-6 [If the class named by the javax.jdo.PersistenceManagerFactoryClass property cannot be found, or is not accessible to the user, then JDOFatalUserException is thrown.]

.

.

JDOHelper

A8.6-7

A8.6-7 [If there is no public static implementation of the getPersistenceManagerFactory(Properties) method, then JDOFatalInternalException is thrown.]

.

.

PMF

A11.4-10

A11.4-10 [boolean isClosed(); Return true if this PersistenceManagerFactory is closed; and false otherwise.]

.

JDO-189

PMF

A11.8-1

A11.8-1 [To obtain a reference to the cache manager, the getDataStoreCache() method of PersistenceManagerFactory is used. DataStoreCache getDataStoreCache(); If there is no second-level cache, the returned instance silently does nothing.]

.

JDO-190

PMF

A11.9-1

A11.9-1 [void addInstanceLifecycleListener (InstanceLifecycleListen­er listener, Class[] classes); This PersistenceManagerFactory method adds the listener to the list of instance lifecycle event listeners set as the initial listeners for each PersistenceManager created by this Per­sistenceManagerFactory. The classes parameter identifies all of the classes of interest. If the classes parameter is specified as null, events for all persistent classes and interfaces are gen­erated. If the classes specified have persistence-capable subclasses, all such subclasses are regis­tered implicitly. The listener will be called for each event for which it implements the corresponding listener inter­face.]

.

.

PMF

A11.9-2

A11.9-2 [void removeInstanceLifecycleListener (InstanceLifecycleListener listener); This PersistenceManagerFactory method removes the listener from the list of event listen­ers set as the initial listeners for each PersistenceManager created by this PersistenceManagerFactory.]

.

.

PM

A12.5.1-2

A12.5.1-2 (PART 1) [If evictAll with no parameters is called, then all persistent-clean instances are evicted (they transition to hollow).] A12.5.1-2 (PART 2), A12.5.1-3 (PART 2), A12.5.1-4 (PART 2) [For each persistent-clean and persistent-nontransactional instance that the JDO PersistenceManager evicts, it: calls the jdoPreClear method on each instance, if the class of the instance implements InstanceCallbacks clears persistent fields on each instance (sets the value of the field to its Java default value); changes the state of instances to hollow or persistent-nontransactional (cannot distinguish between these two states) this is not directly testable..]] See spreadsheet for more info.

.

.

PM

A12.5.4-2

Extent getExtent (Class persistenceCapable, boolean subclasses); Extent getExtent (Class persistenceCapable); A12.5.4-2, A12.5.4-3 [The getExtent method returns an Extent that contains all of the instances in the parameter class or interface, and if the subclasses flag is true, all of the instances of the parameter class and its subclasses.] The method with no subclasses parameter is treated as equiv­alent to getExtent (persistenceCapable, true).] See spreadsheet for more info.

.

.

PM

A12.7.1-1

A12.7.1-1 [/** Add the fetchgroup to the set of active fetch groups. Duplicate names will be removed.*/ FetchPlan addGroup(String fetchGroupName); /** Remove the fetch group from the set active fetch groups. */ FetchPlan removeGroup(String fetchGroupName); /** Remove all active groups, including the default fetch group. */ FetchPlan clearGroups(); /** Return an immutable Set of the names of all active fetch groups.*/ Set getGroups(); /** Set a Collection of group names to replace the current groups. Duplicate names will be removed.*/ FetchPlan setGroups(Collection fetchGroupNames); /** Set an array of group names to replace the current groups. Duplicate names will be removed.*/ FetchPlan setGroups(String[] fetchGroupNames); /** Set a single group to replace the current groups. */ FetchPlan setGroup(String fetchGroupName);]]

.

.

PM

A12.7.1-2

A12.7.1-2 [/** Set the fetch size for large result set support. */ FetchPlan setFetchSize(int fetchSize); /** Return the fetch size; 0 if not set; -1 for greedy fetching. */ int getFetchSize();]

.

.

PM

A12.7.1-3

A12.7.1-3 [/** Set detachment options */ FetchPlan setDetachmentOptions(int options); /** Return the detachment options */ int getDetachmentOptions();]]

.

.

PM

A12.7-3

A12.7-3 [FetchPlan getFetchPlan(); This method retrieves the FetchPlan associated with the PersistenceManager. It always returns the identical instance for the same PersistenceManager]

.

.

PM

A12.8-2

A12.8-2 [void flush(); This method flushes all dirty, new, and deleted instances to the datastore. It has no effect if a transaction is not active. If a datastore transaction is active, this method synchronizes the cache with the datastore and reports any exceptions. If an optimistic transaction is active, this method obtains a datastore connection and synchronizes the cache with the datastore using this connection. The connection obtained by this method is held until the end of the transaction..]

.

.

PM

12.5.6-18

12.5.6-18 [Object getObjectById (Class cls, Object key); The getObjectById method attempts to find an instance in the cache with the derived JDO identity. The key parameter is either the string representation of the object id, or is an object repre­sentation of a single field identity key.]]

.

.

PM

12.5.6-17

12.5.6-17 [Collection getObjectsById (Collection oids); Object[] getObjectsById (Object[] oids); Collection getObjectsById (Collection oids, boolean validate); Object[] getObjectsById (Object[] oids, boolean validate); The getObjectsById method attempts to find instances in the cache with the specified JDO identities. The elements of the oids parameter object might have been returned by earlier calls to getObjectId or getTransactionalObjectId, or might have been constructed by the application. If a method with no validate parameter is used, the method behaves exactly as the correspond­ing method with the validate flag set to true. If the Object[] form of the method is used, the returned objects correspond by position with the object ids in the oids parameter. If the Collection form of the method is used, the iterator over the returned Collection returns instances in the same order as the oids returned by an iterator over the parameter Collection. The cardinality of the return value is the same as the cardinality of the oids parameter. ]

.

JDO-141

PM

A12.14-1

A12.14-1 [The PersistenceManager provides a method to retrieve a Sequence by name. Sequence getSequence(String name); If the named sequence does not exist, JDOUserException is thrown.]]

.

.

PM

A12.14-2

A12.14-2 [String getName(); This method returns the fully qualified name of the Sequence.]]

.

.

PM

A12.14-3

A12.14-3 [Object next(); This method returns the next sequence value object. The sequence might be protected by transac­tional semantics, in which case the sequence value object will be reused if the transaction in which the sequence value object was obtained rolls back.]]

.

.

PM

A12.14-4

A12.14-4 [Object current(); This method returns the current sequence value object if it is available. It is intended to return a se­quence value object previously used.]]

.

.

PM

A12.14-5

A12.14-5 [long nextValue(); This method returns the next sequence value as a long if it is available and able to be converted to a number].]

.

.

PM

A12.14-6

A12.14-6 [long currentValue(); This method returns the current sequence value as a long if it is available and able to be converted to a number.]]

.

.

PM

A12.16-1

A12.16-1 [JDOConnection getDataStoreConnection(); If this method is called while a datastore transaction is active, the object returned will be enlisted in the current transaction. If called in an optimistic transaction before flush has been called, or outside an active transaction, the object returned will not be enlisted in any transaction.]]

.

JDO-191

AllTheOtherTests (last edited 2009-09-20 23:08:37 by localhost)