org.datanucleus
Class ExecutionContextImpl

java.lang.Object
  extended by org.datanucleus.ExecutionContextImpl
All Implemented Interfaces:
ExecutionContext

public class ExecutionContextImpl
extends java.lang.Object
implements ExecutionContext

Context of execution for persistence operations


Constructor Summary
ExecutionContextImpl(ObjectManager om)
           
 
Method Summary
 void deleteObjectInternal(java.lang.Object pc)
           
 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)
          TODO this is temporary.
 ApiAdapter getApiAdapter()
           
 ClassLoaderResolver getClassLoaderResolver()
          Accessor for the ClassLoader resolver to use in class loading issues.
 MetaDataManager getMetaDataManager()
          Accessor for the MetaData Manager.
 Transaction getTransaction()
          Accessor for the current transaction for this ExecutionContext.
 TypeManager getTypeManager()
          TODO should we keep this here? this is api/language dependent
 boolean isClosed()
           
 ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd)
           
 ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd, AbstractClassMetaData effectiveTypeCmd)
           
 ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd, Type effectiveType)
           
 java.lang.Object persistObjectInternal(java.lang.Object pc, ObjectProvider ownerSM, int ownerFieldNum, int objectType)
          Method to persist the passed object (internally).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionContextImpl

public ExecutionContextImpl(ObjectManager om)
Method Detail

findObjectUsingAID

public java.lang.Object findObjectUsingAID(Type pcClass,
                                           FieldValues2 fv,
                                           boolean ignoreCache,
                                           boolean checkInheritance)
Description copied from interface: ExecutionContext
TODO this is temporary. should be replaced when supporting any API/language

Specified by:
findObjectUsingAID in interface ExecutionContext

getClassLoaderResolver

public ClassLoaderResolver getClassLoaderResolver()
Description copied from interface: ExecutionContext
Accessor for the ClassLoader resolver to use in class loading issues.

Specified by:
getClassLoaderResolver in interface ExecutionContext
Returns:
The ClassLoader resolver

getMetaDataManager

public MetaDataManager getMetaDataManager()
Description copied from interface: ExecutionContext
Accessor for the MetaData Manager.

Specified by:
getMetaDataManager in interface ExecutionContext
Returns:
The MetaData Manager

getTransaction

public Transaction getTransaction()
Description copied from interface: ExecutionContext
Accessor for the current transaction for this ExecutionContext.

Specified by:
getTransaction in interface ExecutionContext
Returns:
The current transaction

getTypeManager

public TypeManager getTypeManager()
Description copied from interface: ExecutionContext
TODO should we keep this here? this is api/language dependent

Specified by:
getTypeManager in interface ExecutionContext
Returns:

findObjectProvider

public ObjectProvider findObjectProvider(java.lang.Object object)
Specified by:
findObjectProvider in interface ExecutionContext

findObjectProvider

public ObjectProvider findObjectProvider(java.lang.Object object,
                                         boolean persist)
Specified by:
findObjectProvider in interface ExecutionContext
Parameters:
persist - persists the object if not yet persisted.

getApiAdapter

public ApiAdapter getApiAdapter()
Specified by:
getApiAdapter in interface ExecutionContext

findObjectProviderForEmbedded

public ObjectProvider findObjectProviderForEmbedded(java.lang.Object value,
                                                    ObjectProvider owner,
                                                    AbstractMemberMetaData mmd)
Specified by:
findObjectProviderForEmbedded in interface ExecutionContext

newObjectProviderForMember

public ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd)
Specified by:
newObjectProviderForMember in interface ExecutionContext

newObjectProviderForMember

public ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd,
                                                 Type effectiveType)
Specified by:
newObjectProviderForMember in interface ExecutionContext

newObjectProviderForMember

public ObjectProvider newObjectProviderForMember(AbstractMemberMetaData mmd,
                                                 AbstractClassMetaData effectiveTypeCmd)
Specified by:
newObjectProviderForMember in interface ExecutionContext

deleteObjectInternal

public void deleteObjectInternal(java.lang.Object pc)
Specified by:
deleteObjectInternal in interface ExecutionContext

persistObjectInternal

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

Specified by:
persistObjectInternal in interface ExecutionContext
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

public boolean isClosed()
Specified by:
isClosed in interface ExecutionContext


Copyright © 2010. All Rights Reserved.