public class BatchFetchPolicy
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
ObjectLevelReadQuery.setBatchFetchPolicy(BatchFetchPolicy)
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected java.util.List<Expression> |
attributeExpressions
Define the attributes to be batch fetched.
|
protected java.util.List<java.lang.String> |
attributes
PERF: Cache the local batch read attribute names.
|
protected java.util.List<DatabaseMapping> |
batchedMappings
Define the mapping to be batch fetched (from mapping settings).
|
protected java.util.Map<java.lang.Object,java.lang.Object> |
batchObjects
Stores temporary map of batched objects (this queries results).
|
protected java.util.Map<java.lang.Object,java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord>> |
dataResults
Stores temporary list of rows from parent batch query per batched mapping.
|
protected java.util.Map<DatabaseMapping,ReadQuery> |
mappingQueries
PERF: Used internally to store the prepared mapping queries.
|
protected int |
size
Define the batch size for IN style batch fetching.
|
protected BatchFetchType |
type
Define the type of batch fetching to use.
|
Constructor and Description |
---|
BatchFetchPolicy() |
BatchFetchPolicy(BatchFetchType type) |
Modifier and Type | Method and Description |
---|---|
void |
addDataResults(org.eclipse.persistence.internal.sessions.AbstractRecord row)
INTERNAL:
Add the row to the set of data results.
|
BatchFetchPolicy |
clone() |
java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> |
getAllDataResults()
INTERNAL:
Return temporary list of rows from parent batch query per batched mapping.
|
java.util.List<Expression> |
getAttributeExpressions()
INTERNAL:
Return all attributes specified for batch reading.
|
java.util.List<java.lang.String> |
getAttributes()
INTERNAL:
PERF: Return the cached local (only) batch read attribute names.
|
java.util.List<DatabaseMapping> |
getBatchedMappings()
INTERNAL:
Return any mappings that are always batched.
|
java.util.Map<java.lang.Object,java.lang.Object> |
getBatchObjects()
INTERNAL:
Return temporary map of batched objects.
|
java.util.Map<java.lang.Object,java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord>> |
getDataResults()
INTERNAL:
Return temporary list of rows from parent batch query per batched mapping.
|
java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> |
getDataResults(DatabaseMapping mapping)
INTERNAL:
Return the remaining data results for the mapping.
|
java.util.Map<DatabaseMapping,ReadQuery> |
getMappingQueries()
INTERNAL:
PERF: Return the internally stored prepared mapping queries.
|
int |
getSize()
Return the batch fetch size.
|
BatchFetchType |
getType()
Return the batch fetch type, (JOIN, IN, EXISTS).
|
boolean |
hasAttributes()
INTERNAL:
Return true is this query has batching
|
boolean |
isAttributeBatchRead(ClassDescriptor mappingDescriptor,
java.lang.String attributeName)
INTERNAL:
Return if the attribute is specified for batch reading.
|
boolean |
isAttributeBatchRead(java.lang.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(java.util.List<Expression> attributeExpressions) |
void |
setAttributes(java.util.List<java.lang.String> attributes)
INTERNAL:
PERF: Set the cached local (only) batch read attribute names.
|
void |
setBatchedMappings(java.util.List<DatabaseMapping> batchedMappings)
INTERNAL:
Set any mappings that are always batched.
|
void |
setBatchObjects(java.util.Map<java.lang.Object,java.lang.Object> batchObjects)
INTERNAL:
Set temporary map of batched objects.
|
void |
setDataResults(DatabaseMapping mapping,
java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> rows)
INTERNAL:
Set the remaining data results for the mapping.
|
void |
setDataResults(java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> rows)
INTERNAL:
Set the rows to the set of data results for each mapping.
|
void |
setDataResults(java.util.Map<java.lang.Object,java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord>> dataResults)
INTERNAL:
Set temporary list of rows from parent batch query per batched mapping.
|
void |
setMappingQueries(java.util.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).
|
protected BatchFetchType type
protected int size
protected java.util.List<Expression> attributeExpressions
protected java.util.List<DatabaseMapping> batchedMappings
protected transient java.util.Map<DatabaseMapping,ReadQuery> mappingQueries
protected java.util.List<java.lang.String> attributes
protected transient java.util.Map<java.lang.Object,java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord>> dataResults
protected transient java.util.Map<java.lang.Object,java.lang.Object> batchObjects
public BatchFetchPolicy()
public BatchFetchPolicy(BatchFetchType type)
public BatchFetchPolicy clone()
clone
in class java.lang.Object
public boolean isIN()
public boolean isJOIN()
public boolean isEXISTS()
public BatchFetchType getType()
public void setType(BatchFetchType type)
public int getSize()
public void setSize(int size)
public java.util.Map<DatabaseMapping,ReadQuery> getMappingQueries()
public void setMappingQueries(java.util.Map<DatabaseMapping,ReadQuery> mappingQueries)
public java.util.List<java.lang.String> getAttributes()
public void setAttributes(java.util.List<java.lang.String> attributes)
public void setAttributeExpressions(java.util.List<Expression> attributeExpressions)
public java.util.List<Expression> getAttributeExpressions()
public boolean hasAttributes()
public java.util.List<DatabaseMapping> getBatchedMappings()
public void setBatchedMappings(java.util.List<DatabaseMapping> batchedMappings)
public boolean isAttributeBatchRead(java.lang.String attributeName)
public boolean isAttributeBatchRead(ClassDescriptor mappingDescriptor, java.lang.String attributeName)
public void addDataResults(org.eclipse.persistence.internal.sessions.AbstractRecord row)
public java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> getDataResults(DatabaseMapping mapping)
public void setDataResults(DatabaseMapping mapping, java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> rows)
public void setDataResults(java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> rows)
public java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord> getAllDataResults()
public java.util.Map<java.lang.Object,java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord>> getDataResults()
public void setDataResults(java.util.Map<java.lang.Object,java.util.List<org.eclipse.persistence.internal.sessions.AbstractRecord>> dataResults)
public java.util.Map<java.lang.Object,java.lang.Object> getBatchObjects()
public void setBatchObjects(java.util.Map<java.lang.Object,java.lang.Object> batchObjects)