public class JDOAdapter extends Object implements org.datanucleus.api.ApiAdapter
Modifier and Type | Field and Description |
---|---|
protected static Set<String> |
defaultPersistentTypeNames |
Constructor and Description |
---|
JDOAdapter() |
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.
|
RuntimeException |
getApiExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne) |
RuntimeException |
getDataStoreExceptionForException(String msg,
Exception e)
Convenience method to return a datastore exception appropriate for this API.
|
boolean |
getDefaultCascadeDeleteForField() |
boolean |
getDefaultCascadeDetachForField() |
boolean |
getDefaultCascadePersistForField() |
boolean |
getDefaultCascadeRefreshForField() |
boolean |
getDefaultCascadeUpdateForField() |
boolean |
getDefaultDFGForPersistableField() |
Map |
getDefaultFactoryProperties()
Method to return the default factory properties for this API.
|
org.datanucleus.ExecutionContext |
getExecutionContext(Object obj)
Method to return the ExecutionContext (if any) associated with the passed object.
|
org.datanucleus.state.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.
|
boolean |
isMemberDefaultPersistent(Class type) |
boolean |
isValidPrimaryKeyClass(Class pkClass,
org.datanucleus.metadata.AbstractClassMetaData cmd,
org.datanucleus.ClassLoaderResolver clr,
int noOfPkFields,
org.datanucleus.metadata.MetaDataManager mmgr)
Utility to check if a primary-key class is valid.
|
public String getName()
getName
in interface org.datanucleus.api.ApiAdapter
public boolean isMemberDefaultPersistent(Class type)
isMemberDefaultPersistent
in interface org.datanucleus.api.ApiAdapter
public org.datanucleus.ExecutionContext getExecutionContext(Object obj)
getExecutionContext
in interface org.datanucleus.api.ApiAdapter
obj
- The objectpublic org.datanucleus.state.LifeCycleState getLifeCycleState(int stateType)
getLifeCycleState
in interface org.datanucleus.api.ApiAdapter
stateType
- the type as integerpublic String getObjectState(Object obj)
getObjectState
in interface org.datanucleus.api.ApiAdapter
obj
- Objectpublic boolean isValidPrimaryKeyClass(Class pkClass, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr, int noOfPkFields, org.datanucleus.metadata.MetaDataManager mmgr)
isValidPrimaryKeyClass
in interface org.datanucleus.api.ApiAdapter
pkClass
- The Primary Key classcmd
- AbstractClassMetaData for the persistable classclr
- the ClassLoaderResolvernoOfPkFields
- Number of primary key fieldsmmgr
- MetaData managerpublic boolean allowPersistOfDeletedObject()
allowPersistOfDeletedObject
in interface org.datanucleus.api.ApiAdapter
public boolean allowDeleteOfNonPersistentObject()
allowDeleteOfNonPersistentObject
in interface org.datanucleus.api.ApiAdapter
public boolean allowReadFieldOfDeletedObject()
allowReadFieldOfDeletedObject
in interface org.datanucleus.api.ApiAdapter
public boolean clearLoadedFlagsOnDeleteObject()
clearLoadedFlagsOnDeleteObject
in interface org.datanucleus.api.ApiAdapter
public boolean getDefaultCascadePersistForField()
getDefaultCascadePersistForField
in interface org.datanucleus.api.ApiAdapter
public boolean getDefaultCascadeUpdateForField()
getDefaultCascadeUpdateForField
in interface org.datanucleus.api.ApiAdapter
public boolean getDefaultCascadeDeleteForField()
getDefaultCascadeDeleteForField
in interface org.datanucleus.api.ApiAdapter
public boolean getDefaultCascadeDetachForField()
getDefaultCascadeDetachForField
in interface org.datanucleus.api.ApiAdapter
public boolean getDefaultCascadeRefreshForField()
getDefaultCascadeRefreshForField
in interface org.datanucleus.api.ApiAdapter
public boolean getDefaultDFGForPersistableField()
getDefaultDFGForPersistableField
in interface org.datanucleus.api.ApiAdapter
public Map getDefaultFactoryProperties()
getDefaultFactoryProperties
in interface org.datanucleus.api.ApiAdapter
public RuntimeException getUserExceptionForException(String msg, Exception e)
getUserExceptionForException
in interface org.datanucleus.api.ApiAdapter
msg
- The messagee
- The causepublic RuntimeException getDataStoreExceptionForException(String msg, Exception e)
getDataStoreExceptionForException
in interface org.datanucleus.api.ApiAdapter
msg
- The messagee
- Any root cause exceptionpublic RuntimeException getApiExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne)
getApiExceptionForNucleusException
in interface org.datanucleus.api.ApiAdapter
Copyright © 2020. All rights reserved.