| Modifier and Type | Field and Description |
|---|---|
| protected transient Object | object
Stores the object which owns this attribute. |
| protected transient AttributeTransformer | transformer
Stores the method to be executed. |
| Access | Constructor and Description |
|---|---|
| public | TransformerBasedValueHolder(AttributeTransformer
The method that returns the object when executed. theTransformer, Object the Object which owns this attribute. theObject, AbstractRecord The row representation of the object. theRow, AbstractSession The session to the database that stores the object. theSession)Initialize the method-based value holder. |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | |
| protected AttributeTransformer | |
| protected T | instantiate()
Implements abstract org. |
| protected T | |
| public T | instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder<T> unitOfWorkValueHolder)
Implements abstract org. |
| public boolean | isPessimisticLockingValueHolder()
Implements abstract org. |
| protected void | |
| protected void |
| object | back to summary |
|---|---|
| protected transient Object object Stores the object which owns this attribute. | |
| transformer | back to summary |
|---|---|
| protected transient AttributeTransformer transformer Stores the method to be executed. The method can take one (the row) or two parameters (the row and session). | |
| TransformerBasedValueHolder | back to summary |
|---|---|
| public TransformerBasedValueHolder(AttributeTransformer theTransformer, Object theObject, AbstractRecord theRow, AbstractSession theSession) Initialize the method-based value holder.
| |
| getObject | back to summary |
|---|---|
| protected Object getObject() Return the receiver. | |
| getTransformer | back to summary |
|---|---|
| protected AttributeTransformer getTransformer() Return the method. | |
| instantiate | back to summary |
|---|---|
| protected T instantiate() throws DescriptorException Implements abstract org. Instantiate the object by executing the method on the transformer.
| |
| instantiate | back to summary |
|---|---|
protected T instantiate(Object object, AbstractSession session) throws DescriptorException
| |
| instantiateForUnitOfWorkValueHolder | back to summary |
|---|---|
| public T instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder<T> unitOfWorkValueHolder) Implements abstract 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 This method is not thread-safe. It must be used in a synchronized manner
| |
| isPessimisticLockingValueHolder | back to summary |
|---|---|
| public boolean isPessimisticLockingValueHolder() Implements abstract org. INTERNAL: 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 This method is not thread-safe. It must be used in a synchronized manner
| |
| setObject | back to summary |
|---|---|
| protected void setObject(Object theObject) Set the receiver. | |
| setTransformer | back to summary |
|---|---|
| protected void setTransformer(AttributeTransformer theTransformer) Set the transformer. | |