public interface FetchConfiguration extends Serializable, Cloneable, LockLevels, LockScopes, QueryFlushModes
| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULTConstant to revert any setting back to its default value. | 
| static int | FETCH_LOADConstant indicating that a field requires a fetch and load of fetched
 data. | 
| static int | FETCH_NONEConstant indicating that a field does not require fetching. | 
| static int | FETCH_REFConstant indicating that a reference to the field's value must be
 fetched, but loading data is not necessary. | 
LOCK_NONE, LOCK_READ, LOCK_WRITELOCKSCOPE_EXTENDED, LOCKSCOPE_NORMALFLUSH_FALSE, FLUSH_TRUE, FLUSH_WITH_CONNECTION| Modifier and Type | Method and Description | 
|---|---|
| FetchConfiguration | addFetchGroup(String group)Adds  groupto the set of fetch group names to
 use when loading objects. | 
| FetchConfiguration | addFetchGroups(Collection<String> groups)Adds  groupsto the set of fetch group names to
 use when loading objects. | 
| FetchConfiguration | addField(String field)Adds  fieldto the set of fully-qualified field names to
 use when loading objects. | 
| FetchConfiguration | addFields(Collection<String> fields)Adds  fieldsto the set of fully-qualified field names to
 use when loading objects. | 
| FetchConfiguration | clearFetchGroups()Clears the set of fetch group names to use when loading
 data. | 
| FetchConfiguration | clearFields()Clears the set of field names to use when loading
 data. | 
| Object | clone()Clone this instance. | 
| void | copy(FetchConfiguration fetch)Copy the state from the given fetch configuration to this one. | 
| DataCacheRetrieveMode | getCacheRetrieveMode()Gets the current retrieve mode for data cache. | 
| DataCacheStoreMode | getCacheStoreMode()Gets the current storage mode for data cache. | 
| StoreContext | getContext()Return the context associated with this configuration;
 may be null if it has not been set or this object has been serialized. | 
| boolean | getExtendedPathLookup()Affirms if extended path lookup feature is active. | 
| int | getFetchBatchSize()Return the fetch batch size for large result set support. | 
| Set<String> | getFetchGroups()Returns immutable set of names of the fetch groups that this component
 will use when loading objects. | 
| Set<String> | getFields()Returns the set of fully-qualified field names that this component
 will use when loading objects. | 
| int | getFlushBeforeQueries()The query automatic flush configuration. | 
| Object | getHint(String key)Get the hint value for the specific key as originally set by the caller, or null if the hint is not specified. | 
| Map<String,Object> | getHints()Get an immutable view of the currently active hints and their values. | 
| int | getLockScope()The lock scope for next fetch. | 
| int | getLockTimeout()The number of milliseconds to wait for an object lock, or -1 for no
 limit. | 
| int | getMaxFetchDepth()Return the maximum depth of fetched instance graph. | 
| boolean | getQueryCacheEnabled()Return whether or not query caching is enabled. | 
| int | getQueryTimeout()The number of milliseconds to wait for a query, or -1 for no
 limit. | 
| int | getReadLockLevel()The lock level to use for locking loaded objects. | 
| Set<Class<?>> | getRootClasses()Root classes for recursive operations. | 
| Set<Object> | getRootInstances()Root instances for recursive operations. | 
| int | getWriteLockLevel()The lock level to use for locking dirtied objects. | 
| boolean | hasFetchGroup(String group)Return true if the given fetch group has been added. | 
| boolean | hasField(String field)Return true if the given fully-qualified field has been added. | 
| boolean | isDefaultPUFetchGroupConfigurationOnly()Affirm if the Fetch Plan currently matches the Persistence Unit's configured default. | 
| boolean | isFetchConfigurationSQLCacheAdmissible()Whether SQL generated by the FetchConfiguration's current configuration should be cached. | 
| boolean | isHintSet(String key)Affirm if the given hint has been set in this receiver. | 
| void | lock()Synchronize on internal lock if multithreaded is true. | 
| ResultList<?> | newResultList(ResultObjectProvider rop)Return a new result list for the current fetch configuration. | 
| FetchConfiguration | removeFetchGroup(String group)Remove the given fetch group. | 
| FetchConfiguration | removeFetchGroups(Collection<String> groups)Removes  groupsfrom the set of fetch group names
 to use when loading objects. | 
| FetchConfiguration | removeField(String field)Remove the given fully-qualified field. | 
| FetchConfiguration | removeFields(Collection<String> fields)Removes  fieldsfrom the set of fully-qualified field names
 to use when loading objects. | 
| int | requiresFetch(FieldMetaData fm)Affirms if the given field requires to be fetched in the context
 of current fetch operation. | 
| boolean | requiresLoad()Return false if we know that the object being fetched with this
 configuration does not require a load, because this configuration came
 from a traversal of a  FETCH_REFfield. | 
| FetchConfiguration | resetFetchGroups()Resets the set of fetch groups to the list in the global configuration. | 
| void | setCacheRetrieveMode(DataCacheRetrieveMode mode)Sets the current retrieve mode for data cache. | 
| void | setCacheStoreMode(DataCacheStoreMode mode)Sets the current storage mode for data cache. | 
| void | setContext(StoreContext ctx)Called automatically by the system to associate the fetch configuration
 with a context before use. | 
| FetchConfiguration | setExtendedPathLookup(boolean flag)Sets extended path lookup feature. | 
| FetchConfiguration | setFetchBatchSize(int fetchBatchSize)Set the fetch batch size for large result set support. | 
| FetchConfiguration | setFlushBeforeQueries(int flush)The query automatic flush configuration. | 
| void | setHint(String key,
       Object value)Sets an arbitrary query hint that may be utilized during execution. | 
| void | setHint(String name,
       Object value,
       Object original)Sets an arbitrary query hint that may be utilized during execution. | 
| FetchConfiguration | setLockScope(int scope)The lock scope for next fetch. | 
| FetchConfiguration | setLockTimeout(int timeout)The number of milliseconds to wait for an object lock, or -1 for no
 limit. | 
| FetchConfiguration | setMaxFetchDepth(int max)Set the maximum depth of the fetched instance graph. | 
| FetchConfiguration | setQueryCacheEnabled(boolean cache)Control whether or not query caching is enabled. | 
| FetchConfiguration | setQueryTimeout(int timeout)The number of milliseconds to wait for a query, or -1 for no
 limit. | 
| FetchConfiguration | setReadLockLevel(int level)The lock level to use for locking loaded objects. | 
| FetchConfiguration | setRootClasses(Collection<Class<?>> classes)Root classes for recursive operations. | 
| FetchConfiguration | setRootInstances(Collection<?> roots)Root instances for recursive operations. | 
| FetchConfiguration | setWriteLockLevel(int level)The lock level to use for locking dirtied objects. | 
| FetchConfiguration | traverse(FieldMetaData fm)Traverse the given field to generate (possibly) a new configuration 
 state. | 
| void | unlock()Release internal lock if multithreaded is true. | 
static final int DEFAULT
static final int FETCH_NONE
static final int FETCH_LOAD
static final int FETCH_REF
StoreContext getContext()
void setContext(StoreContext ctx)
Object clone()
void copy(FetchConfiguration fetch)
int getFetchBatchSize()
openjpa.FetchBatchSize setting. Note
 that this property will be ignored under some data stores.FetchConfiguration setFetchBatchSize(int fetchBatchSize)
openjpa.FetchBatchSize setting. Note
 that this property will be ignored under some data stores.int getMaxFetchDepth()
1FetchConfiguration setMaxFetchDepth(int max)
max - denotes limiting length of traversal path from a root
 instance. -1 implies no limit. 0 is not
 permissible.boolean getQueryCacheEnabled()
true but the datacache plugin is not installed, caching
 will not be enabled. If this
 returns false, query caching will not be used
 even if the datacache plugin is installed.FetchConfiguration setQueryCacheEnabled(boolean cache)
int getFlushBeforeQueries()
FetchConfiguration setFlushBeforeQueries(int flush)
boolean getExtendedPathLookup()
FetchConfiguration setExtendedPathLookup(boolean flag)
Set<String> getFetchGroups()
openjpa.FetchGroups setting.  This set is not thread safe.boolean hasFetchGroup(String group)
FetchConfiguration addFetchGroup(String group)
group to the set of fetch group names to
 use when loading objects.FetchConfiguration addFetchGroups(Collection<String> groups)
groups to the set of fetch group names to
 use when loading objects.FetchConfiguration removeFetchGroup(String group)
FetchConfiguration removeFetchGroups(Collection<String> groups)
groups from the set of fetch group names
 to use when loading objects.FetchConfiguration clearFetchGroups()
FetchConfiguration resetFetchGroups()
Set<String> getFields()
boolean hasField(String field)
FetchConfiguration addField(String field)
field to the set of fully-qualified field names to
 use when loading objects.FetchConfiguration addFields(Collection<String> fields)
fields to the set of fully-qualified field names to
 use when loading objects.FetchConfiguration removeField(String field)
FetchConfiguration removeFields(Collection<String> fields)
fields from the set of fully-qualified field names
 to use when loading objects.FetchConfiguration clearFields()
int getLockTimeout()
FetchConfiguration setLockTimeout(int timeout)
int getLockScope()
FetchConfiguration setLockScope(int scope)
int getQueryTimeout()
FetchConfiguration setQueryTimeout(int timeout)
int getReadLockLevel()
FetchConfiguration setReadLockLevel(int level)
int getWriteLockLevel()
DataCacheStoreMode getCacheStoreMode()
void setCacheStoreMode(DataCacheStoreMode mode)
DataCacheRetrieveMode getCacheRetrieveMode()
void setCacheRetrieveMode(DataCacheRetrieveMode mode)
FetchConfiguration setWriteLockLevel(int level)
ResultList<?> newResultList(ResultObjectProvider rop)
void setHint(String name, Object value, Object original)
name - the name of the hintvalue - the value of the hint. If the hint has a corresponding setter, then
 the type of value must be same as the setter argument.original - the value of the hint as specified by the user.void setHint(String key, Object value)
name - the name of the hintvalue - the value of the hint. If the hint has a corresponding setter, then
 the type of value must be same as the setter argument.Object getHint(String key)
name - the hint nameMap<String,Object> getHints()
boolean isHintSet(String key)
boolean isDefaultPUFetchGroupConfigurationOnly()
Set<Class<?>> getRootClasses()
FetchConfiguration setRootClasses(Collection<Class<?>> classes)
Set<Object> getRootInstances()
FetchConfiguration setRootInstances(Collection<?> roots)
void lock()
void unlock()
int requiresFetch(FieldMetaData fm)
FETCH_NONE,
 FETCH_LOAD, FETCH_REF.boolean requiresLoad()
FETCH_REF field.FetchConfiguration traverse(FieldMetaData fm)
boolean isFetchConfigurationSQLCacheAdmissible()
Copyright © 2006–2018 Apache Software Foundation. All rights reserved.