Package org.datanucleus.api.jakarta
Class JakartaAdapter
- java.lang.Object
-
- org.datanucleus.api.jakarta.JakartaAdapter
-
- All Implemented Interfaces:
Serializable
,org.datanucleus.api.ApiAdapter
public class JakartaAdapter extends Object implements org.datanucleus.api.ApiAdapter
Adapter for the Jakarta Persistence API, to allow the DataNucleus core runtime to expose multiple APIs to clients.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static Set<String>
defaultPersistentTypeNames
-
Constructor Summary
Constructors Constructor Description JakartaAdapter()
-
Method Summary
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceorg.datanucleus.api.ApiAdapter
-
isMemberDefaultPersistent
public boolean isMemberDefaultPersistent(Class type)
- Specified by:
isMemberDefaultPersistent
in interfaceorg.datanucleus.api.ApiAdapter
-
getXMLMetaDataForClass
public String getXMLMetaDataForClass(org.datanucleus.metadata.AbstractClassMetaData cmd, String prefix, String indent)
- Specified by:
getXMLMetaDataForClass
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultMappingFileLocation
public String getDefaultMappingFileLocation()
- Specified by:
getDefaultMappingFileLocation
in interfaceorg.datanucleus.api.ApiAdapter
-
getExecutionContext
public org.datanucleus.ExecutionContext getExecutionContext(Object obj)
- Specified by:
getExecutionContext
in interfaceorg.datanucleus.api.ApiAdapter
-
getLifeCycleState
public org.datanucleus.state.LifeCycleState getLifeCycleState(int stateType)
- Specified by:
getLifeCycleState
in interfaceorg.datanucleus.api.ApiAdapter
-
isValidPrimaryKeyClass
public boolean isValidPrimaryKeyClass(Class pkClass, org.datanucleus.metadata.AbstractClassMetaData cmd, org.datanucleus.ClassLoaderResolver clr, int noOfPkFields, org.datanucleus.metadata.MetaDataManager mmgr)
- Specified by:
isValidPrimaryKeyClass
in interfaceorg.datanucleus.api.ApiAdapter
-
allowPersistOfDeletedObject
public boolean allowPersistOfDeletedObject()
- Specified by:
allowPersistOfDeletedObject
in interfaceorg.datanucleus.api.ApiAdapter
-
allowDeleteOfNonPersistentObject
public boolean allowDeleteOfNonPersistentObject()
- Specified by:
allowDeleteOfNonPersistentObject
in interfaceorg.datanucleus.api.ApiAdapter
-
allowReadFieldOfDeletedObject
public boolean allowReadFieldOfDeletedObject()
- Specified by:
allowReadFieldOfDeletedObject
in interfaceorg.datanucleus.api.ApiAdapter
-
clearLoadedFlagsOnDeleteObject
public boolean clearLoadedFlagsOnDeleteObject()
- Specified by:
clearLoadedFlagsOnDeleteObject
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadePersistForField
public boolean getDefaultCascadePersistForField()
- Specified by:
getDefaultCascadePersistForField
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeAttachForField
public boolean getDefaultCascadeAttachForField()
- Specified by:
getDefaultCascadeAttachForField
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeDeleteForField
public boolean getDefaultCascadeDeleteForField()
- Specified by:
getDefaultCascadeDeleteForField
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeDetachForField
public boolean getDefaultCascadeDetachForField()
- Specified by:
getDefaultCascadeDetachForField
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultCascadeRefreshForField
public boolean getDefaultCascadeRefreshForField()
- Specified by:
getDefaultCascadeRefreshForField
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultDFGForPersistableField
public boolean getDefaultDFGForPersistableField()
- Specified by:
getDefaultDFGForPersistableField
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultFactoryProperties
public Map<String,Object> getDefaultFactoryProperties()
- Specified by:
getDefaultFactoryProperties
in interfaceorg.datanucleus.api.ApiAdapter
-
getDefaultPersistentPropertyWhenNotSpecified
public boolean getDefaultPersistentPropertyWhenNotSpecified()
- Specified by:
getDefaultPersistentPropertyWhenNotSpecified
in interfaceorg.datanucleus.api.ApiAdapter
-
getUserExceptionForException
public RuntimeException getUserExceptionForException(String msg, Exception e)
- Specified by:
getUserExceptionForException
in interfaceorg.datanucleus.api.ApiAdapter
-
getDataStoreExceptionForException
public RuntimeException getDataStoreExceptionForException(String msg, Exception e)
- Specified by:
getDataStoreExceptionForException
in interfaceorg.datanucleus.api.ApiAdapter
-
getApiExceptionForNucleusException
public RuntimeException getApiExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne)
- Specified by:
getApiExceptionForNucleusException
in interfaceorg.datanucleus.api.ApiAdapter
-
getJakartaExceptionForNucleusException
public static jakarta.persistence.PersistenceException getJakartaExceptionForNucleusException(org.datanucleus.exceptions.NucleusException ne)
Convenience method to convert a Nucleus exception into a Jakarta Persistence 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 JakartaException
-
-