EclipseLink 2.1.0, build 'v20100311-r6779' API Reference

org.eclipse.persistence.queries
Class BatchFetchPolicy

java.lang.Object
  extended by org.eclipse.persistence.queries.BatchFetchPolicy
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class BatchFetchPolicy
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

BatchFetchPolicy defines batch reading configuration.

See Also:
ObjectLevelReadQuery.setBatchFetchPolicy(BatchFetchPolicy), Serialized Form
Author:
James Sutherland

Field Summary
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.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 Summary
BatchFetchPolicy()
           
BatchFetchPolicy(BatchFetchType type)
           
 
Method Summary
 BatchFetchPolicy clone()
           
 java.util.List<Expression> getAttributeExpressions()
          INTERNAL: Return all attributes specified for batch reading.
 java.util.List<java.lang.String> getAttributes()
          PERF: Return the cached local (only) batch read attribute names.
 java.util.Map<DatabaseMapping,ReadQuery> getMappingQueries()
          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.
 void setAttributeExpressions(java.util.List<Expression> attributeExpressions)
           
 void setAttributes(java.util.List<java.lang.String> attributes)
          PERF: Set the cached local (only) batch read attribute names.
 void setMappingQueries(java.util.Map<DatabaseMapping,ReadQuery> mappingQueries)
          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).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected BatchFetchType type
Define the type of batch fetching to use.


size

protected int size
Define the batch size for IN style batch fetching.


attributeExpressions

protected java.util.List<Expression> attributeExpressions
Define the attributes to be batch fetched.


mappingQueries

protected transient java.util.Map<DatabaseMapping,ReadQuery> mappingQueries
PERF: Used internally to store the prepared mapping queries.


attributes

protected java.util.List<java.lang.String> attributes
PERF: Cache the local batch read attribute names.

Constructor Detail

BatchFetchPolicy

public BatchFetchPolicy()

BatchFetchPolicy

public BatchFetchPolicy(BatchFetchType type)
Method Detail

clone

public BatchFetchPolicy clone()
Overrides:
clone in class java.lang.Object

getType

public BatchFetchType getType()
Return the batch fetch type, (JOIN, IN, EXISTS).


setType

public void setType(BatchFetchType type)
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

public java.util.Map<DatabaseMapping,ReadQuery> getMappingQueries()
PERF: Return the internally stored prepared mapping queries.


setMappingQueries

public void setMappingQueries(java.util.Map<DatabaseMapping,ReadQuery> mappingQueries)
PERF: Set the internally stored prepared mapping queries.


getAttributes

public java.util.List<java.lang.String> getAttributes()
PERF: Return the cached local (only) batch read attribute names.


setAttributes

public void setAttributes(java.util.List<java.lang.String> attributes)
PERF: Set the cached local (only) batch read attribute names.


setAttributeExpressions

public void setAttributeExpressions(java.util.List<Expression> attributeExpressions)

getAttributeExpressions

public java.util.List<Expression> getAttributeExpressions()
INTERNAL: Return all attributes specified for batch reading.


hasAttributes

public boolean hasAttributes()
INTERNAL: Return true is this query has batching


isAttributeBatchRead

public boolean isAttributeBatchRead(java.lang.String attributeName)
INTERNAL: Return if the attribute is specified for batch reading.


isAttributeBatchRead

public boolean isAttributeBatchRead(ClassDescriptor mappingDescriptor,
                                    java.lang.String attributeName)
INTERNAL: Return if the attribute is specified for batch reading.


EclipseLink 2.1.0, build 'v20100311-r6779' API Reference