public interface StorePersistenceHandler
public MyPersistenceHandler(StoreManager storeMgr) { }
Modifier and Type | Interface and Description |
---|---|
static class |
StorePersistenceHandler.PersistenceBatchType
Enum for the type of a batched operation
|
Modifier and Type | Method and Description |
---|---|
default void |
batchEnd(ExecutionContext ec,
StorePersistenceHandler.PersistenceBatchType type)
Signal that the current batch of operations are ending for the specified ExecutionContext.
|
default 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.
|
default 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.
|
default 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.
|
default 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.
|
default void |
insertObjects(ObjectProvider... ops)
Method to insert an array of objects to the datastore.
|
void |
locateObject(ObjectProvider op)
Locates this object in the datastore.
|
default void |
locateObjects(ObjectProvider[] ops)
Locates object(s) in the datastore.
|
void |
updateObject(ObjectProvider op,
int[] fieldNumbers)
Updates a persistent object in the datastore.
|
void close()
default void batchStart(ExecutionContext ec, StorePersistenceHandler.PersistenceBatchType batchType)
ec
- The ExecutionContextbatchType
- Type of this batch that is startingdefault void batchEnd(ExecutionContext ec, StorePersistenceHandler.PersistenceBatchType type)
ec
- The ExecutionContexttype
- Type of batch that is endingvoid insertObject(ObjectProvider op)
op
- The ObjectProvider of the object to be inserted.NucleusDataStoreException
- when an error occurs in the datastore communicationdefault void insertObjects(ObjectProvider... ops)
ops
- ObjectProviders for the objects to insertvoid updateObject(ObjectProvider op, int[] fieldNumbers)
op
- The ObjectProvider of the object to be updated.fieldNumbers
- The numbers of the fields to be updated.NucleusDataStoreException
- when an error occurs in the datastore communicationvoid deleteObject(ObjectProvider op)
op
- The ObjectProvider of the object to be deleted.NucleusDataStoreException
- when an error occurs in the datastore communicationdefault void deleteObjects(ObjectProvider... ops)
ops
- ObjectProviders for the objects to deletevoid fetchObject(ObjectProvider op, int[] fieldNumbers)
op
- The ObjectProvider of the object to be fetched.fieldNumbers
- The numbers of the fields to be fetched.NucleusObjectNotFoundException
- if the object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationdefault void fetchObjects(int[] fieldNumbers, ObjectProvider... ops)
fieldNumbers
- The numbers of the fields to be fetched.ops
- The ObjectProviders of the objects to be fetched.NucleusObjectNotFoundException
- if the object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationvoid locateObject(ObjectProvider op)
op
- The ObjectProvider for the object to be foundNucleusObjectNotFoundException
- if the object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationdefault void locateObjects(ObjectProvider[] ops)
ops
- ObjectProvider(s) for the object(s) to be foundNucleusObjectNotFoundException
- if an object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationObject findObject(ExecutionContext ec, Object id)
ec
- The ExecutionContextid
- the id of the object in question.NucleusObjectNotFoundException
- if this route is supported yet the object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationdefault Object[] findObjects(ExecutionContext ec, Object[] ids)
ec
- The ExecutionContextids
- identities of the object(s) to retrieveids)
NucleusObjectNotFoundException
- if an object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationObject findObjectForUnique(ExecutionContext ec, AbstractClassMetaData cmd, String[] memberNames, Object[] values)
ec
- ExecutionContextcmd
- Metadata for the class in questionmemberNames
- Member(s) that define the objectvalues
- Value(s) for the member(s)NucleusObjectNotFoundException
- if an object doesn't existNucleusDataStoreException
- when an error occurs in the datastore communicationCopyright © 2019. All rights reserved.