public interface ApiAdapter extends Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowDeleteOfNonPersistentObject()
Whether the API allows deletion of a non-persistent object.
|
boolean |
allowPersistOfDeletedObject()
Whether the API allows (re-)persistence of a deleted object.
|
boolean |
allowReadFieldOfDeletedObject()
Whether the API allows reading a field of a deleted object.
|
boolean |
clearLoadedFlagsOnDeleteObject()
Whether the API requires clearing of the fields of an object when it is deleted.
|
void |
copyKeyFieldsFromIdToObject(Object pc,
Persistable.ObjectIdFieldConsumer fm,
Object id)
Method to set the pk fields of the object from the provided identity.
|
RuntimeException |
getApiExceptionForNucleusException(NucleusException ne)
Convenience method to convert the passed NucleusException into an exception for the API.
|
RuntimeException |
getDataStoreExceptionForException(String msg,
Exception e)
Convenience method to return a datastore exception appropriate for this API.
|
boolean |
getDefaultCascadeDeleteForField()
Method to return the default setting for cascading delete of a field
|
boolean |
getDefaultCascadePersistForField()
Method to return the default setting for cascading persist of a field
|
boolean |
getDefaultCascadeRefreshForField()
Method to return the default setting for cascading refresh of a field
|
boolean |
getDefaultCascadeUpdateForField()
Method to return the default setting for cascading update of a field
|
boolean |
getDefaultDFGForPersistableField()
Method to return the default DFG setting for a persistable field.
|
Map |
getDefaultFactoryProperties()
Method to return a set of default properties for the factory (PMF, EMF, etc)
|
ExecutionContext |
getExecutionContext(Object pc)
Method to return the ExecutionContext (if any) associated with the passed object.
|
Object |
getIdForObject(Object obj)
Method to return the object identity for the passed persistable object.
|
LifeCycleState |
getLifeCycleState(int stateType)
Returns the LifeCycleState for the state constant.
|
String |
getName()
Accessor for the name of the API.
|
String |
getObjectState(Object obj)
Accessor for the object state.
|
RuntimeException |
getUserExceptionForException(String msg,
Exception e)
Convenience method to return a user exception appropriate for this API when an unexpected
exception occurs.
|
Object |
getVersionForObject(Object obj)
Method to return the object version for the passed persistable object.
|
boolean |
isDeleted(Object obj)
Accessor for whether the passed object is deleted.
|
boolean |
isDetachable(Object obj)
Method to return if the passed object is detachable using this API.
|
boolean |
isDetached(Object obj)
Accessor for whether the passed object is detached.
|
boolean |
isDirty(Object obj)
Accessor for whether the passed object is dirty.
|
boolean |
isManaged(Object pc)
Whether the provided object is currently managed (has an ExecutionContext).
|
boolean |
isMemberDefaultPersistent(Class type)
Accessor for whether this member type is default persistent.
|
boolean |
isNew(Object obj)
Accessor for whether the passed object is new.
|
boolean |
isPersistable(Class cls)
Utility method to check if the specified class is of a type that can be persisted for this API.
|
boolean |
isPersistable(Object obj)
Method to return if the passed object is persistable using this API.
|
boolean |
isPersistent(Object obj)
Accessor for whether the passed object is persistent.
|
boolean |
isTransactional(Object obj)
Accessor for whether the passed object is transactional.
|
boolean |
isValidPrimaryKeyClass(Class pkClass,
AbstractClassMetaData cmd,
ClassLoaderResolver clr,
int noOfPkFields,
MetaDataManager mmgr)
Utility to check if a primary-key class is valid.
|
void |
makeDirty(Object obj,
String member)
Method to make the member of the persistable object dirty.
|
String getName()
boolean isMemberDefaultPersistent(Class type)
type - Member typeboolean isManaged(Object pc)
pc - The persistable objectExecutionContext getExecutionContext(Object pc)
pc - The objectLifeCycleState getLifeCycleState(int stateType)
stateType - the type as integerboolean isPersistent(Object obj)
obj - The objectboolean isNew(Object obj)
obj - The objectboolean isDirty(Object obj)
obj - The objectboolean isDeleted(Object obj)
obj - The objectboolean isDetached(Object obj)
obj - The objectboolean isTransactional(Object obj)
obj - The objectboolean isPersistable(Object obj)
obj - The objectboolean isPersistable(Class cls)
cls - The class to checkboolean isDetachable(Object obj)
obj - The objectString getObjectState(Object obj)
obj - Objectvoid makeDirty(Object obj, String member)
obj - The objectmember - Name of the memberObject getIdForObject(Object obj)
obj - The objectObject getVersionForObject(Object obj)
obj - The objectboolean isValidPrimaryKeyClass(Class pkClass, AbstractClassMetaData cmd, ClassLoaderResolver clr, int noOfPkFields, MetaDataManager mmgr)
pkClass - The Primary Key classcmd - AbstractClassMetaData for the persistable classclr - the ClassLoaderResolvernoOfPkFields - Number of primary key fieldsmmgr - MetaData managervoid copyKeyFieldsFromIdToObject(Object pc, Persistable.ObjectIdFieldConsumer fm, Object id)
pc - The persistable objectfm - ObjectIdFieldConsumerid - The identityboolean allowPersistOfDeletedObject()
boolean allowDeleteOfNonPersistentObject()
boolean allowReadFieldOfDeletedObject()
boolean clearLoadedFlagsOnDeleteObject()
boolean getDefaultCascadePersistForField()
boolean getDefaultCascadeUpdateForField()
boolean getDefaultCascadeDeleteForField()
boolean getDefaultCascadeRefreshForField()
boolean getDefaultDFGForPersistableField()
Map getDefaultFactoryProperties()
RuntimeException getApiExceptionForNucleusException(NucleusException ne)
ne - The NucleusExceptionRuntimeException getUserExceptionForException(String msg, Exception e)
msg - The messagee - The cause (if any)RuntimeException getDataStoreExceptionForException(String msg, Exception e)
msg - The messagee - The cause (if any)Copyright © 2017. All rights reserved.