| Modifier and Type | Field and Description |
|---|---|
| protected ValueHolderInterface | backupValueHolder
The value holder stored in the backup copy, should not be transient. |
| protected transient DatabaseMapping | mapping
The mapping for the attribute. |
| protected transient Object | relationshipSourceObject
This attribute is used specifically for relationship support. |
| protected UnitOfWorkImpl | remoteUnitOfWork
These cannot be transient because they are required for a remote unit of work. |
| protected String | |
| protected Object | |
| protected transient ValueHolderInterface | wrappedValueHolder
The value holder in the original object. |
| protected ObjID |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | UnitOfWorkValueHolder(ValueHolderInterface<T> attributeValue, Object clone, DatabaseMapping mapping, UnitOfWorkImpl unitOfWork)
|
| Modifier and Type | Method and Description |
|---|---|
| protected abstract Object | |
| public abstract T | |
| protected ValueHolderInterface | |
| public DatabaseMapping | |
| protected Object | |
| protected UnitOfWorkImpl | |
| protected String | |
| protected Object | |
| protected UnitOfWorkImpl | |
| protected T | |
| public ValueHolderInterface | getWrappedValueHolder()
Overrides org. Implements org. |
| public ObjID | |
| protected T | instantiate()
Implements abstract org. |
| public T | instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder<T> unitOfWorkValueHolder)
Implements abstract org. |
| protected T | |
| public boolean | Returns: true if getValue() won't trigger a database read.Overrides org. |
| public boolean | isPessimisticLockingValueHolder()
Implements abstract org. |
| public boolean | isSerializedRemoteUnitOfWorkValueHolder()
Used to determine if this is a remote uow value holder that was serialized to the server.
|
| public void | releaseWrappedValueHolder(AbstractSession targetSession)
Overrides org. |
| protected void | resetFields()
Overrides org. |
| public void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public boolean | shouldAllowInstantiationDeferral()
Overrides org. Implements org. |
| backupValueHolder | back to summary |
|---|---|
| protected ValueHolderInterface<T> backupValueHolder The value holder stored in the backup copy, should not be transient. | |
| mapping | back to summary |
|---|---|
| protected transient DatabaseMapping mapping The mapping for the attribute. | |
| relationshipSourceObject | back to summary |
|---|---|
| protected transient Object relationshipSourceObject This attribute is used specifically for relationship support. It mimics the sourceObject attribute which is used for RemoteValueholder | |
| remoteUnitOfWork | back to summary |
|---|---|
| protected UnitOfWorkImpl remoteUnitOfWork These cannot be transient because they are required for a remote unit of work. When the remote uow is serialized to the server to be committed, these are used to reconstruct the value holder on the server. They should be null for non-remote sessions. | |
| sourceAttributeName | back to summary |
|---|---|
| protected String sourceAttributeName | |
| sourceObject | back to summary |
|---|---|
| protected Object sourceObject | |
| wrappedValueHolder | back to summary |
|---|---|
| protected transient ValueHolderInterface<T> wrappedValueHolder The value holder in the original object. | |
| wrappedValueHolderRemoteID | back to summary |
|---|---|
| protected ObjID wrappedValueHolderRemoteID | |
| UnitOfWorkValueHolder | back to summary |
|---|---|
| protected UnitOfWorkValueHolder() | |
| UnitOfWorkValueHolder | back to summary |
|---|---|
| protected UnitOfWorkValueHolder(ValueHolderInterface<T> attributeValue, Object clone, DatabaseMapping mapping, UnitOfWorkImpl unitOfWork) | |
| buildBackupCloneFor | back to summary |
|---|---|
| protected abstract Object buildBackupCloneFor(Object cloneAttributeValue) Backup the clone attribute value. | |
| buildCloneFor | back to summary |
|---|---|
| public abstract T buildCloneFor(Object originalAttributeValue) Clone the original attribute value. | |
| getBackupValueHolder | back to summary |
|---|---|
| protected ValueHolderInterface | |
| getMapping | back to summary |
|---|---|
| public DatabaseMapping getMapping() | |
| getRelationshipSourceObject | back to summary |
|---|---|
| protected Object getRelationshipSourceObject() | |
| getRemoteUnitOfWork | back to summary |
|---|---|
| protected UnitOfWorkImpl getRemoteUnitOfWork() | |
| getSourceAttributeName | back to summary |
|---|---|
| protected String getSourceAttributeName() | |
| getSourceObject | back to summary |
|---|---|
| protected Object getSourceObject() | |
| getUnitOfWork | back to summary |
|---|---|
| protected UnitOfWorkImpl getUnitOfWork() | |
| getValueFromServerObject | back to summary |
|---|---|
| protected T getValueFromServerObject() This is used for a remote unit of work. If the value holder is sent back to the server uninstantiated and it needs to be instantiated, then we must find the original object and get the appropriate attribute from it.
| |
| getWrappedValueHolder | back to summary |
|---|---|
| public ValueHolderInterface Overrides org. Implements org. Doc from org. Returns the valueholder that is wrapped by this ValueHolder
| |
| getWrappedValueHolderRemoteID | back to summary |
|---|---|
| public ObjID getWrappedValueHolderRemoteID() returns wrapped ValueHolder ObjID if available | |
| instantiate | back to summary |
|---|---|
| protected T instantiate() Implements abstract org. Get the value from the wrapped value holder, instantiating it if necessary, and clone it.
| |
| 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.
| |
| instantiateImpl | back to summary |
|---|---|
| protected T instantiateImpl() a.k.a getValueFromWrappedValueholder. The old name is no longer correct, as query based valueholders are now sometimes triggered directly without triggering the underlying valueholder. | |
| isEasilyInstantiated | back to summary |
|---|---|
| public boolean isEasilyInstantiated() Overrides org. INTERNAL: Answers if this valueholder is easy to instantiate.
| |
| 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 instantatiated all fields can not be reset.
| |
| isSerializedRemoteUnitOfWorkValueHolder | back to summary |
|---|---|
| public boolean isSerializedRemoteUnitOfWorkValueHolder() Used to determine if this is a remote uow value holder that was serialized to the server. It has no reference to its wrapper value holder, so must find its original object to be able to instantiate.
| |
| releaseWrappedValueHolder | back to summary |
|---|---|
| public void releaseWrappedValueHolder(AbstractSession targetSession) Overrides org. Releases a wrapped valueholder privately owned by a particular unit of work. When unit of work clones are built directly from rows no object in the shared cache points to this valueholder, so it can store the unit of work as its session. However once that UnitOfWork commits and the valueholder is merged into the shared cache, the session needs to be reset to the root session, ie. the server session.
| |
| resetFields | back to summary |
|---|---|
| protected void resetFields() Overrides org. Reset all the fields that are not needed after instantiation.
| |
| setBackupValueHolder | back to summary |
|---|---|
| public void setBackupValueHolder(ValueHolderInterface<T> backupValueHolder) | |
| setMapping | back to summary |
|---|---|
| protected void setMapping(DatabaseMapping mapping) | |
| setRelationshipSourceObject | back to summary |
|---|---|
| protected void setRelationshipSourceObject(Object relationshipSourceObject) | |
| setRemoteUnitOfWork | back to summary |
|---|---|
| protected void setRemoteUnitOfWork(UnitOfWorkImpl remoteUnitOfWork) | |
| setSourceAttributeName | back to summary |
|---|---|
| protected void setSourceAttributeName(String name) | |
| setSourceObject | back to summary |
|---|---|
| protected void setSourceObject(Object sourceObject) | |
| setWrappedValueHolder | back to summary |
|---|---|
| protected void setWrappedValueHolder(DatabaseValueHolder<T> valueHolder) | |
| shouldAllowInstantiationDeferral | back to summary |
|---|---|
| public boolean shouldAllowInstantiationDeferral() Overrides org. Implements org. INTERNAL: Return if add/remove should trigger instantiation or avoid. Current instantiation is avoided is using change tracking.
| |