public class FederatedPersistenceHandler extends Object implements StorePersistenceHandler
StorePersistenceHandler.PersistenceBatchType
Constructor and Description |
---|
FederatedPersistenceHandler(StoreManager storeMgr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
batchEnd(ExecutionContext ec,
StorePersistenceHandler.PersistenceBatchType type)
Signal that the current batch of operations are ending for the specified ExecutionContext.
|
void |
batchStart(ExecutionContext ec,
StorePersistenceHandler.PersistenceBatchType batchType)
Signal that a batch of operations are starting for the specified ExecutionContext.
|
void |
close()
Method to close the persistence handler, and release any resources.
|
void |
deleteObject(ObjectProvider op)
Deletes a persistent object from the datastore.
|
void |
deleteObjects(ObjectProvider... ops)
Method to delete an array of objects from the datastore.
|
void |
fetchObject(ObjectProvider op,
int[] fieldNumbers)
Fetches specified fields of a persistent object from the database.
|
void |
fetchObjects(int[] fieldNumbers,
ObjectProvider... ops)
Fetches specified fields of several persistent objects (of the same type) from the database.
|
Object |
findObject(ExecutionContext ec,
Object id)
Method to find a persistable object with the specified id from the datastore, if the StoreManager
supports this operation (optional).
|
Object |
findObjectForUnique(ExecutionContext ec,
AbstractClassMetaData cmd,
String[] memberNames,
Object[] values)
Method to find the object with the specified value(s) for the member(s) of the specified type.
|
Object[] |
findObjects(ExecutionContext ec,
Object[] ids)
Method to find an array of objects with the specified identities from the datastore.
|
void |
insertObject(ObjectProvider op)
Inserts a persistent object into the database.
|
void |
insertObjects(ObjectProvider... ops)
Method to insert an array of objects to the datastore.
|
void |
locateObject(ObjectProvider op)
Locates this object in the datastore.
|
void |
locateObjects(ObjectProvider[] ops)
Locates object(s) in the datastore.
|
void |
updateObject(ObjectProvider op,
int[] fieldNumbers)
Updates a persistent object in the datastore.
|
boolean |
useReferentialIntegrity() |
public FederatedPersistenceHandler(StoreManager storeMgr)
storeMgr
- StoreManagerpublic void close()
StorePersistenceHandler
close
in interface StorePersistenceHandler
public boolean useReferentialIntegrity()
public void insertObjects(ObjectProvider... ops)
StorePersistenceHandler
insertObjects
in interface StorePersistenceHandler
ops
- ObjectProviders for the objects to insertpublic void deleteObjects(ObjectProvider... ops)
StorePersistenceHandler
deleteObjects
in interface StorePersistenceHandler
ops
- ObjectProviders for the objects to deletepublic void batchStart(ExecutionContext ec, StorePersistenceHandler.PersistenceBatchType batchType)
StorePersistenceHandler
batchStart
in interface StorePersistenceHandler
ec
- The ExecutionContextbatchType
- Type of this batch that is startingpublic void batchEnd(ExecutionContext ec, StorePersistenceHandler.PersistenceBatchType type)
StorePersistenceHandler
batchEnd
in interface StorePersistenceHandler
ec
- The ExecutionContexttype
- Type of batch that is endingpublic void insertObject(ObjectProvider op)
StorePersistenceHandler
insertObject
in interface StorePersistenceHandler
op
- The ObjectProvider of the object to be inserted.public void updateObject(ObjectProvider op, int[] fieldNumbers)
StorePersistenceHandler
updateObject
in interface StorePersistenceHandler
op
- The ObjectProvider of the object to be updated.fieldNumbers
- The numbers of the fields to be updated.public void deleteObject(ObjectProvider op)
StorePersistenceHandler
deleteObject
in interface StorePersistenceHandler
op
- The ObjectProvider of the object to be deleted.public void fetchObject(ObjectProvider op, int[] fieldNumbers)
StorePersistenceHandler
fetchObject
in interface StorePersistenceHandler
op
- The ObjectProvider of the object to be fetched.fieldNumbers
- The numbers of the fields to be fetched.public void fetchObjects(int[] fieldNumbers, ObjectProvider... ops)
StorePersistenceHandler
fetchObjects
in interface StorePersistenceHandler
fieldNumbers
- The numbers of the fields to be fetched.ops
- The ObjectProviders of the objects to be fetched.public void locateObject(ObjectProvider op)
StorePersistenceHandler
locateObject
in interface StorePersistenceHandler
op
- The ObjectProvider for the object to be foundpublic void locateObjects(ObjectProvider[] ops)
StorePersistenceHandler
locateObjects
in interface StorePersistenceHandler
ops
- ObjectProvider(s) for the object(s) to be foundpublic Object findObject(ExecutionContext ec, Object id)
StorePersistenceHandler
findObject
in interface StorePersistenceHandler
ec
- The ExecutionContextid
- the id of the object in question.public Object[] findObjects(ExecutionContext ec, Object[] ids)
StorePersistenceHandler
findObjects
in interface StorePersistenceHandler
ec
- The ExecutionContextids
- identities of the object(s) to retrieveids)
public Object findObjectForUnique(ExecutionContext ec, AbstractClassMetaData cmd, String[] memberNames, Object[] values)
StorePersistenceHandler
findObjectForUnique
in interface StorePersistenceHandler
ec
- ExecutionContextcmd
- Metadata for the class in questionmemberNames
- Member(s) that define the objectvalues
- Value(s) for the member(s)Copyright © 2019. All rights reserved.