Package org.datanucleus.enhancement
Interface ExecutionContextReference
- All Known Subinterfaces:
ExecutionContext
- All Known Implementing Classes:
ExecutionContextImpl
,ExecutionContextThreadedImpl
public interface ExecutionContextReference
Reference for an ExecutionContext, for use in the enhancement contract.
This is used because if we just used ExecutionContext it would drag in many other classes etc, so reducing exposure.
-
Method Summary
Modifier and TypeMethodDescriptionfindObject
(Object id, boolean validate) Accessor for an object given the object id.getOwner()
Accessor for the owner of the ExecutionContext.
-
Method Details
-
getOwner
Object getOwner()Accessor for the owner of the ExecutionContext. This will be a PersistenceManager (JDO) or EntityManager (JPA/Jakarta).- Returns:
- The owner
-
findObject
Accessor for an object given the object id. See copyKeyFieldsFromObjectId for calls to this. TODO The signature could return Persistable, or T. Would need to update enhancer if we do that.- Parameters:
id
- The id of the objectvalidate
- Whether to validate the id- Returns:
- The object
-