| Modifier and Type | Field and Description |
|---|---|
| private static final Logger | |
| public static final int | OPTIMISTIC_LOCK_ALL
Apply optimisitc locking based on the a current vs. snapshot comparison of all properties. |
| public static final int | OPTIMISTIC_LOCK_DIRTY
Apply optimisitc locking based on the a current vs. snapshot comparison of dirty properties. |
| public static final int | OPTIMISTIC_LOCK_NONE
Apply no optimistic locking |
| public static final int | OPTIMISTIC_LOCK_VERSION
Apply optimisitc locking based on the defined version or timestamp property. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Object | Returns: The extracted optimisitc locking valueThe state snapshot fields, EntityPersister The entity persister persister)Extract the optimisitc 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, SessionImplementor The originating session session)Generate the next increment in the optimisitc 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 optimisitc locking valueThe version type. versionType, SessionImplementor The originating session session)Create an initial optimisitc 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, SessionImplementor The orginating session session)Create an initial optimisitc locking value according the |
| public static void | setVersion(Object[]
The state snapshot fields, Object The optimisitc locking value version, EntityPersister The entity persister persister)Inject the optimisitc locking value into the entity state snapshot. |
| log | back to summary |
|---|---|
| private static final Logger log | |
| OPTIMISTIC_LOCK_ALL | back to summary |
|---|---|
| public static final int OPTIMISTIC_LOCK_ALL Apply optimisitc locking based on the a current vs. snapshot comparison of all properties. | |
| OPTIMISTIC_LOCK_DIRTY | back to summary |
|---|---|
| public static final int OPTIMISTIC_LOCK_DIRTY Apply optimisitc locking based on the a current vs. snapshot comparison of dirty properties. | |
| OPTIMISTIC_LOCK_NONE | back to summary |
|---|---|
| public static final int OPTIMISTIC_LOCK_NONE Apply no optimistic locking | |
| OPTIMISTIC_LOCK_VERSION | back to summary |
|---|---|
| public static final int OPTIMISTIC_LOCK_VERSION Apply optimisitc locking based on the defined version or timestamp property. | |
| Versioning | back to summary |
|---|---|
| private Versioning() Private constructor disallowing instantiation. | |
| getVersion | back to summary |
|---|---|
| public static Object getVersion(Object[] fields, EntityPersister persister) Extract the optimisitc locking value out of the entity state snapshot.
| |
| increment | back to summary |
|---|---|
| public static Object increment(Object version, VersionType<T> versionType, SessionImplementor session) Generate the next increment in the optimisitc 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, SessionImplementor session) Create an initial optimisitc locking value according the
| |
| seedVersion | back to summary |
|---|---|
| public static boolean seedVersion(Object[] fields, int versionProperty, VersionType<T> versionType, SessionImplementor session) Create an initial optimisitc locking value according the
| |
| setVersion | back to summary |
|---|---|
| public static void setVersion(Object[] fields, Object version, EntityPersister persister) Inject the optimisitc locking value into the entity state snapshot.
| |