|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.datanucleus.ObjectManagerImpl
com.force.sdk.jpa.ForceObjectManagerImpl
public class ForceObjectManagerImpl
Object manager that manages the objects being created, updated, or deleted. Special handling for all or nothing operations.
Field Summary |
---|
Fields inherited from class org.datanucleus.ObjectManagerImpl |
---|
LOCALISER |
Constructor Summary | |
---|---|
ForceObjectManagerImpl(org.datanucleus.ObjectManagerFactoryImpl omf,
Object owner,
String userName,
String password)
create an object manager with datastore credentials. |
Method Summary | |
---|---|
void |
addToCreateList(com.sforce.soap.partner.sobject.SObject object,
org.datanucleus.store.ObjectProvider op)
add to the current list of entities to be created. |
void |
addToDeleteList(String id)
add to the current list of entities to be deleted. |
void |
addToUpdateList(com.sforce.soap.partner.sobject.SObject object,
Calendar version)
add to the current list of entities to be updated. |
void |
detachObject(Object obj,
org.datanucleus.state.FetchPlanState state)
We add this method so that we can support detach of a newly created persistent object that has never been saved to the db. |
void |
flushInternal(boolean flushToDatastore)
This method flushes all dirty, new, and deleted instances to the datastore. |
com.sforce.soap.partner.sobject.SObject |
getParentSObject(Object parent)
Retrieve the Force.com object (SObject) for the given parent. |
boolean |
isInAllOrNothingMode()
check for whether an active transaction is currently flushing data to the datastore in all or nothing mode. |
void |
markDirty(org.datanucleus.StateManager sm,
boolean directUpdate)
Method to mark an object (StateManager) as dirty. |
void |
postRollback()
There are some cases when a postrollback tries to detach an object that has not been persisted. |
Methods inherited from class org.datanucleus.ObjectManagerImpl |
---|
acquireThreadContextInfo, addInternalFetchGroup, addListener, addStateManager, assertActiveTransaction, assertClassPersistable, assertDetachable, assertHasImplementationCreator, assertIsOpen, assertNotDetached, assertWritable, attachObject, attachObjectCopy, clearDirty, clearDirty, close, deleteObject, deleteObjectInternal, deleteObjects, detachAll, detachObjectCopy, disconnectLifecycleListener, disconnectSMCache, enlistInTransaction, evictAllObjects, evictFromTransaction, evictObject, evictObjects, exists, findObject, findObject, findObjects, findObjectUsingAID, findStateManager, flush, getApiAdapter, getAttachedObjectForId, getCallbackHandler, getClassLoaderResolver, getCopyOnAttach, getDatastoreReadTimeoutMillis, getDatastoreWriteTimeoutMillis, getDetachAllOnCommit, getDetachAllOnRollback, getDetachOnClose, getExecutionContext, getExtent, getFetchGroupManager, getFetchGroupsWithName, getFetchPlan, getIdentityAsString, getIgnoreCache, getInternalFetchGroup, getLockManager, getManagedObjects, getManagedObjects, getManagedObjects, getManagedObjects, getMetaDataManager, getMultithreaded, getObjectFromCache, getObjectManagerFactory, getOMFContext, getOwner, getReadWriteLock, getSerializeReadForClass, getStateManagerById, getStoreManager, getThreadContextInfo, getTransaction, hasIdentityInCache, hasPersistenceInformationForClass, hereIsStateManager, initialiseLevel1Cache, isClosed, isDelayDatastoreOperationsEnabled, isEnlistedInTransaction, isFlushing, isInserting, isManagingRelations, isObjectModifiedInTransaction, isRunningDetachAllOnCommit, makeObjectNontransactional, makeObjectTransactional, makeObjectTransient, markManagedRelationDirty, newInstance, newObjectId, newObjectId, newQuery, nontransactionalUpdateCommit, performManagedRelationships, persistObject, persistObjectInternal, persistObjects, postBegin, postClose, postCommit, preCommit, preRollback, putObjectIntoCache, putObjectIntoLevel2Cache, putObjectIntoLevel2CacheInternal, refreshAllObjects, refreshObject, releaseThreadContextInfo, removeAllInstanceLifecycleListeners, removeInternalFetchGroup, removeListener, removeObjectFromCache, removeObjectFromLevel2Cache, removeStateManager, replaceObjectId, retrieveObject, setCopyOnAttach, setDatastoreReadTimeoutMillis, setDatastoreWriteTimeoutMillis, setDetachAllOnCommit, setDetachAllOnRollback, setDetachOnClose, setIgnoreCache, setMultithreaded |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForceObjectManagerImpl(org.datanucleus.ObjectManagerFactoryImpl omf, Object owner, String userName, String password)
omf
- the object manager factoryowner
- the owning persistence manager or entity manageruserName
- the username to the datastorepassword
- the password to the datastoreMethod Detail |
---|
public boolean isInAllOrNothingMode()
public void flushInternal(boolean flushToDatastore)
flushInternal
in interface org.datanucleus.ObjectManager
flushInternal
in class org.datanucleus.ObjectManagerImpl
flushToDatastore
- Whether to ensure any changes reach the datastore
Otherwise they will be flushed to the datastore manager and leave it to
decide the opportune moment to actually flush them to the datastorepublic com.sforce.soap.partner.sobject.SObject getParentSObject(Object parent)
parent
- Object
public void addToCreateList(com.sforce.soap.partner.sobject.SObject object, org.datanucleus.store.ObjectProvider op)
object
- the object to be createdop
- the object providerpublic void addToUpdateList(com.sforce.soap.partner.sobject.SObject object, Calendar version)
object
- the object to update (complete with updated fields)version
- this should be the time of modification. Pass in a version if we're checking if-modified-before headerspublic void addToDeleteList(String id)
id
- the id of the entity to deletepublic void markDirty(org.datanucleus.StateManager sm, boolean directUpdate)
markDirty
in interface org.datanucleus.ObjectManager
markDirty
in class org.datanucleus.ObjectManagerImpl
sm
- The StateManagerdirectUpdate
- Whether the object has had a direct update made on it (if known)public void postRollback()
postRollback
in interface org.datanucleus.ObjectManager
postRollback
in class org.datanucleus.ObjectManagerImpl
public void detachObject(Object obj, org.datanucleus.state.FetchPlanState state)
detachObject
in interface org.datanucleus.ObjectManager
detachObject
in class org.datanucleus.ObjectManagerImpl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |