| Modifier and Type | Field and Description |
|---|---|
| protected transient ForeignReferenceMapping | |
| protected transient ObjectLevelReadQuery | |
| protected transient CacheKey |
| Access | Constructor and Description |
|---|---|
| public | BatchValueHolder(ReadQuery
The query that returns the object when executed. query, AbstractRecord The row representation of the object. row, ForeignReferenceMapping The mapping that is uses batch reading. mapping, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey)Initialize the query-based value holder. |
| Modifier and Type | Method and Description |
|---|---|
| protected ForeignReferenceMapping | |
| protected T | instantiate(AbstractSession session)
Overrides org. |
| public T | instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder<T> unitOfWorkValueHolder)
Triggers UnitOfWork valueholders directly without triggering the wrapped
valueholder (this).
|
| public boolean | Returns: true if getValue() won't trigger a database read.Overrides org. |
| protected void | resetFields()
Overrides org. |
| protected void |
| mapping | back to summary |
|---|---|
| protected transient ForeignReferenceMapping mapping | |
| originalQuery | back to summary |
|---|---|
| protected transient ObjectLevelReadQuery originalQuery | |
| parentCacheKey | back to summary |
|---|---|
| protected transient CacheKey parentCacheKey | |
| BatchValueHolder | back to summary |
|---|---|
| public BatchValueHolder(ReadQuery query, AbstractRecord row, ForeignReferenceMapping mapping, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey) Initialize the query-based value holder.
| |
| getMapping | back to summary |
|---|---|
| protected ForeignReferenceMapping getMapping() | |
| instantiate | back to summary |
|---|---|
| protected T instantiate(AbstractSession session) throws EclipseLinkException Overrides org. Instantiate the object by having the mapping extract its value from the query. Concurrency must be maintained across all of the value holders, since they all share the same query, the extractResultFromBatchQuery method must be synchronized.
| |
| instantiateForUnitOfWorkValueHolder | back to summary |
|---|---|
| public T instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder<T> unitOfWorkValueHolder) 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. The batch value holder must use a batch query relative to the unit of work, as the batch is local to the unit of work.
| |
| isEasilyInstantiated | back to summary |
|---|---|
| public boolean isEasilyInstantiated() Overrides org. INTERNAL: Answers if this valueholder is easy to instantiate.
| |
| resetFields | back to summary |
|---|---|
| protected void resetFields() Overrides org. Reset all the fields that are not needed after instantiation.
| |
| setMapping | back to summary |
|---|---|
| protected void setMapping(ForeignReferenceMapping mapping) | |