|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.kernel.DelegatingFetchConfiguration
public class DelegatingFetchConfiguration
Delegating fetch configuration that can also perform exception translation for use in facades.
| Field Summary |
|---|
| Fields inherited from interface org.apache.openjpa.kernel.FetchConfiguration |
|---|
DEFAULT, FETCH_LOAD, FETCH_NONE, FETCH_REF |
| Fields inherited from interface org.apache.openjpa.kernel.LockLevels |
|---|
LOCK_NONE, LOCK_READ, LOCK_WRITE |
| Fields inherited from interface org.apache.openjpa.kernel.LockScopes |
|---|
LOCKSCOPE_EXTENDED, LOCKSCOPE_NORMAL |
| Fields inherited from interface org.apache.openjpa.kernel.QueryFlushModes |
|---|
FLUSH_FALSE, FLUSH_TRUE, FLUSH_WITH_CONNECTION |
| Constructor Summary | |
|---|---|
DelegatingFetchConfiguration(FetchConfiguration fetch)
Constructor; supply delegate. |
|
DelegatingFetchConfiguration(FetchConfiguration fetch,
RuntimeExceptionTranslator trans)
Constructor; supply delegate and exception translator. |
|
| Method Summary | |
|---|---|
FetchConfiguration |
addFetchGroup(String group)
Adds group to the set of fetch group names to
use when loading objects. |
FetchConfiguration |
addFetchGroups(Collection groups)
Adds groups to the set of fetch group names to
use when loading objects. |
FetchConfiguration |
addField(String field)
Adds field to the set of fully-qualified field names to
use when loading objects. |
FetchConfiguration |
addFields(Collection fields)
Adds fields to 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. |
boolean |
equals(Object other)
|
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. |
FetchConfiguration |
getDelegate()
Return the direct delegate. |
boolean |
getExtendedPathLookup()
Affirms if extended path lookup feature is active. |
int |
getFetchBatchSize()
Return the fetch batch size for large result set support. |
Set |
getFetchGroups()
Returns immutable set of names of the fetch groups that this component will use when loading objects. |
Set |
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 name)
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. |
FetchConfiguration |
getInnermostDelegate()
Return the native delegate. |
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 |
getRootClasses()
Root classes for recursive operations. |
Set |
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. |
int |
hashCode()
|
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 groups)
Removes groups from the set of fetch group names
to use when loading objects. |
FetchConfiguration |
removeField(String field)
Remove the given fully-qualified field. |
FetchConfiguration |
removeFields(Collection fields)
Removes fields from the set of fully-qualified field names
to use when loading objects. |
int |
requiresFetch(FieldMetaData fmd)
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 FetchConfiguration.FETCH_REF field. |
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 name,
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 depth)
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 roots)
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. |
protected RuntimeException |
translate(RuntimeException re)
Translate the OpenJPA exception. |
FetchConfiguration |
traverse(FieldMetaData fmd)
Traverse the given field to generate (possibly) a new configuration state. |
void |
unlock()
Release internal lock if multithreaded is true. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DelegatingFetchConfiguration(FetchConfiguration fetch)
public DelegatingFetchConfiguration(FetchConfiguration fetch,
RuntimeExceptionTranslator trans)
| Method Detail |
|---|
public FetchConfiguration getDelegate()
public FetchConfiguration getInnermostDelegate()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectprotected RuntimeException translate(RuntimeException re)
public StoreContext getContext()
FetchConfiguration
getContext in interface FetchConfigurationpublic void setContext(StoreContext ctx)
FetchConfiguration
setContext in interface FetchConfigurationpublic int getFetchBatchSize()
FetchConfigurationopenjpa.FetchBatchSize setting. Note
that this property will be ignored under some data stores.
getFetchBatchSize in interface FetchConfigurationpublic FetchConfiguration setFetchBatchSize(int fetchBatchSize)
FetchConfigurationopenjpa.FetchBatchSize setting. Note
that this property will be ignored under some data stores.
setFetchBatchSize in interface FetchConfigurationpublic int getMaxFetchDepth()
FetchConfiguration1
getMaxFetchDepth in interface FetchConfigurationpublic FetchConfiguration setMaxFetchDepth(int depth)
FetchConfiguration
setMaxFetchDepth in interface FetchConfigurationdepth - denotes limiting length of traversal path from a root
instance. -1 implies no limit. 0 is not
permissible.public Set getRootInstances()
FetchConfiguration
getRootInstances in interface FetchConfigurationpublic FetchConfiguration setRootInstances(Collection roots)
FetchConfiguration
setRootInstances in interface FetchConfigurationpublic Set getRootClasses()
FetchConfiguration
getRootClasses in interface FetchConfigurationpublic FetchConfiguration setRootClasses(Collection roots)
FetchConfiguration
setRootClasses in interface FetchConfigurationpublic boolean getQueryCacheEnabled()
FetchConfigurationtrue 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.
getQueryCacheEnabled in interface FetchConfigurationpublic FetchConfiguration setQueryCacheEnabled(boolean cache)
FetchConfiguration
setQueryCacheEnabled in interface FetchConfigurationpublic int getFlushBeforeQueries()
FetchConfiguration
getFlushBeforeQueries in interface FetchConfigurationpublic FetchConfiguration setFlushBeforeQueries(int flush)
FetchConfiguration
setFlushBeforeQueries in interface FetchConfigurationpublic boolean getExtendedPathLookup()
FetchConfiguration
getExtendedPathLookup in interface FetchConfigurationpublic FetchConfiguration setExtendedPathLookup(boolean flag)
FetchConfiguration
setExtendedPathLookup in interface FetchConfigurationpublic Set getFetchGroups()
FetchConfigurationopenjpa.FetchGroups setting. This set is not thread safe.
getFetchGroups in interface FetchConfigurationpublic boolean hasFetchGroup(String group)
FetchConfiguration
hasFetchGroup in interface FetchConfigurationpublic FetchConfiguration addFetchGroup(String group)
FetchConfigurationgroup to the set of fetch group names to
use when loading objects.
addFetchGroup in interface FetchConfigurationpublic FetchConfiguration addFetchGroups(Collection groups)
FetchConfigurationgroups to the set of fetch group names to
use when loading objects.
addFetchGroups in interface FetchConfigurationpublic FetchConfiguration removeFetchGroup(String group)
FetchConfiguration
removeFetchGroup in interface FetchConfigurationpublic FetchConfiguration removeFetchGroups(Collection groups)
FetchConfigurationgroups from the set of fetch group names
to use when loading objects.
removeFetchGroups in interface FetchConfigurationpublic FetchConfiguration clearFetchGroups()
FetchConfiguration
clearFetchGroups in interface FetchConfigurationpublic FetchConfiguration resetFetchGroups()
FetchConfiguration
resetFetchGroups in interface FetchConfigurationpublic Set getFields()
FetchConfiguration
getFields in interface FetchConfigurationpublic boolean hasField(String field)
FetchConfiguration
hasField in interface FetchConfigurationpublic FetchConfiguration addField(String field)
FetchConfigurationfield to the set of fully-qualified field names to
use when loading objects.
addField in interface FetchConfigurationpublic FetchConfiguration addFields(Collection fields)
FetchConfigurationfields to the set of fully-qualified field names to
use when loading objects.
addFields in interface FetchConfigurationpublic FetchConfiguration removeField(String field)
FetchConfiguration
removeField in interface FetchConfigurationpublic FetchConfiguration removeFields(Collection fields)
FetchConfigurationfields from the set of fully-qualified field names
to use when loading objects.
removeFields in interface FetchConfigurationpublic FetchConfiguration clearFields()
FetchConfiguration
clearFields in interface FetchConfigurationpublic int getLockTimeout()
FetchConfiguration
getLockTimeout in interface FetchConfigurationpublic FetchConfiguration setLockTimeout(int timeout)
FetchConfiguration
setLockTimeout in interface FetchConfigurationpublic int getQueryTimeout()
FetchConfiguration
getQueryTimeout in interface FetchConfigurationpublic FetchConfiguration setQueryTimeout(int timeout)
FetchConfiguration
setQueryTimeout in interface FetchConfigurationpublic int getLockScope()
FetchConfiguration
getLockScope in interface FetchConfigurationpublic FetchConfiguration setLockScope(int scope)
FetchConfiguration
setLockScope in interface FetchConfigurationpublic int getReadLockLevel()
FetchConfiguration
getReadLockLevel in interface FetchConfigurationpublic FetchConfiguration setReadLockLevel(int level)
FetchConfiguration
setReadLockLevel in interface FetchConfigurationpublic int getWriteLockLevel()
FetchConfiguration
getWriteLockLevel in interface FetchConfigurationpublic FetchConfiguration setWriteLockLevel(int level)
FetchConfiguration
setWriteLockLevel in interface FetchConfigurationpublic ResultList newResultList(ResultObjectProvider rop)
FetchConfiguration
newResultList in interface FetchConfigurationpublic void copy(FetchConfiguration fetch)
FetchConfiguration
copy in interface FetchConfigurationpublic Object clone()
FetchConfiguration
clone in interface FetchConfigurationclone in class Object
public void setHint(String name,
Object value)
FetchConfiguration
setHint in interface FetchConfigurationvalue - the value of the hint. If the hint has a corresponding setter, then
the type of value must be same as the setter argument.
public void setHint(String name,
Object value,
Object original)
FetchConfiguration
setHint in interface FetchConfigurationname - 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.public boolean isHintSet(String key)
FetchConfiguration
isHintSet in interface FetchConfigurationpublic Object getHint(String name)
FetchConfiguration
getHint in interface FetchConfigurationpublic Map<String,Object> getHints()
FetchConfiguration
getHints in interface FetchConfigurationpublic int requiresFetch(FieldMetaData fmd)
FetchConfigurationFetchConfiguration.FETCH_NONE,
FetchConfiguration.FETCH_LOAD, FETCH_REF.
requiresFetch in interface FetchConfigurationpublic boolean requiresLoad()
FetchConfigurationFetchConfiguration.FETCH_REF field.
requiresLoad in interface FetchConfigurationpublic FetchConfiguration traverse(FieldMetaData fmd)
FetchConfiguration
traverse in interface FetchConfigurationpublic void lock()
FetchConfiguration
lock in interface FetchConfigurationpublic void unlock()
FetchConfiguration
unlock in interface FetchConfigurationpublic DataCacheRetrieveMode getCacheRetrieveMode()
FetchConfiguration
getCacheRetrieveMode in interface FetchConfigurationpublic DataCacheStoreMode getCacheStoreMode()
FetchConfiguration
getCacheStoreMode in interface FetchConfigurationpublic void setCacheRetrieveMode(DataCacheRetrieveMode mode)
FetchConfiguration
setCacheRetrieveMode in interface FetchConfigurationpublic void setCacheStoreMode(DataCacheStoreMode mode)
FetchConfiguration
setCacheStoreMode in interface FetchConfiguration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||