public class BatchValueHolder extends QueryBasedValueHolder
shouldToStringInstantiate
Constructor and Description |
---|
BatchValueHolder(ReadQuery query,
AbstractRecord row,
ForeignReferenceMapping mapping,
ObjectLevelReadQuery originalQuery,
CacheKey parentCacheKey)
Initialize the query-based value holder.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder unitOfWorkValueHolder)
Triggers UnitOfWork valueholders directly without triggering the wrapped
valueholder (this).
|
boolean |
isEasilyInstantiated()
INTERNAL:
Answers if this valueholder is easy to instantiate.
|
getQuery, getRefreshCascadePolicy, getValue, isPessimisticLockingValueHolder, postInstantiate, releaseWrappedValueHolder, setRefreshCascadePolicy, setSourceObject
clone, getRow, getSession, getValue, getWrappedValueHolder, isCoordinatedWithProperty, isInstantiated, isNewlyWeavedValueHolder, isSerializedRemoteUnitOfWorkValueHolder, privilegedSetValue, setInstantiated, setIsCoordinatedWithProperty, setIsNewlyWeavedValueHolder, setRow, setSession, setUninstantiated, setValue, shouldAllowInstantiationDeferral, toString
public BatchValueHolder(ReadQuery query, AbstractRecord row, ForeignReferenceMapping mapping, ObjectLevelReadQuery originalQuery, CacheKey parentCacheKey)
query
- The query that returns the object when executed.row
- The row representation of the object.mapping
- The mapping that is uses batch reading.public java.lang.Object instantiateForUnitOfWorkValueHolder(UnitOfWorkValueHolder unitOfWorkValueHolder)
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.
instantiateForUnitOfWorkValueHolder
in class QueryBasedValueHolder
public boolean isEasilyInstantiated()
isEasilyInstantiated
in class DatabaseValueHolder
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference