Class JDOAdapter
java.lang.Object
org.datanucleus.api.jdo.JDOAdapter
- All Implemented Interfaces:
Serializable, org.datanucleus.api.ApiAdapter
Adapter for the JDO API, to allow the DataNucleus core runtime to expose multiple APIs to clients.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleangetApiExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne) booleanbooleanbooleanbooleanbooleanbooleanbooleanorg.datanucleus.ExecutionContextstatic javax.jdo.JDOExceptiongetJDOExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne) Convenience method to convert an exception into a JDO exception.org.datanucleus.state.LifeCycleStategetLifeCycleState(int stateType) getName()Accessor for the name of the API.getObjectState(Object obj) getXMLMetaDataForClass(org.datanucleus.metadata.AbstractClassMetaData cmd, String prefix, String indent) booleanbooleanisValidPrimaryKeyClass(Class pkClass, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr, int noOfPkFields, org.datanucleus.metadata.MetaDataManager mmgr) private intprocessPrimaryKeyClass(Class pkClass, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr, org.datanucleus.metadata.MetaDataManager mmgr) Convenience method to process a PK class and return the number of valid fields found.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.datanucleus.api.ApiAdapter
copyKeyFieldsFromIdToObject, getIdForObject, getStateManager, getVersionForObject, isDeleted, isDetachable, isDetached, isDirty, isManaged, isNew, isPersistable, isPersistable, isPersistent, isTransactional, makeDirty
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
defaultPersistentTypeNames
-
-
Constructor Details
-
JDOAdapter
public JDOAdapter()
-
-
Method Details
-
getName
Accessor for the name of the API.- Specified by:
getNamein interfaceorg.datanucleus.api.ApiAdapter- Returns:
- Name of the API
-
isMemberDefaultPersistent
- Specified by:
isMemberDefaultPersistentin interfaceorg.datanucleus.api.ApiAdapter
-
getXMLMetaDataForClass
-
getDefaultMappingFileLocation
- Specified by:
getDefaultMappingFileLocationin interfaceorg.datanucleus.api.ApiAdapter
-
getExecutionContext
- Specified by:
getExecutionContextin interfaceorg.datanucleus.api.ApiAdapter
-
getLifeCycleState
public org.datanucleus.state.LifeCycleState getLifeCycleState(int stateType) - Specified by:
getLifeCycleStatein interfaceorg.datanucleus.api.ApiAdapter
-
getObjectState
-
isValidPrimaryKeyClass
public boolean isValidPrimaryKeyClass(Class pkClass, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr, int noOfPkFields, org.datanucleus.metadata.MetaDataManager mmgr) - Specified by:
isValidPrimaryKeyClassin interfaceorg.datanucleus.api.ApiAdapter
-
processPrimaryKeyClass
private int processPrimaryKeyClass(Class pkClass, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr, org.datanucleus.metadata.MetaDataManager mmgr) Convenience method to process a PK class and return the number of valid fields found. Throws InvalidPrimaryKeyException if a field is invalid- Parameters:
pkClass- The PK class.cmd- MetaData for the class that this is the PK formmgr- MetaData manager- Returns:
- The number of PK fields
-
allowPersistOfDeletedObject
public boolean allowPersistOfDeletedObject()- Specified by:
allowPersistOfDeletedObjectin interfaceorg.datanucleus.api.ApiAdapter
-
allowDeleteOfNonPersistentObject
public boolean allowDeleteOfNonPersistentObject()- Specified by:
allowDeleteOfNonPersistentObjectin interfaceorg.datanucleus.api.ApiAdapter
-
allowReadFieldOfDeletedObject
public boolean allowReadFieldOfDeletedObject()- Specified by:
allowReadFieldOfDeletedObjectin interfaceorg.datanucleus.api.ApiAdapter
-
clearLoadedFlagsOnDeleteObject
public boolean clearLoadedFlagsOnDeleteObject()- Specified by:
clearLoadedFlagsOnDeleteObjectin interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadePersistForField
public boolean getDefaultCascadePersistForField()- Specified by:
getDefaultCascadePersistForFieldin interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeAttachForField
public boolean getDefaultCascadeAttachForField()- Specified by:
getDefaultCascadeAttachForFieldin interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeDeleteForField
public boolean getDefaultCascadeDeleteForField()- Specified by:
getDefaultCascadeDeleteForFieldin interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeDetachForField
public boolean getDefaultCascadeDetachForField()- Specified by:
getDefaultCascadeDetachForFieldin interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeRefreshForField
public boolean getDefaultCascadeRefreshForField()- Specified by:
getDefaultCascadeRefreshForFieldin interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultDFGForPersistableField
public boolean getDefaultDFGForPersistableField()- Specified by:
getDefaultDFGForPersistableFieldin interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultFactoryProperties
-
getDefaultPersistentPropertyWhenNotSpecified
public boolean getDefaultPersistentPropertyWhenNotSpecified()- Specified by:
getDefaultPersistentPropertyWhenNotSpecifiedin interfaceorg.datanucleus.api.ApiAdapter
-
getUserExceptionForException
- Specified by:
getUserExceptionForExceptionin interfaceorg.datanucleus.api.ApiAdapter
-
getDataStoreExceptionForException
- Specified by:
getDataStoreExceptionForExceptionin interfaceorg.datanucleus.api.ApiAdapter
-
getApiExceptionForNucleusException
public RuntimeException getApiExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne) - Specified by:
getApiExceptionForNucleusExceptionin interfaceorg.datanucleus.api.ApiAdapter
-
getJDOExceptionForNucleusException
public static javax.jdo.JDOException getJDOExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne) Convenience method to convert an exception into a JDO exception. If the incoming exception has a "failed object" then create the new exception with a failed object. Otherwise if the incoming exception has nested exceptions then create this exception with those nested exceptions. Else create this exception with the incoming exception as its nested exception.- Parameters:
ne- NucleusException- Returns:
- The JDOException
-