org.datanucleus.store
Interface ExecutionContext

All Known Implementing Classes:
ExecutionContextImpl

public interface ExecutionContext

Context of execution for persistence operations


Nested Class Summary
static interface ExecutionContext.LifecycleListener
           
 
Method Summary
 void attachObject(java.lang.Object object, boolean elementsWithoutIdentity)
           
 java.lang.Object attachObjectCopy(java.lang.Object value, boolean sco)
           
 void deleteObject(java.lang.Object obj)
           
 void deleteObjectInternal(java.lang.Object pc)
           
 void deleteObjects(java.lang.Object[] array)
           
 void detachObject(java.lang.Object val, FetchPlanState state)
           
 java.lang.Object detachObjectCopy(java.lang.Object val, FetchPlanState state)
           
 void evictFromTransaction(ObjectProvider objSM)
           
 java.lang.Object findObject(java.lang.Object idForObject, boolean b, boolean c, java.lang.String name)
           
 java.lang.Object findObject(java.lang.Object oid, FieldValues2 fieldValues2, java.lang.Class pcClass, boolean ignoreCache)
           
 ObjectProvider findObjectProvider(java.lang.Object object)
           
 ObjectProvider findObjectProvider(java.lang.Object object, boolean persist)
           
 ObjectProvider findObjectProviderForEmbedded(java.lang.Object value, ObjectProvider owner, AbstractMemberMetaData mmd)
           
 java.lang.Object findObjectUsingAID(Type pcClass, FieldValues2 fv, boolean ignoreCache, boolean checkInheritance)
          Deprecated. Please make use of IdentityUtils.getApplicationIdentityForResultSetRow() and then call findObject(Object oid, FieldValues2 fieldValues2, Class pcClass, boolean ignoreCache)
 void flushInternal(boolean b)
           
 ApiAdapter getApiAdapter()
           
 java.lang.Object getAttachedObjectForId(java.lang.Object idForObject)
           
 ClassLoaderResolver getClassLoaderResolver()
          Accessor for the ClassLoader resolver to use in class loading issues.
 java.lang.Integer getDatastoreReadTimeoutMillis()
           
 java.lang.Integer getDatastoreWriteTimeoutMillis()
           
 Extent getExtent(java.lang.Class candidateClass, boolean subclasses)
           
 FetchPlan getFetchPlan()
           
 boolean getIgnoreCache()
           
 LockManager getLockManager()
          Accessor for the LockManager.
 MetaDataManager getMetaDataManager()
          Accessor for the MetaData Manager.
 java.lang.Object getObjectFromCache(java.lang.Object idForObject)
           
 ObjectManagerFactoryImpl getObjectManagerFactory()
           
 OMFContext getOMFContext()
           
 boolean getSerializeReadForClass(java.lang.String fullClassName)
           
 StoreManager getStoreManager()
           
 Transaction getTransaction()
          Accessor for the current transaction for this ExecutionContext.
 TypeManager getTypeManager()
          TODO should we keep this here? this is api/language dependent
 boolean hasIdentityInCache(java.lang.Object id)
          Whether an object with the specified identity exists in the cache(s).
 void hasPersistenceInformationForClass(java.lang.Class candidateClass)
           
 boolean isClosed()
           
 boolean isDelayDatastoreOperationsEnabled()
           
 boolean isFlushing()
           
 boolean isInserting(java.lang.Object value)
           
 void makeObjectTransient(java.lang.Object pc, FetchPlanState state)
           
 void markDirty(ObjectProvider otherSM, boolean b)
           
 java.lang.Object newObjectId(java.lang.Class clazz, java.lang.Object object)
           
 java.lang.Object newObjectId(java.lang.String className, java.lang.Object object)
           
 ObjectProvider newObjectProvider(java.lang.Object id, java.lang.Object obj)
           
 ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd)
           
 ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd, AbstractClassMetaData effectiveTypeCmd)
           
 ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd, Type effectiveType)
           
 Query newQuery()
           
 void persistObjectInternal(java.lang.Object object, FieldValues2 fieldValues, int pc)
           
 java.lang.Object persistObjectInternal(java.lang.Object pc, ObjectProvider ownerSM, int ownerFieldNum, int objectType)
          Method to persist the passed object (internally).
 void refreshObject(java.lang.Object val)
           
 void removeObjectFromCache(java.lang.Object value, java.lang.Object idForObject)
           
 

Method Detail

findObjectUsingAID

java.lang.Object findObjectUsingAID(Type pcClass,
                                    FieldValues2 fv,
                                    boolean ignoreCache,
                                    boolean checkInheritance)
Deprecated. Please make use of IdentityUtils.getApplicationIdentityForResultSetRow() and then call findObject(Object oid, FieldValues2 fieldValues2, Class pcClass, boolean ignoreCache)


getMetaDataManager

MetaDataManager getMetaDataManager()
Accessor for the MetaData Manager.

Returns:
The MetaData Manager

getLockManager

LockManager getLockManager()
Accessor for the LockManager.

Returns:
The Lock Manager

getTransaction

Transaction getTransaction()
Accessor for the current transaction for this ExecutionContext.

Returns:
The current transaction

getClassLoaderResolver

ClassLoaderResolver getClassLoaderResolver()
Accessor for the ClassLoader resolver to use in class loading issues.

Returns:
The ClassLoader resolver

getTypeManager

TypeManager getTypeManager()
TODO should we keep this here? this is api/language dependent

Returns:
The type manager

findObjectProvider

ObjectProvider findObjectProvider(java.lang.Object object)

findObjectProvider

ObjectProvider findObjectProvider(java.lang.Object object,
                                  boolean persist)

getApiAdapter

ApiAdapter getApiAdapter()

findObjectProviderForEmbedded

ObjectProvider findObjectProviderForEmbedded(java.lang.Object value,
                                             ObjectProvider owner,
                                             AbstractMemberMetaData mmd)

newObjectProviderForMember

ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd)

newObjectProviderForMember

ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd,
                                          Type effectiveType)

newObjectProviderForMember

ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd,
                                          AbstractClassMetaData effectiveTypeCmd)

deleteObjectInternal

void deleteObjectInternal(java.lang.Object pc)

persistObjectInternal

java.lang.Object persistObjectInternal(java.lang.Object pc,
                                       ObjectProvider ownerSM,
                                       int ownerFieldNum,
                                       int objectType)
Method to persist the passed object (internally).

Parameters:
pc - The object
ownerSM - StateManager of the owner when embedded
ownerFieldNum - Field number in the owner where this is embedded (or -1 if not embedded)
objectType - Type of object (see org.datanucleus.StateManager, e.g StateManager.PC)
Returns:
The persisted object

isClosed

boolean isClosed()

getFetchPlan

FetchPlan getFetchPlan()

newQuery

Query newQuery()

getOMFContext

OMFContext getOMFContext()

getStoreManager

StoreManager getStoreManager()

newObjectProvider

ObjectProvider newObjectProvider(java.lang.Object id,
                                 java.lang.Object obj)

findObject

java.lang.Object findObject(java.lang.Object idForObject,
                            boolean b,
                            boolean c,
                            java.lang.String name)

flushInternal

void flushInternal(boolean b)

detachObject

void detachObject(java.lang.Object val,
                  FetchPlanState state)

deleteObjects

void deleteObjects(java.lang.Object[] array)

attachObjectCopy

java.lang.Object attachObjectCopy(java.lang.Object value,
                                  boolean sco)

detachObjectCopy

java.lang.Object detachObjectCopy(java.lang.Object val,
                                  FetchPlanState state)

refreshObject

void refreshObject(java.lang.Object val)

evictFromTransaction

void evictFromTransaction(ObjectProvider objSM)

isFlushing

boolean isFlushing()

getIgnoreCache

boolean getIgnoreCache()

getDatastoreReadTimeoutMillis

java.lang.Integer getDatastoreReadTimeoutMillis()

getDatastoreWriteTimeoutMillis

java.lang.Integer getDatastoreWriteTimeoutMillis()

isDelayDatastoreOperationsEnabled

boolean isDelayDatastoreOperationsEnabled()

markDirty

void markDirty(ObjectProvider otherSM,
               boolean b)

getExtent

Extent getExtent(java.lang.Class candidateClass,
                 boolean subclasses)

attachObject

void attachObject(java.lang.Object object,
                  boolean elementsWithoutIdentity)

getObjectFromCache

java.lang.Object getObjectFromCache(java.lang.Object idForObject)

removeObjectFromCache

void removeObjectFromCache(java.lang.Object value,
                           java.lang.Object idForObject)

hasIdentityInCache

boolean hasIdentityInCache(java.lang.Object id)
Whether an object with the specified identity exists in the cache(s). Used as a check on identity (inheritance-level) validity

Parameters:
id - The identity
Returns:
Whether it exists

findObject

java.lang.Object findObject(java.lang.Object oid,
                            FieldValues2 fieldValues2,
                            java.lang.Class pcClass,
                            boolean ignoreCache)

getSerializeReadForClass

boolean getSerializeReadForClass(java.lang.String fullClassName)

hasPersistenceInformationForClass

void hasPersistenceInformationForClass(java.lang.Class candidateClass)

makeObjectTransient

void makeObjectTransient(java.lang.Object pc,
                         FetchPlanState state)

isInserting

boolean isInserting(java.lang.Object value)

getAttachedObjectForId

java.lang.Object getAttachedObjectForId(java.lang.Object idForObject)

getObjectManagerFactory

ObjectManagerFactoryImpl getObjectManagerFactory()

persistObjectInternal

void persistObjectInternal(java.lang.Object object,
                           FieldValues2 fieldValues,
                           int pc)

newObjectId

java.lang.Object newObjectId(java.lang.String className,
                             java.lang.Object object)

newObjectId

java.lang.Object newObjectId(java.lang.Class clazz,
                             java.lang.Object object)

deleteObject

void deleteObject(java.lang.Object obj)


Copyright © 2011. All Rights Reserved.