public class FetchPlanImpl extends Object implements FetchPlan
| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,HintValueConverter[]> |
_hints
Structure holds one or more converters for a user-specified hint value.
|
protected static Map<String,List<String>> |
_precedence
Structure holds ranking of equivalent hint keys.
|
DEFAULT, DEPTH_INFINITE, GROUP_ALL, GROUP_DEFAULT| Constructor and Description |
|---|
FetchPlanImpl(FetchConfiguration fetch)
Constructor; supply delegate.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
equals(Object other) |
DataCacheRetrieveMode |
getCacheRetrieveMode()
Gets the current retrieve mode for data cache.
|
DataCacheStoreMode |
getCacheStoreMode()
Gets the current storage mode for data cache.
|
FetchConfiguration |
getDelegate()
Delegate.
|
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.
|
javax.persistence.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() |
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.
|
javax.persistence.LockModeType |
getReadLockMode()
The lock level to use for locking loaded objects.
|
javax.persistence.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.
|
int |
hashCode() |
protected DelegatingFetchConfiguration |
newDelegatingFetchConfiguration(FetchConfiguration fetch)
Create a new exception-translating delegating fetch configuration.
|
protected static void |
registerHint(String[] keys,
HintValueConverter... converters)
Registers a hint key with its value converters.
|
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)
Sets the hint after converting the value appropriately.
|
void |
setHints(Map<String,Object> hints) |
FetchPlan |
setLockScope(javax.persistence.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) |
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(javax.persistence.LockModeType mode)
The lock level to use for locking loaded objects.
|
FetchPlan |
setWriteLockMode(javax.persistence.LockModeType mode)
The lock level to use for locking dirtied objects.
|
protected static Map<String,List<String>> _precedence
protected static Map<String,HintValueConverter[]> _hints
public FetchPlanImpl(FetchConfiguration fetch)
protected static void registerHint(String[] keys, HintValueConverter... converters)
keys - a set of keys in increasing order of ranking. Can not be null or empty.converters - array of converters that are attempts in order to convert a user-specified hint value
to a value that is consumable by the kernel.protected DelegatingFetchConfiguration newDelegatingFetchConfiguration(FetchConfiguration fetch)
public FetchConfiguration getDelegate()
getDelegate in interface FetchPlanpublic int getMaxFetchDepth()
FetchPlangetMaxFetchDepth in interface FetchPlanpublic FetchPlan setMaxFetchDepth(int depth)
FetchPlansetMaxFetchDepth in interface FetchPlanpublic int getFetchBatchSize()
FetchPlanopenjpa.FetchBatchSize setting. Note
that this property will be ignored under some data stores.getFetchBatchSize in interface FetchPlanpublic FetchPlan setFetchBatchSize(int fetchBatchSize)
FetchPlanopenjpa.FetchBatchSize setting. Note
that this property will be ignored under some data stores.setFetchBatchSize in interface FetchPlanpublic boolean getQueryResultCacheEnabled()
FetchPlantrue 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.getQueryResultCacheEnabled in interface FetchPlanpublic FetchPlan setQueryResultCacheEnabled(boolean cache)
FetchPlansetQueryResultCacheEnabled in interface FetchPlanpublic boolean getQueryResultCache()
getQueryResultCache in interface FetchPlanpublic FetchPlan setQueryResultCache(boolean cache)
setQueryResultCache in interface FetchPlanpublic Collection<String> getFetchGroups()
FetchPlanopenjpa.FetchGroups setting.getFetchGroups in interface FetchPlanpublic FetchPlan addFetchGroup(String group)
FetchPlangroup to the set of fetch group to
use when loading objects.addFetchGroup in interface FetchPlanpublic FetchPlan addFetchGroups(String... groups)
FetchPlangroups to the set of fetch group names to
use when loading objects.addFetchGroups in interface FetchPlanpublic FetchPlan addFetchGroups(Collection groups)
FetchPlangroups to the set of fetch group names to
use when loading objects.addFetchGroups in interface FetchPlanpublic FetchPlan removeFetchGroup(String group)
FetchPlanremoveFetchGroup in interface FetchPlanpublic FetchPlan removeFetchGroups(String... groups)
FetchPlangroups from the set of fetch group names
to use when loading objects.removeFetchGroups in interface FetchPlanpublic FetchPlan removeFetchGroups(Collection groups)
FetchPlangroups from the set of fetch group names
to use when loading objects.removeFetchGroups in interface FetchPlanpublic FetchPlan clearFetchGroups()
FetchPlanclearFetchGroups in interface FetchPlanpublic FetchPlan resetFetchGroups()
FetchPlanresetFetchGroups in interface FetchPlanpublic Collection<String> getFields()
FetchPlanpublic boolean hasField(String field)
FetchPlanpublic boolean hasField(Class cls, String field)
FetchPlanpublic FetchPlan addField(String field)
FetchPlanfield to the set of fully-qualified field names to
use when loading objects.public FetchPlan addField(Class cls, String field)
FetchPlanfield to the set of field names to
use when loading objects.public FetchPlan addFields(String... fields)
FetchPlanfields to the set of fully-qualified field names to
use when loading objects.public FetchPlan addFields(Class cls, String... fields)
FetchPlanfields to the set of field names to
use when loading objects.public FetchPlan addFields(Collection fields)
FetchPlanfields to the set of fully-qualified field names to
use when loading objects.public FetchPlan addFields(Class cls, Collection fields)
FetchPlanfields to the set of field names to
use when loading objects.public FetchPlan removeField(String field)
FetchPlanremoveField in interface FetchPlanpublic FetchPlan removeField(Class cls, String field)
FetchPlanremoveField in interface FetchPlanpublic FetchPlan removeFields(String... fields)
FetchPlanfields from the set of fully-qualified field names
to use when loading objects.removeFields in interface FetchPlanpublic FetchPlan removeFields(Class cls, String... fields)
FetchPlanfields from the set of field names
to use when loading objects.removeFields in interface FetchPlanpublic FetchPlan removeFields(Collection fields)
FetchPlanfields from the set of fully-qualified field names
to use when loading objects.removeFields in interface FetchPlanpublic FetchPlan removeFields(Class cls, Collection fields)
FetchPlanfields from the set of field names
to use when loading objects.removeFields in interface FetchPlanpublic FetchPlan clearFields()
FetchPlanclearFields in interface FetchPlanpublic int getLockTimeout()
FetchPlangetLockTimeout in interface FetchPlanpublic FetchPlan setLockTimeout(int timeout)
FetchPlansetLockTimeout in interface FetchPlanpublic javax.persistence.PessimisticLockScope getLockScope()
FetchPlangetLockScope in interface FetchPlanpublic FetchPlan setLockScope(javax.persistence.PessimisticLockScope scope)
FetchPlansetLockScope in interface FetchPlanpublic int getQueryTimeout()
FetchPlangetQueryTimeout in interface FetchPlanpublic FetchPlan setQueryTimeout(int timeout)
FetchPlansetQueryTimeout in interface FetchPlanpublic javax.persistence.LockModeType getReadLockMode()
FetchPlangetReadLockMode in interface FetchPlanpublic FetchPlan setReadLockMode(javax.persistence.LockModeType mode)
FetchPlansetReadLockMode in interface FetchPlanpublic javax.persistence.LockModeType getWriteLockMode()
FetchPlangetWriteLockMode in interface FetchPlanpublic FetchPlan setWriteLockMode(javax.persistence.LockModeType mode)
FetchPlansetWriteLockMode in interface FetchPlanpublic boolean getExtendedPathLookup()
FetchPlangetExtendedPathLookup in interface FetchPlanpublic FetchPlan setExtendedPathLookup(boolean flag)
FetchPlansetExtendedPathLookup in interface FetchPlanpublic Object getHint(String key)
FetchPlanpublic void setHint(String key, Object value)
public Map<String,Object> getHints()
FetchPlanpublic DataCacheRetrieveMode getCacheRetrieveMode()
FetchPlangetCacheRetrieveMode in interface FetchPlanpublic DataCacheStoreMode getCacheStoreMode()
FetchPlangetCacheStoreMode in interface FetchPlanpublic FetchPlan setCacheStoreMode(DataCacheStoreMode mode)
FetchPlansetCacheStoreMode in interface FetchPlanpublic FetchPlan setCacheRetrieveMode(DataCacheRetrieveMode mode)
FetchPlansetCacheRetrieveMode in interface FetchPlanCopyright © 2006–2020 Apache Software Foundation. All rights reserved.