| 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, VersionType<T> The version type versionType, SharedSessionContractImplementor The originating session session)Generate the next increment in the optimistic locking value according
the |
| 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? |
| private static Object | Returns: The initial optimistic locking valueThe version type. versionType, 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 current snapshot state fields, int The index of the version property versionProperty, VersionType<T> The version type versionType, SharedSessionContractImplementor The originating session session)Create an initial optimistic locking value according the |
| 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, VersionType<T> versionType, SharedSessionContractImplementor session) Generate the next increment in the optimistic locking value according
the
| |
| 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 |
|---|---|
| private static Object seed(VersionType<T> versionType, SharedSessionContractImplementor session) Create an initial optimistic locking value according the
| |
| seedVersion | back to summary |
|---|---|
| public static boolean seedVersion(Object[] fields, int versionProperty, VersionType<T> versionType, SharedSessionContractImplementor session) 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.
| |