java.lang.Object
org.eclipse.persistence.queries.BatchFetchPolicy
- All Implemented Interfaces:
Serializable,Cloneable
BatchFetchPolicy defines batch reading configuration.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<Expression> Define the attributes to be batch fetched.PERF: Cache the local batch read attribute names.protected List<DatabaseMapping> Define the mapping to be batch fetched (from mapping settings).Stores temporary map of batched objects (this queries results).protected Map<Object, List<AbstractRecord>> Stores temporary list of rows from parent batch query per batched mapping.protected Map<DatabaseMapping, ReadQuery> PERF: Used internally to store the prepared mapping queries.protected intDefine the batch size for IN style batch fetching.protected BatchFetchTypeDefine the type of batch fetching to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidINTERNAL: Add the row to the set of data results.clone()INTERNAL: Return temporary list of rows from parent batch query per batched mapping.INTERNAL: Return all attributes specified for batch reading.INTERNAL: PERF: Return the cached local (only) batch read attribute names.INTERNAL: Return any mappings that are always batched.INTERNAL: Return temporary map of batched objects.INTERNAL: Return temporary list of rows from parent batch query per batched mapping.getDataResults(DatabaseMapping mapping) INTERNAL: Return the remaining data results for the mapping.INTERNAL: PERF: Return the internally stored prepared mapping queries.intgetSize()Return the batch fetch size.getType()Return the batch fetch type, (JOIN, IN, EXISTS).booleanINTERNAL: Return true is this query has batchingbooleanisAttributeBatchRead(String attributeName) INTERNAL: Return if the attribute is specified for batch reading.booleanisAttributeBatchRead(ClassDescriptor mappingDescriptor, String attributeName) INTERNAL: Return if the attribute is specified for batch reading.booleanisEXISTS()Return if using the EXISTS fetch type.booleanisIN()Return if using the IN fetch type.booleanisJOIN()Return if using the JOIN fetch type.voidsetAttributeExpressions(List<Expression> attributeExpressions) voidsetAttributes(List<String> attributes) INTERNAL: PERF: Set the cached local (only) batch read attribute names.voidsetBatchedMappings(List<DatabaseMapping> batchedMappings) INTERNAL: Set any mappings that are always batched.voidsetBatchObjects(Map<Object, Object> batchObjects) INTERNAL: Set temporary map of batched objects.voidsetDataResults(List<AbstractRecord> rows) INTERNAL: Set the rows to the set of data results for each mapping.voidsetDataResults(Map<Object, List<AbstractRecord>> dataResults) INTERNAL: Set temporary list of rows from parent batch query per batched mapping.voidsetDataResults(DatabaseMapping mapping, List<AbstractRecord> rows) INTERNAL: Set the remaining data results for the mapping.voidsetMappingQueries(Map<DatabaseMapping, ReadQuery> mappingQueries) INTERNAL: PERF: Set the internally stored prepared mapping queries.voidsetSize(int size) Set the batch fetch size.voidsetType(BatchFetchType type) Set the batch fetch type, (JOIN, IN, EXISTS).
-
Field Details
-
type
Define the type of batch fetching to use. -
size
protected int sizeDefine the batch size for IN style batch fetching. -
attributeExpressions
Define the attributes to be batch fetched. -
batchedMappings
Define the mapping to be batch fetched (from mapping settings). -
mappingQueries
PERF: Used internally to store the prepared mapping queries. -
attributes
PERF: Cache the local batch read attribute names. -
dataResults
Stores temporary list of rows from parent batch query per batched mapping. -
batchObjects
Stores temporary map of batched objects (this queries results).
-
-
Constructor Details
-
BatchFetchPolicy
public BatchFetchPolicy() -
BatchFetchPolicy
-
-
Method Details
-
clone
-
isIN
public boolean isIN()Return if using the IN fetch type. -
isJOIN
public boolean isJOIN()Return if using the JOIN fetch type. -
isEXISTS
public boolean isEXISTS()Return if using the EXISTS fetch type. -
getType
Return the batch fetch type, (JOIN, IN, EXISTS). -
setType
Set the batch fetch type, (JOIN, IN, EXISTS). -
getSize
public int getSize()Return the batch fetch size. -
setSize
public void setSize(int size) Set the batch fetch size. -
getMappingQueries
INTERNAL: PERF: Return the internally stored prepared mapping queries. -
setMappingQueries
INTERNAL: PERF: Set the internally stored prepared mapping queries. -
getAttributes
INTERNAL: PERF: Return the cached local (only) batch read attribute names. -
setAttributes
INTERNAL: PERF: Set the cached local (only) batch read attribute names. -
setAttributeExpressions
-
getAttributeExpressions
INTERNAL: Return all attributes specified for batch reading. -
hasAttributes
public boolean hasAttributes()INTERNAL: Return true is this query has batching -
getBatchedMappings
INTERNAL: Return any mappings that are always batched. -
setBatchedMappings
INTERNAL: Set any mappings that are always batched. -
isAttributeBatchRead
INTERNAL: Return if the attribute is specified for batch reading. -
isAttributeBatchRead
INTERNAL: Return if the attribute is specified for batch reading. -
addDataResults
INTERNAL: Add the row to the set of data results. This is used for IN batching in batches. -
getDataResults
INTERNAL: Return the remaining data results for the mapping. This is used for IN batching in batches. -
setDataResults
INTERNAL: Set the remaining data results for the mapping. This is used for IN batching in batches. -
setDataResults
INTERNAL: Set the rows to the set of data results for each mapping. This is used for IN batching in batches. -
getAllDataResults
INTERNAL: Return temporary list of rows from parent batch query per batched mapping. This is used for IN batching in batches. -
getDataResults
INTERNAL: Return temporary list of rows from parent batch query per batched mapping. This is used for IN batching in batches. -
setDataResults
INTERNAL: Set temporary list of rows from parent batch query per batched mapping. This is used for IN batching in batches. -
getBatchObjects
INTERNAL: Return temporary map of batched objects. -
setBatchObjects
INTERNAL: Set temporary map of batched objects.
-