|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FetchPlan
The fetch plan allows you to dynamically alter eager fetching configuration and other aspects of data loading.
Field Summary | |
---|---|
static int |
DEFAULT
Constant to revert any setting to its default value. |
static int |
DEPTH_INFINITE
Infinite fetch depth. |
static String |
GROUP_ALL
Fetch group representing all fields. |
static String |
GROUP_DEFAULT
The default fetch group. |
Method Summary | |
---|---|
FetchPlan |
addFetchGroup(String group)
Adds group to the set of fetch group to
use when loading objects. |
FetchPlan |
addFetchGroups(Collection groups)
Adds groups to the set of fetch group names to
use when loading objects. |
FetchPlan |
addFetchGroups(String... groups)
Adds groups to the set of fetch group names to
use when loading objects. |
FetchPlan |
addField(Class cls,
String field)
Adds field to the set of field names to
use when loading objects. |
FetchPlan |
addField(String field)
Adds field to the set of fully-qualified field names to
use when loading objects. |
FetchPlan |
addFields(Class cls,
Collection fields)
Adds fields to the set of field names to
use when loading objects. |
FetchPlan |
addFields(Class cls,
String... fields)
Adds fields to the set of field names to
use when loading objects. |
FetchPlan |
addFields(Collection fields)
Adds fields to the set of fully-qualified field names to
use when loading objects. |
FetchPlan |
addFields(String... fields)
Adds fields to the set of fully-qualified field names to
use when loading objects. |
FetchPlan |
clearFetchGroups()
Clears the set of fetch group names to use wen loading data. |
FetchPlan |
clearFields()
Clears the set of field names to use wen loading data. |
DataCacheRetrieveMode |
getCacheRetrieveMode()
Gets the current retrieve mode for data cache. |
DataCacheStoreMode |
getCacheStoreMode()
Gets the current storage mode for data cache. |
FetchConfiguration |
getDelegate()
Deprecated. cast to FetchPlanImpl instead. This
method pierces the published-API boundary, as does the SPI cast. |
boolean |
getExtendedPathLookup()
Affirms if extended path lookup feature is active. |
int |
getFetchBatchSize()
Return the fetch batch size for large result set support. |
Collection<String> |
getFetchGroups()
Returns the names of the fetch groups that this component will use when loading objects. |
Collection<String> |
getFields()
Returns the fully qualified names of the fields that this component will use when loading objects. |
Object |
getHint(String key)
Get the hint value for the given key. |
Map<String,Object> |
getHints()
Get the hints and their values currently set on this receiver. |
PessimisticLockScope |
getLockScope()
The lock scope to use for locking loaded objects. |
int |
getLockTimeout()
The number of milliseconds to wait for an object lock, or -1 for no limit. |
int |
getMaxFetchDepth()
The maximum fetch depth when loading an object. |
boolean |
getQueryResultCache()
Deprecated. use getQueryResultCacheEnabled() instead. |
boolean |
getQueryResultCacheEnabled()
Return whether or not query caching is enabled. |
int |
getQueryTimeout()
The number of milliseconds to wait for a query, or -1 for no limit. |
LockModeType |
getReadLockMode()
The lock level to use for locking loaded objects. |
LockModeType |
getWriteLockMode()
The lock level to use for locking dirtied objects. |
boolean |
hasField(Class cls,
String field)
Return true if the given field has been added. |
boolean |
hasField(String field)
Return true if the given field has been added. |
FetchPlan |
removeFetchGroup(String group)
Remove the given fetch group. |
FetchPlan |
removeFetchGroups(Collection groups)
Removes groups from the set of fetch group names
to use when loading objects. |
FetchPlan |
removeFetchGroups(String... groups)
Removes groups from the set of fetch group names
to use when loading objects. |
FetchPlan |
removeField(Class cls,
String field)
Remove the given field. |
FetchPlan |
removeField(String field)
Remove the given fully-qualified field. |
FetchPlan |
removeFields(Class cls,
Collection fields)
Removes fields from the set of field names
to use when loading objects. |
FetchPlan |
removeFields(Class cls,
String... fields)
Removes fields from the set of field names
to use when loading objects. |
FetchPlan |
removeFields(Collection fields)
Removes fields from the set of fully-qualified field names
to use when loading objects. |
FetchPlan |
removeFields(String... fields)
Removes fields from the set of fully-qualified field names
to use when loading objects. |
FetchPlan |
resetFetchGroups()
Resets the set of fetch groups to the list in the global configuration. |
FetchPlan |
setCacheRetrieveMode(DataCacheRetrieveMode mode)
Sets the current retrieve mode for data cache. |
FetchPlan |
setCacheStoreMode(DataCacheStoreMode mode)
Sets the current storage mode for data cache. |
FetchPlan |
setExtendedPathLookup(boolean flag)
Sets extended path lookup feature. |
FetchPlan |
setFetchBatchSize(int fetchBatchSize)
Set the fetch batch size for large result set support. |
void |
setHint(String key,
Object value)
Set the hint for the given key to the given value. |
FetchPlan |
setLockScope(PessimisticLockScope scope)
The lock scope to use for locking loaded objects. |
FetchPlan |
setLockTimeout(int timeout)
The number of milliseconds to wait for an object lock, or -1 for no limit. |
FetchPlan |
setMaxFetchDepth(int depth)
The maximum fetch depth when loading an object. |
FetchPlan |
setQueryResultCache(boolean cache)
Deprecated. use setQueryResultCacheEnabled(boolean) instead. |
FetchPlan |
setQueryResultCacheEnabled(boolean cache)
Control whether or not query caching is enabled. |
FetchPlan |
setQueryTimeout(int timeout)
The number of milliseconds to wait for a query, or -1 for no limit. |
FetchPlan |
setReadLockMode(LockModeType mode)
The lock level to use for locking loaded objects. |
FetchPlan |
setWriteLockMode(LockModeType mode)
The lock level to use for locking dirtied objects. |
Field Detail |
---|
static final String GROUP_ALL
static final String GROUP_DEFAULT
static final int DEPTH_INFINITE
static final int DEFAULT
Method Detail |
---|
int getMaxFetchDepth()
FetchPlan setMaxFetchDepth(int depth)
int getFetchBatchSize()
openjpa.FetchBatchSize
setting. Note
that this property will be ignored under some data stores.
FetchPlan setFetchBatchSize(int fetchBatchSize)
openjpa.FetchBatchSize
setting. Note
that this property will be ignored under some data stores.
boolean getQueryResultCacheEnabled()
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.
FetchPlan setQueryResultCacheEnabled(boolean cache)
boolean getQueryResultCache()
getQueryResultCacheEnabled()
instead.
FetchPlan setQueryResultCache(boolean cache)
setQueryResultCacheEnabled(boolean)
instead.
Collection<String> getFetchGroups()
openjpa.FetchGroups
setting.
FetchPlan addFetchGroup(String group)
group
to the set of fetch group to
use when loading objects.
FetchPlan addFetchGroups(String... groups)
groups
to the set of fetch group names to
use when loading objects.
FetchPlan addFetchGroups(Collection groups)
groups
to the set of fetch group names to
use when loading objects.
FetchPlan removeFetchGroup(String group)
FetchPlan removeFetchGroups(String... groups)
groups
from the set of fetch group names
to use when loading objects.
FetchPlan removeFetchGroups(Collection groups)
groups
from the set of fetch group names
to use when loading objects.
FetchPlan clearFetchGroups()
FetchPlan resetFetchGroups()
Collection<String> getFields()
boolean hasField(String field)
boolean hasField(Class cls, String field)
FetchPlan addField(String field)
field
to the set of fully-qualified field names to
use when loading objects.
FetchPlan addField(Class cls, String field)
field
to the set of field names to
use when loading objects.
FetchPlan addFields(String... fields)
fields
to the set of fully-qualified field names to
use when loading objects.
FetchPlan addFields(Class cls, String... fields)
fields
to the set of field names to
use when loading objects.
FetchPlan addFields(Collection fields)
fields
to the set of fully-qualified field names to
use when loading objects.
FetchPlan addFields(Class cls, Collection fields)
fields
to the set of field names to
use when loading objects.
FetchPlan removeField(String field)
FetchPlan removeField(Class cls, String field)
FetchPlan removeFields(String... fields)
fields
from the set of fully-qualified field names
to use when loading objects.
FetchPlan removeFields(Class cls, String... fields)
fields
from the set of field names
to use when loading objects.
FetchPlan removeFields(Collection fields)
fields
from the set of fully-qualified field names
to use when loading objects.
FetchPlan removeFields(Class cls, Collection fields)
fields
from the set of field names
to use when loading objects.
FetchPlan clearFields()
int getLockTimeout()
FetchPlan setLockTimeout(int timeout)
PessimisticLockScope getLockScope()
FetchPlan setLockScope(PessimisticLockScope scope)
int getQueryTimeout()
FetchPlan setQueryTimeout(int timeout)
LockModeType getReadLockMode()
FetchPlan setReadLockMode(LockModeType mode)
LockModeType getWriteLockMode()
FetchPlan setWriteLockMode(LockModeType mode)
FetchConfiguration getDelegate()
FetchPlanImpl
instead. This
method pierces the published-API boundary, as does the SPI cast.
boolean getExtendedPathLookup()
FetchPlan setExtendedPathLookup(boolean flag)
DataCacheStoreMode getCacheStoreMode()
FetchPlan setCacheStoreMode(DataCacheStoreMode mode)
DataCacheRetrieveMode getCacheRetrieveMode()
FetchPlan setCacheRetrieveMode(DataCacheRetrieveMode mode)
void setHint(String key, Object value)
value
- the value of the hint.name
- the name of the hint.Map<String,Object> getHints()
Object getHint(String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |