Purpose: provides a value holder type that can be used in Protected instances of Entities. Similar to UnitOfWork Value Holder it wraps the original cache version.
| Modifier and Type | Field and Description |
|---|---|
| protected transient DatabaseMapping | |
| protected transient ValueHolderInterface |
| Access | Constructor and Description |
|---|---|
| public | ProtectedValueHolder(ValueHolderInterface<T> attributeValue, DatabaseMapping mapping, AbstractSession cloningSession)
|
| mapping | back to summary |
|---|---|
| protected transient DatabaseMapping mapping | |
| wrappedValueHolder | back to summary |
|---|---|
| protected transient ValueHolderInterface<T> wrappedValueHolder | |
| ProtectedValueHolder | back to summary |
|---|---|
| public ProtectedValueHolder(ValueHolderInterface<T> attributeValue, DatabaseMapping mapping, AbstractSession cloningSession) | |
| getWrappedValueHolder | back to summary |
|---|---|
| public ValueHolderInterface Overrides org. Implements org. Doc from org. Returns the valueholder that is wrapped by this ValueHolder
| |
| instantiate | back to summary |
|---|---|
| protected T instantiate() throws DatabaseException Implements abstract org. Doc from org. Instantiate the object.
| |
| instantiateForUnitOfWorkValueHolder | back to summary |
|---|---|
| public T instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder<T> unitOfWorkValueHolder) Implements abstract org. Doc from org. Triggers UnitOfWork valueholders directly without triggering the wrapped valueholder (this). When in transaction and/or for pessimistic locking the UnitOfWorkValueHolder needs to be triggered directly without triggering the wrapped valueholder. However only the wrapped valueholder knows how to trigger the indirection, i.e. it may be a batchValueHolder, and it stores all the info like the row and the query. Note Implementations of this method are not necessarily thread-safe. They must be used in a synchronized manner
| |
| isPessimisticLockingValueHolder | back to summary |
|---|---|
| public boolean isPessimisticLockingValueHolder() Implements abstract org. Doc from org. Answers if this valueholder is a pessimistic locking one. Such valueholders are special in that they can be triggered multiple times by different UnitsOfWork. Each time a lock query will be issued. Hence even if instantiated it may have to be instantiated again, and once instantiated all fields can not be reset. Note Implementations of this method are not necessarily thread-safe. They must be used in a synchronizaed manner
| |