java.lang.Object | |
↳ | org.hibernate.engine.Versioning |
Utilities for dealing with optimisitic locking values.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | OPTIMISTIC_LOCK_ALL | Apply optimisitc locking based on the a current vs. | |||||||||
int | OPTIMISTIC_LOCK_DIRTY | Apply optimisitc locking based on the a current vs. | |||||||||
int | OPTIMISTIC_LOCK_NONE | Apply no optimistic locking | |||||||||
int | OPTIMISTIC_LOCK_VERSION | Apply optimisitc locking based on the defined version or timestamp property. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Extract the optimisitc locking value out of the entity state snapshot.
| |||||||||||
Generate the next increment in the optimisitc locking value according
the
VersionType contract for the version property. | |||||||||||
Do we need to increment the version number, given the dirty properties?
| |||||||||||
Create an initial optimisitc locking value according the
VersionType
contract for the version property if required and inject it into
the snapshot state. | |||||||||||
Inject the optimisitc locking value into the entity state snapshot.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Apply optimisitc locking based on the a current vs. snapshot comparison of all properties.
Apply optimisitc locking based on the a current vs. snapshot comparison of dirty properties.
Apply no optimistic locking
Apply optimisitc locking based on the defined version or timestamp property.
Extract the optimisitc locking value out of the entity state snapshot.
fields | The state snapshot |
---|---|
persister | The entity persister |
Generate the next increment in the optimisitc locking value according
the VersionType
contract for the version property.
version | The current version |
---|---|
versionType | The version type |
session | The originating session |
Do we need to increment the version number, given the dirty properties?
dirtyProperties | The array of property indexes which were deemed dirty |
---|---|
hasDirtyCollections | Were any collections found to be dirty (structurally changed) |
propertyVersionability | An array indicating versionability of each property. |
Create an initial optimisitc locking value according the VersionType
contract for the version property if required and inject it into
the snapshot state.
fields | The current snapshot state |
---|---|
versionProperty | The index of the version property |
versionType | The version type |
session | The orginating session |
Inject the optimisitc locking value into the entity state snapshot.
fields | The state snapshot |
---|---|
version | The optimisitc locking value |
persister | The entity persister |