java.lang.Object
org.eclipse.persistence.queries.BatchFetchPolicy
- All Implemented Interfaces:
Serializable
,Cloneable
BatchFetchPolicy defines batch reading configuration.
- See Also:
-
Field Summary
Modifier 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 int
Define the batch size for IN style batch fetching.protected BatchFetchType
Define the type of batch fetching to use. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
INTERNAL: 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.int
getSize()
Return the batch fetch size.getType()
Return the batch fetch type, (JOIN, IN, EXISTS).boolean
INTERNAL: Return true is this query has batchingboolean
isAttributeBatchRead
(String attributeName) INTERNAL: Return if the attribute is specified for batch reading.boolean
isAttributeBatchRead
(ClassDescriptor mappingDescriptor, String attributeName) INTERNAL: Return if the attribute is specified for batch reading.boolean
isEXISTS()
Return if using the EXISTS fetch type.boolean
isIN()
Return if using the IN fetch type.boolean
isJOIN()
Return if using the JOIN fetch type.void
setAttributeExpressions
(List<Expression> attributeExpressions) void
setAttributes
(List<String> attributes) INTERNAL: PERF: Set the cached local (only) batch read attribute names.void
setBatchedMappings
(List<DatabaseMapping> batchedMappings) INTERNAL: Set any mappings that are always batched.void
setBatchObjects
(Map<Object, Object> batchObjects) INTERNAL: Set temporary map of batched objects.void
setDataResults
(List<AbstractRecord> rows) INTERNAL: Set the rows to the set of data results for each mapping.void
setDataResults
(Map<Object, List<AbstractRecord>> dataResults) INTERNAL: Set temporary list of rows from parent batch query per batched mapping.void
setDataResults
(DatabaseMapping mapping, List<AbstractRecord> rows) INTERNAL: Set the remaining data results for the mapping.void
setMappingQueries
(Map<DatabaseMapping, ReadQuery> mappingQueries) INTERNAL: PERF: Set the internally stored prepared mapping queries.void
setSize
(int size) Set the batch fetch size.void
setType
(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.
-