| Modifier and Type | Field and Description |
|---|---|
| private static final CoreMessageLogger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Object | Returns: The extracted optimistic locking valueThe state snapshot fields, EntityPersister The entity persister persister)Extract the optimistic locking value out of the entity state snapshot. |
| public static Object | Returns: The incremented optimistic locking value.The current version version, EntityVersionMapping The version mapping versionMapping, SharedSessionContractImplementor The originating session session)Generate the next increment in the optimistic locking value according
the |
| public static Object | Returns: The incremented optimistic locking value.The entity instance entity, Object The current version currentVersion, EntityPersister The persister of the versioned entity persister, SharedSessionContractImplementor The originating session session)Generate the next increment in the optimistic locking value according the
|
| public static boolean | Returns: if the value shoudl be considered null for this purposeThe value initially assigned to a version property initialVersion)Determines if the value of the assigned version property should be considered
a "null" value, that is, if it is literally |
| public static boolean | Returns: True if a version increment is required; false otherwise.The array of property indexes which were deemed dirty dirtyProperties, final boolean Were any collections found to be dirty (structurally changed) hasDirtyCollections, final boolean[] An array indicating versionability of each property. propertyVersionability)Do we need to increment the version number, given the dirty properties? |
| public static Object | Returns: The initial optimistic locking valueThe version mapping versionMapping, SharedSessionContractImplementor The originating session session)Create an initial optimistic locking value according the |
| public static boolean | Returns: True if we injected a new version value into the fields array; false otherwise.The entity instance entity, Object[] The current snapshot state fields, EntityPersister The persister of the versioned entity persister, SharedSessionContractImplementor The originating session session)Create an initial optimistic locking value using the for the version property
if required using the |
| public static @Remove boolean | Returns: True if we injected a new version value into the fields array; false otherwise.The current snapshot state fields, int The index of the version property versionProperty, EntityVersionMapping The version mapping versionMapping, SharedSessionContractImplementor The originating session session)
Deprecated
since 6.2. Use
Create an initial optimistic locking value according the seedVersion(Object, Object[], EntityPersister, SharedSessionContractImplementor)
VersionJavaType
contract for the version property if required and inject it into the
snapshot state.
|
| public static void | setVersion(Object[]
The state snapshot fields, Object The optimistic locking value version, EntityPersister The entity persister persister)Inject the optimistic locking value into the entity state snapshot. |
| LOG | back to summary |
|---|---|
| private static final CoreMessageLogger LOG | |
| Versioning | back to summary |
|---|---|
| private Versioning() Private constructor disallowing instantiation. | |
| getVersion | back to summary |
|---|---|
| public static Object getVersion(Object[] fields, EntityPersister persister) Extract the optimistic locking value out of the entity state snapshot.
| |
| increment | back to summary |
|---|---|
| public static Object increment(Object version, EntityVersionMapping versionMapping, SharedSessionContractImplementor session) Generate the next increment in the optimistic locking value according
the
| |
| incrementVersion | back to summary |
|---|---|
| public static Object incrementVersion(Object entity, Object currentVersion, EntityPersister persister, SharedSessionContractImplementor session) Generate the next increment in the optimistic locking value according the
| |
| isNullInitialVersion | back to summary |
|---|---|
| public static boolean isNullInitialVersion(Object initialVersion) Determines if the value of the assigned version property should be considered
a "null" value, that is, if it is literally
| |
| isVersionIncrementRequired | back to summary |
|---|---|
| public static boolean isVersionIncrementRequired(final int[] dirtyProperties, final boolean hasDirtyCollections, final boolean[] propertyVersionability) Do we need to increment the version number, given the dirty properties?
| |
| seed | back to summary |
|---|---|
| public static Object seed(EntityVersionMapping versionMapping, SharedSessionContractImplementor session) Create an initial optimistic locking value according the
| |
| seedVersion | back to summary |
|---|---|
| public static boolean seedVersion(Object entity, Object[] fields, EntityPersister persister, SharedSessionContractImplementor session) Create an initial optimistic locking value using the for the version property
if required using the
| |
| seedVersion | back to summary |
|---|---|
| public static @Remove boolean seedVersion(Object[] fields, int versionProperty, EntityVersionMapping versionMapping, SharedSessionContractImplementor session)
Deprecated since 6.2. Use Create an initial optimistic locking value according the
| |
| setVersion | back to summary |
|---|---|
| public static void setVersion(Object[] fields, Object version, EntityPersister persister) Inject the optimistic locking value into the entity state snapshot.
| |