Package org.hibernate.action.internal
Class EntityIdentityInsertAction
java.lang.Object
org.hibernate.action.internal.EntityAction
org.hibernate.action.internal.AbstractEntityInsertAction
org.hibernate.action.internal.EntityIdentityInsertAction
- All Implemented Interfaces:
Serializable,Comparable<ComparableExecutable>,AfterTransactionCompletionProcess,Executable,ComparableExecutable
The action for performing entity insertions when entity is using
IDENTITY column identifier generation- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEntityIdentityInsertAction(Object[] state, Object instance, EntityPersister persister, boolean isVersionIncrementDisabled, EventSource session, boolean isDelayed) Constructs an EntityIdentityInsertAction -
Method Summary
Modifier and TypeMethodDescriptionvoiddoAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session) Perform whatever processing is encapsulated here after completion of the transaction.voidexecute()Execute this action.protected EntityKeyprotected EntityKeyReturns theEntityKey.final ObjectAccess to the generated identifiergetRowId()protected booleanbooleanDoes this insert action need to be executed as soon as possible (e.g., to generate an ID)?booleanprotected voidpostCommitInsert(boolean success) protected voidprotected booleanprotected voidsetEntityKey(EntityKey entityKey) protected voidsetGeneratedId(Object generatedId) Methods inherited from class org.hibernate.action.internal.AbstractEntityInsertAction
addCollectionsByKeyToPersistenceContext, afterDeserialize, findNonNullableTransientEntities, getState, handleNaturalIdPostSaveNotifications, handleNaturalIdPreSaveNotifications, makeEntityManaged, markExecuted, nullifyTransientReferencesIfNotAlreadyMethods inherited from class org.hibernate.action.internal.EntityAction
beforeExecutions, compareTo, eventSource, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getDelayedId, getEntityName, getEventListenerGroups, getId, getInstance, getPersister, getPrimarySortClassifier, getPropertySpaces, getSecondarySortIndex, getSession, isVeto, setVeto, toString
-
Constructor Details
-
EntityIdentityInsertAction
public EntityIdentityInsertAction(Object[] state, Object instance, EntityPersister persister, boolean isVersionIncrementDisabled, EventSource session, boolean isDelayed) Constructs an EntityIdentityInsertAction- Parameters:
state- The current (extracted) entity stateinstance- The entity instancepersister- The entity persisterisVersionIncrementDisabled- Whether version incrementing is disabledsession- The sessionisDelayed- Are we in a situation which allows the insertion to be delayed?- Throws:
HibernateException- Indicates an illegal state
-
-
Method Details
-
execute
Description copied from interface:ExecutableExecute this action.- Throws:
HibernateException- Indicates a problem during execution.
-
needsAfterTransactionCompletion
public boolean needsAfterTransactionCompletion()- Overrides:
needsAfterTransactionCompletionin classEntityAction
-
hasPostCommitEventListeners
protected boolean hasPostCommitEventListeners()- Specified by:
hasPostCommitEventListenersin classEntityAction
-
postInsert
protected void postInsert() -
postCommitInsert
protected void postCommitInsert(boolean success) -
preInsert
protected boolean preInsert() -
getGeneratedId
Access to the generated identifier- Returns:
- The generated identifier
-
setGeneratedId
-
isEarlyInsert
public boolean isEarlyInsert()Description copied from class:AbstractEntityInsertActionDoes this insert action need to be executed as soon as possible (e.g., to generate an ID)?- Specified by:
isEarlyInsertin classAbstractEntityInsertAction- Returns:
- true, if it needs to be executed as soon as possible; false, otherwise.
-
getEntityKey
Description copied from class:AbstractEntityInsertActionReturns theEntityKey.- Specified by:
getEntityKeyin classAbstractEntityInsertAction- Returns:
- the
EntityKey.
-
getRowId
- Specified by:
getRowIdin classAbstractEntityInsertAction
-
setEntityKey
-
generateDelayedEntityKey
-