Internal Website Search

1-50 of 58 results

[ODB1] Chapter 6 - Persistent Objects

of a persistent object can be done as follows: Object oid = pm.getObjectId(obj); Or by a static method (useful when a PersistenceManager is unavailable): Object oid = JDOHelper.getObjectId(obj); JDO ... ().begin(); Person person = new Person("George", "Bush"); pm.makePersistent(person); Object oid = pm

Query can't see recently persisted object

and incorrectly thrown for the same " oid " query parameter on subsequent occasions ... ( name = "MyQuery.findByOid", query = "select m from MyClass m where m. oid = : oid " ) } ) @Indices( { @Index( name = "MyClass_ind_1", members = { " oid " }, unique = "true" ) } ) @Entity public class

PersistenceManager.getObjectsById(Collection,boolean) throwing JDOException

containing a single oid object (the method is written to support multiple objects, but it seems to only be failing irregularly when only a single oid is present). I'm passing false in as the verification ... of my oids . If I call getObjectById() with an oid that is not known it'll throw a NullPointerException

PersistenceManager.getObjectById(oid,validate) - JDO Method

JDO Method in javax.jdo.PersistenceManager Object getObjectById (   Object  oid ... the cache with the specified JDO identity. The oid parameter object might have been returned by ... the application. If the PersistenceManager is unable to resolve the oid parameter to an ObjectId instance

JDOImplHelper.copyKeyFieldsFromObjectId(pcClass,fm,oid) - JDO Method

;Object  oid ) Copy fields to an outside source from the key fields in the ObjectId. This method ... (PersistenceCapable oid , ObjectIdFieldConsumer fm) { fm.storeIntField (0, oid .id); fm.storeStringField (1, oid .name); fm.storeObjectField (2, oid .salary); } The implementation is responsible for implementing

JDOImplHelper.copyKeyFieldsToObjectId(pcClass,fm,oid) - JDO Method

  oid ) Copy fields from an outside source to the key fields in the ObjectId. This method ... , and Float salary ) would have the method generated: void jdoCopyKeyFieldsToObjectId (Object oid , ObjectIdFieldSupplier fm) { oid .id = fm.fetchIntField (0); oid .name = fm.fetchStringField (1); oid .salary

PersistenceCapable.jdoCopyKeyFieldsToObjectId(fm,oid) - JDO Method

;PersistenceCapable.ObjectIdFieldSupplier fm,    Object  oid ) Copy fields from ... ) { EmployeeKey oid = (EmployeeKey)objectId; oid .id = fm.fetchIntField (0); oid .name = fm.fetchStringField (1); oid .salary = fm.fetchObjectField (2); } The implementation is responsible for implementing

PersistenceCapable.jdoCopyKeyFieldsFromObjectId(fm,oid) - JDO Method

;PersistenceCapable.ObjectIdFieldConsumer fm,    Object  oid ) Copy fields ... ) { EmployeeKey oid = (EmployeeKey)objectId; fm.storeIntField (0, oid .id); fm.storeStringField (1, oid .name); fm.storeObjectField (2, oid .salary); } The implementation is responsible for implementing

PersistenceManager.getObjectsById(validate,oids) - JDO Method

;validate,    Object...  oids ) Return the objects with the given oids . Parameters: oids - the oids of the objects to return 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 Also: getObjectById Since: JDO 2.1

PersistenceManager.getObjectsById(oids,validate) - JDO Method

; oids ,    boolean validate ) Return the objects with the given oids . Parameters: oids - the oids of the objects to return 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

PersistenceManager.getObjectsById(oids) - JDO Method

; oids ) Return the objects with the given oids . This method is equivalent to calling getObjectsById with the validate flag true. Parameters: oids - the oids of the objects to return Return: the objects that were looked up, in the same order as the oids parameter. See Also: getObjectsById Since: JDO 2.0

PersistenceManager.getObjectsById(oids) - JDO Method

; oids ) Return the objects with the given oids . This method is equivalent to calling (Collection, boolean) with the validate flag true. Parameters: oids - the oids of the objects to return Return: the objects that were looked up, in the same order as the oids parameter. See Also: getObjectsById Since: JDO 2.0

PersistenceManager.getObjectsById(oids,validate) - JDO Method

; oids ,    boolean validate ) Return the objects with the given oids . Parameters: oids - the oids of the objects to return 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 Also: getObjectById Since: JDO 2.0

JDOImplHelper.newInstance(pcClass,sm,oid) - JDO Method

;pcClass,     StateManager  sm,    Object  oid ) Create a new instance of the class and assign its jdoStateManager and key values from the ObjectId. If the oid ... instance. oid - the ObjectId instance from which to copy key field values. Return: the new instance

PersistenceManager.getObjectById(oid) - JDO Method

JDO Method in javax.jdo.PersistenceManager Object getObjectById (   Object  oid ) Looks up the instance corresponding to the specified oid . This is equivalent to getObjectById( oid , true); Parameters: oid - The object id of the object to load Return: the corresponding persistent instance Since: JDO 1.0

PersistenceCapable.jdoNewInstance(sm,oid) - JDO Method

; StateManager  sm,    Object  oid ) Return a new instance of this class, with the jdoStateManager set to the parameter, key fields initialized to the values in the oid ... instance. oid - an instance of the object id class (application identity). Return: a new instance

DataStoreCache.unpinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void unpinAll (   Object...  oids ) Unpin the parameter instance from the second-level cache. Parameters: oids - the object id of the instance to evict. Since: JDO 2.0

DataStoreCache.unpinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void unpinAll (   Collection  oids ) Unpin the parameter instances from the second-level cache. Parameters: oids - the object ids of the instance to evict. Since: JDO 2.0

DataStoreCache.unpin(oid) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void unpin (   Object  oid ) Unpin the parameter instance from the second-level cache. Parameters: oid - the object id of the instance to unpin. Since: JDO 2.0

DataStoreCache.pin(oid) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void pin (   Object  oid ) Pin the parameter instance in the second-level cache. Parameters: oid - the object id of the instance to pin. Since: JDO 2.0

DataStoreCache.pinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void pinAll (   Object...  oids ) Pin the parameter instances in the second-level cache. Parameters: oids - the object ids of the instances to pin. Since: JDO 2.0

DataStoreCache.pinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void pinAll (   Collection  oids ) Pin the parameter instances in the second-level cache. Parameters: oids - the object ids of the instances to pin. Since: JDO 2.0

DataStoreCache.evictAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void evictAll (   Object...  oids ) Evict the parameter instances from the second-level cache. Parameters: oids - the object ids of the instance to evict. Since: JDO 2.0

DataStoreCache.evictAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void evictAll (   Collection  oids ) Evict the parameter instances from the second-level cache. Parameters: oids - the object ids of the instance to evict. Since: JDO 2.0

DataStoreCache.evict(oid) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache void evict (   Object  oid ) Evict the parameter instance from the second-level cache. Parameters: oid - the object id of the instance to evict. Since: JDO 2.0

PersistenceCapable.jdoCopyKeyFieldsToObjectId(oid) - JDO Method

JDO Method in javax.jdo.spi.PersistenceCapable void jdoCopyKeyFieldsToObjectId (   Object  oid ) Copy fields from this PersistenceCapable instance to the Object Id instance. For classes using single field identity, this method always throws JDOUserException . Parameters: oid - the ObjectId target of the key fields Since: JDO 1.0

EmptyDataStoreCache.unpinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void unpinAll (   Object...  oids ) Since: JDO 2.0

EmptyDataStoreCache.unpin(oid) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void unpin (   Object  oid ) Since: JDO 2.0

EmptyDataStoreCache.unpinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void unpinAll (   Collection  oids ) Since: JDO 2.0

EmptyDataStoreCache.pinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void pinAll (   Collection  oids ) Since: JDO 2.0

EmptyDataStoreCache.pinAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void pinAll (   Object...  oids ) Since: JDO 2.0

EmptyDataStoreCache.evictAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void evictAll (   Collection  oids ) Since: JDO 2.0

EmptyDataStoreCache.pin(oid) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void pin (   Object  oid ) Since: JDO 2.0

EmptyDataStoreCache.evict(oid) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void evict (   Object  oid ) Since: JDO 2.0

EmptyDataStoreCache.evictAll(oids) - JDO Method

JDO Method in javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache void evictAll (   Object...  oids ) Since: JDO 2.0

javax.jdo.PersistenceManager

: the corresponding persistent instance Since: JDO 2.0 Object getObjectById (Object  oid ) Looks up the instance corresponding to the specified oid . This is equivalent to getObjectById( oid , true); Parameters: oid - The object id of the object to load Return: the corresponding persistent instance

javax.jdo.spi.PersistenceCapable

.ObjectIdFieldConsumer fm, Object  oid ) Copy fields to an outside consumer from the key fields in ... copyKeyFieldsFromObjectId (ObjectIdFieldConsumer fm, Object objectId) { EmployeeKey oid = (EmployeeKey)objectId; fm.storeIntField (0, oid .id); fm.storeStringField (1, oid .name); fm.storeObjectField (2, oid .salary

javax.jdo.datastore.DataStoreCache

standardizes this behavior. Since: JDO 2.0 Public Methods void evict (Object  oid ) Evict the parameter instance from the second-level cache. Parameters: oid - the object id of the instance to evict ... evictAll (Collection  oids ) Evict the parameter instances from the second-level cache

javax.jdo.spi.JDOImplHelper

 fm, Object  oid ) Copy fields to an outside source from the key fields in the ObjectId ... (PersistenceCapable oid , ObjectIdFieldConsumer fm) { fm.storeIntField (0, oid .id); fm.storeStringField (1, oid .name); fm.storeObjectField (2, oid .salary); } The implementation is responsible

javax.jdo.datastore.DataStoreCache$EmptyDataStoreCache

(Object  oid ) Since: JDO 2.0 void evictAll () Since: JDO 2.0 void evictAll (Class pcClass, boolean subclasses) Since: JDO 2.0 void evictAll (Collection  oids ) Since: JDO 2.0 void evictAll (Object...  oids ) Since: JDO 2.0 void evictAll (boolean subclasses, Class

javax.jdo.JDOHelper

() PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 1.0 Collection getObjectIds ... () PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 1.0 Object getVersion

javax.jdo.spi.StateInterrogation

. See Also: PersistenceManager.getObjectId (Object pc) PersistenceCapable() PersistenceManager.getObjectById (Object oid ,boolean ... . See Also: PersistenceCapable() PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 2.0 Object

JDOHelper.getTransactionalObjectId(pc) - JDO Static Method

in this transaction. See Also: PersistenceCapable() PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 1.0

JDOHelper.getObjectId(pc) - JDO Static Method

() PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 1.0

PersistenceManager.getTransactionalObjectId(pc) - JDO Method

- a PersistenceCapable instance Return: the ObjectId of the instance See Also: getObjectId (Object pc) getObjectById (Object oid ,boolean validate) Since: JDO 1.0

PersistenceManager.getObjectId(pc) - JDO Method

of the instance See Also: getTransactionalObjectId (Object pc) getObjectById (Object oid ,boolean validate) Since: JDO 1.0

StateInterrogation.getObjectId(pc) - JDO Method

pc) PersistenceCapable() PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 2.0

StateInterrogation.getTransactionalObjectId(pc) - JDO Method

() PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 2.0

PersistenceCapable.jdoGetObjectId() - JDO Method

. See Also: PersistenceManager.getObjectId (Object pc) PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 1.0

PersistenceCapable.jdoGetTransactionalObjectId() - JDO Method

. See Also: jdoGetObjectId () PersistenceManager.getObjectId (Object pc) PersistenceManager.getObjectById (Object oid ,boolean validate) Since: JDO 1.0