- java.lang.Object
-
- org.datanucleus.state.StateManagerImpl
-
- org.datanucleus.state.ReferentialStateManagerImpl
-
- All Implemented Interfaces:
StateManager,DNStateManager<Persistable>
public class ReferentialStateManagerImpl extends StateManagerImpl
Implementation of a StateManager for use where insertion ordering is important (such as RDBMS). Adds on simple handling to be run after an object is inserted.
-
-
Field Summary
-
Fields inherited from class org.datanucleus.state.StateManagerImpl
cmd, currFM, dirty, dirtyFields, FLAG_ATTACHING, FLAG_BECOMING_DELETED, FLAG_CHANGING_STATE, FLAG_DELETING, FLAG_DETACHING, FLAG_DISCONNECTING, FLAG_EMBEDDED, FLAG_FLUSHED_NEW, FLAG_FLUSHING, FLAG_INSERTING, FLAG_INSERTING_CALLBACKS, FLAG_LOADINGFPFIELDS, FLAG_MAKING_TRANSIENT, FLAG_NEED_INHERITANCE_VALIDATION, FLAG_POSTINSERT_UPDATE, FLAG_POSTLOAD_PENDING, FLAG_RESETTING_DETACHED_STATE, FLAG_RESTORE_VALUES, FLAG_RETRIEVING_DETACHED_STATE, FLAG_STORING_PC, FLAG_UPDATING_EMBEDDING_FIELDS_WITH_OWNER, FLAG_VALIDATING, flags, HOLLOWFIELDMANAGER, loadedFields, myEC, myFP, myID, myInternalID, myLC, myPC, myVersion, persistenceFlags, savedState, transactionalVersion
-
Fields inherited from interface org.datanucleus.state.DNStateManager
MEMBER_VALUE_STORED_PREFIX, ORIGINAL_FIELD_VALUE_KEY_PREFIX
-
-
Constructor Summary
Constructors Constructor Description ReferentialStateManagerImpl(ExecutionContext ec, AbstractClassMetaData cmd)Constructor for object of specified type managed by the provided ExecutionContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect(ExecutionContext ec, AbstractClassMetaData cmd)Method to (re)connect this StateManager to the specified ExecutionContext and object type.voiddisconnect()Disconnect from the ExecutionContext and persistable object.voidsetInsertingCallbacks()Override the superclass that simply sets the INSERTING_CALLBACKS flag, and call insertion notify list.voidupdateFieldAfterInsert(Object pc, int fieldNumber)Marks the given field as being required to be updated when the specified object has been inserted.-
Methods inherited from class org.datanucleus.state.StateManagerImpl
areFieldsLoaded, attach, attach, attachCopy, becomingDeleted, checkForAndRetrieveStoredValue, checkInheritance, clearDirtyFlags, clearDirtyFlags, clearFields, clearFieldsByNumbers, clearLoadedFlags, clearNonPrimaryKeyFields, clearSavedFields, containsAssociatedValue, deletePersistent, detach, detachCopy, disconnectClone, enlistInTransaction, evict, evictFromTransaction, flush, getAllFieldsLoaded, getAssociatedValue, getCallbackHandler, getClassMetaData, getDirtyFieldNames, getDirtyFieldNumbers, getDirtyFields, getExecutionContext, getExecutionContextReference, getExternalObjectId, getExternalObjectId, getFetchPlanForClass, getFieldNumbersOfLoadedOrDirtyFields, getInternalObjectId, getLifecycleState, getLoadedFieldNames, getLoadedFieldNumbers, getLoadedFields, getObject, getObjectAsPrintable, getObjectId, getReferencedPC, getStoreManager, getTransactionalObjectId, getTransactionalVersion, getTransactionalVersion, getVersion, getVersion, initialiseForCachedPC, initialiseForDetached, initialiseForEmbedded, initialiseForHollow, initialiseForHollowAppId, initialiseForHollowPreConstructed, initialiseForPersistentClean, initialiseForPersistentNew, initialiseForPNewToBeDeleted, initialiseForTransactionalTransient, internalDeletePersistent, isAttaching, isChangingState, isDeleted, isDeleted, isDeleting, isDetaching, isDirty, isEmbedded, isFieldLoaded, isFlushedNew, isFlushedToDatastore, isFlushing, isInserting, isLoaded, isLoaded, isNew, isPersistent, isPostLoadPending, isRestoreValues, isStoringPC, isTransactional, isVersionLoaded, isWaitingToBeFlushedToDatastore, loadField, loadFieldFromDatastore, loadFieldsFromDatastore, loadFieldsFromLevel2Cache, loadFieldsInFetchPlan, loadFieldValues, loadSpecifiedFields, loadUnloadedFields, loadUnloadedFieldsInFetchPlan, loadUnloadedFieldsInFetchPlanAndVersion, loadUnloadedFieldsOfClassInFetchPlan, loadUnloadedRelationFields, locate, log, makeDirty, makeDirty, makeNontransactional, makePersistent, makePersistentTransactionalTransient, makeTransactional, makeTransient, makeTransientForReachability, markAsFlushed, markFieldsAsLoaded, markForInheritanceValidation, markPKFieldsAsLoaded, peekField, postCommit, postStateChange, postWriteField, preBegin, preRollback, preSerialize, preStateChange, preWriteField, providedBooleanField, providedByteField, providedCharField, providedDoubleField, providedFloatField, providedIntField, providedLongField, providedObjectField, providedShortField, providedStringField, provideField, provideField, provideFields, refresh, refreshFieldsInFetchPlan, refreshLoadedFields, registerTransactional, removeAssociatedValue, replaceAllLoadedSCOFieldsWithValues, replaceAllLoadedSCOFieldsWithWrappers, replaceField, replaceField, replaceField, replaceFieldMakeDirty, replaceFields, replaceFields, replaceFieldValue, replaceManagedPC, replaceNonLoadedFields, replaceStateManager, replacingBooleanField, replacingByteField, replacingCharField, replacingDetachedState, replacingDoubleField, replacingFlags, replacingFloatField, replacingIntField, replacingLongField, replacingObjectField, replacingShortField, replacingStateManager, replacingStringField, resetDetachState, restoreFields, retrieve, retrieveDetachState, saveFields, setAssociatedValue, setBooleanField, setByteField, setCharField, setDoubleField, setFloatField, setFlushedNew, setFlushing, setInserting, setIntField, setLongField, setObjectField, setPostStoreNewObjectId, setShortField, setStoringPC, setStringField, setTransactionalVersion, setVersion, toString, transitionReadField, transitionWriteField, unloadField, unloadNonFetchPlanFields, unsetStoringPC, updateField, updateLevel2CacheForFields, updateOwnerFieldInEmbeddedField, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.datanucleus.enhancement.StateManager
getBooleanField, getByteField, getCharField, getDoubleField, getFloatField, getIntField, getLongField, getObjectField, getShortField, getStringField
-
-
-
-
Constructor Detail
-
ReferentialStateManagerImpl
public ReferentialStateManagerImpl(ExecutionContext ec, AbstractClassMetaData cmd)
Constructor for object of specified type managed by the provided ExecutionContext.- Parameters:
ec- ExecutionContextcmd- the metadata for the class.
-
-
Method Detail
-
connect
public void connect(ExecutionContext ec, AbstractClassMetaData cmd)
Description copied from interface:DNStateManagerMethod to (re)connect this StateManager to the specified ExecutionContext and object type.- Specified by:
connectin interfaceDNStateManager<Persistable>- Overrides:
connectin classStateManagerImpl- Parameters:
ec- ExecutionContext to connect tocmd- Metadata for the persistable class
-
disconnect
public void disconnect()
Description copied from class:StateManagerImplDisconnect from the ExecutionContext and persistable object.- Specified by:
disconnectin interfaceDNStateManager<Persistable>- Overrides:
disconnectin classStateManagerImpl
-
setInsertingCallbacks
public void setInsertingCallbacks()
Override the superclass that simply sets the INSERTING_CALLBACKS flag, and call insertion notify list.- Specified by:
setInsertingCallbacksin interfaceDNStateManager<Persistable>- Overrides:
setInsertingCallbacksin classStateManagerImpl
-
updateFieldAfterInsert
public void updateFieldAfterInsert(Object pc, int fieldNumber)
Marks the given field as being required to be updated when the specified object has been inserted.- Specified by:
updateFieldAfterInsertin interfaceDNStateManager<Persistable>- Overrides:
updateFieldAfterInsertin classStateManagerImpl- Parameters:
pc- The Persistable objectfieldNumber- Number of the field.
-
-