Class JDBCFetchPlanImpl
java.lang.Object
org.apache.openjpa.persistence.FetchPlanImpl
org.apache.openjpa.persistence.jdbc.JDBCFetchPlanImpl
- All Implemented Interfaces:
FetchPlan,JDBCFetchPlan
JDBC extensions to the fetch plan.
- Since:
- 0.4.0
- Author:
- Abe White
-
Field Summary
Fields inherited from class org.apache.openjpa.persistence.FetchPlanImpl
_hints, _precedenceFields inherited from interface org.apache.openjpa.persistence.FetchPlan
DEFAULT, DEPTH_INFINITE, GROUP_ALL, GROUP_DEFAULTFields inherited from interface org.apache.openjpa.persistence.jdbc.JDBCFetchPlan
EAGER_JOIN, EAGER_NONE, EAGER_PARALLEL, SIZE_LAST, SIZE_QUERY, SIZE_UNKNOWN, SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFetchGroup(String group) Addsgroupto the set of fetch group to use when loading objects.addFetchGroups(String... groups) Addsgroupsto the set of fetch group names to use when loading objects.addFetchGroups(Collection groups) Addsgroupsto the set of fetch group names to use when loading objects.Addsfieldto the set of field names to use when loading objects.Addsfieldto the set of fully-qualified field names to use when loading objects.Addsfieldsto the set of field names to use when loading objects.addFields(Class cls, Collection fields) Addsfieldsto the set of field names to use when loading objects.Addsfieldsto the set of fully-qualified field names to use when loading objects.addFields(Collection fields) Addsfieldsto the set of fully-qualified field names to use when loading objects.Clears the set of fetch group names to use wen loading data.Clears the set of field names to use wen loading data.Eager fetch mode in loading relations.Result set fetch direction.booleanAffirms if foreign key for a relation field will be pre-fetched as part of the owning object irrespective of whether the field is included in the default fetch group of this fetch configuration.The isolation level for queries issued to the database.SQL join syntax.intHow to determine the size of a large result set.Type of JDBC result set to use for query results.Eager fetch mode in loading subclasses.protected DelegatingFetchConfigurationCreate a new exception-translating delegating fetch configuration.removeFetchGroup(String group) Remove the given fetch group.removeFetchGroups(String... groups) Removesgroupsfrom the set of fetch group names to use when loading objects.removeFetchGroups(Collection groups) Removesgroupsfrom the set of fetch group names to use when loading objects.removeField(Class cls, String field) Remove the given field.removeField(String field) Remove the given fully-qualified field.removeFields(Class cls, String... fields) Removesfieldsfrom the set of field names to use when loading objects.removeFields(Class cls, Collection fields) Removesfieldsfrom the set of field names to use when loading objects.removeFields(String... fields) Removesfieldsfrom the set of fully-qualified field names to use when loading objects.removeFields(Collection fields) Removesfieldsfrom the set of fully-qualified field names to use when loading objects.Resets the set of fetch groups to the list in the global configuration.setEagerFetchMode(int mode) setEagerFetchMode(FetchMode mode) Eager fetch mode in loading relations.setFetchBatchSize(int fetchBatchSize) Set the fetch batch size for large result set support.setFetchDirection(int direction) setFetchDirection(FetchDirection direction) Result set fetch direction.voidsetIgnoreDfgForFkSelect(boolean b) Affirms if foreign key for a relation field will be pre-fetched as part of the owning object irrespective of whether the field is included in the default fetch group of this fetch configuration.setIsolation(IsolationLevel level) The isolation level for queries issued to the database.setJoinSyntax(int syntax) setJoinSyntax(JoinSyntax syntax) SQL join syntax.setLockTimeout(int timeout) The number of milliseconds to wait for an object lock, or -1 for no limit.setLRSSize(int lrsSizeMode) setLRSSizeAlgorithm(LRSSizeAlgorithm lrsSizeAlgorithm) How to determine the size of a large result set.setMaxFetchDepth(int depth) The maximum fetch depth when loading an object.setQueryResultCacheEnabled(boolean cache) Control whether or not query caching is enabled.setQueryTimeout(int timeout) The number of milliseconds to wait for a query, or -1 for no limit.setReadLockMode(jakarta.persistence.LockModeType mode) The lock level to use for locking loaded objects.setResultSetType(int mode) Type of JDBC result set to use for query results.setSubclassFetchMode(int mode) Eager fetch mode in loading subclasses.setWriteLockMode(jakarta.persistence.LockModeType mode) The lock level to use for locking dirtied objects.Methods inherited from class org.apache.openjpa.persistence.FetchPlanImpl
equals, getCacheRetrieveMode, getCacheStoreMode, getDelegate, getExtendedPathLookup, getFetchBatchSize, getFetchGroups, getFields, getHint, getHints, getLockScope, getLockTimeout, getMaxFetchDepth, getQueryResultCache, getQueryResultCacheEnabled, getQueryTimeout, getReadLockMode, getWriteLockMode, hasField, hasField, hashCode, registerHint, setCacheRetrieveMode, setCacheStoreMode, setExtendedPathLookup, setHint, setHints, setLockScope, setQueryResultCacheMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.openjpa.persistence.FetchPlan
getCacheRetrieveMode, getCacheStoreMode, getDelegate, getExtendedPathLookup, getFetchBatchSize, getFetchGroups, getFields, getHint, getHints, getLockScope, getLockTimeout, getMaxFetchDepth, getQueryResultCache, getQueryResultCacheEnabled, getQueryTimeout, getReadLockMode, getWriteLockMode, hasField, hasField, setCacheRetrieveMode, setCacheStoreMode, setExtendedPathLookup, setHint, setLockScope, setQueryResultCache
-
Constructor Details
-
JDBCFetchPlanImpl
Constructor; supply delegate.
-
-
Method Details
-
newDelegatingFetchConfiguration
Description copied from class:FetchPlanImplCreate a new exception-translating delegating fetch configuration.- Overrides:
newDelegatingFetchConfigurationin classFetchPlanImpl
-
getEagerFetchMode
Description copied from interface:JDBCFetchPlanEager fetch mode in loading relations.- Specified by:
getEagerFetchModein interfaceJDBCFetchPlan
-
setEagerFetchMode
Description copied from interface:JDBCFetchPlanEager fetch mode in loading relations.- Specified by:
setEagerFetchModein interfaceJDBCFetchPlan
-
setEagerFetchMode
- Specified by:
setEagerFetchModein interfaceJDBCFetchPlan
-
getSubclassFetchMode
Description copied from interface:JDBCFetchPlanEager fetch mode in loading subclasses.- Specified by:
getSubclassFetchModein interfaceJDBCFetchPlan
-
setSubclassFetchMode
Description copied from interface:JDBCFetchPlanEager fetch mode in loading subclasses.- Specified by:
setSubclassFetchModein interfaceJDBCFetchPlan
-
setSubclassFetchMode
- Specified by:
setSubclassFetchModein interfaceJDBCFetchPlan
-
getResultSetType
Description copied from interface:JDBCFetchPlanType of JDBC result set to use for query results.- Specified by:
getResultSetTypein interfaceJDBCFetchPlan
-
setResultSetType
Description copied from interface:JDBCFetchPlanType of JDBC result set to use for query results.- Specified by:
setResultSetTypein interfaceJDBCFetchPlan
-
setResultSetType
- Specified by:
setResultSetTypein interfaceJDBCFetchPlan
-
getFetchDirection
Description copied from interface:JDBCFetchPlanResult set fetch direction.- Specified by:
getFetchDirectionin interfaceJDBCFetchPlan
-
setFetchDirection
Description copied from interface:JDBCFetchPlanResult set fetch direction.- Specified by:
setFetchDirectionin interfaceJDBCFetchPlan
-
setFetchDirection
- Specified by:
setFetchDirectionin interfaceJDBCFetchPlan
-
getLRSSizeAlgorithm
Description copied from interface:JDBCFetchPlanHow to determine the size of a large result set.- Specified by:
getLRSSizeAlgorithmin interfaceJDBCFetchPlan
-
setLRSSizeAlgorithm
Description copied from interface:JDBCFetchPlanHow to determine the size of a large result set.- Specified by:
setLRSSizeAlgorithmin interfaceJDBCFetchPlan
-
getLRSSize
public int getLRSSize()- Specified by:
getLRSSizein interfaceJDBCFetchPlan
-
setLRSSize
- Specified by:
setLRSSizein interfaceJDBCFetchPlan
-
getJoinSyntax
Description copied from interface:JDBCFetchPlanSQL join syntax.- Specified by:
getJoinSyntaxin interfaceJDBCFetchPlan
-
setJoinSyntax
Description copied from interface:JDBCFetchPlanSQL join syntax.- Specified by:
setJoinSyntaxin interfaceJDBCFetchPlan
-
setJoinSyntax
- Specified by:
setJoinSyntaxin interfaceJDBCFetchPlan
-
getIsolation
Description copied from interface:JDBCFetchPlanThe isolation level for queries issued to the database. This overrides the persistence-unit-wideopenjpa.jdbc.TransactionIsolationvalue.- Specified by:
getIsolationin interfaceJDBCFetchPlan
-
setIsolation
Description copied from interface:JDBCFetchPlanThe isolation level for queries issued to the database. This overrides the persistence-unit-wideopenjpa.jdbc.TransactionIsolationvalue.- Specified by:
setIsolationin interfaceJDBCFetchPlan
-
addFetchGroup
Description copied from interface:FetchPlanAddsgroupto the set of fetch group to use when loading objects.- Specified by:
addFetchGroupin interfaceFetchPlan- Specified by:
addFetchGroupin interfaceJDBCFetchPlan- Overrides:
addFetchGroupin classFetchPlanImpl
-
addFetchGroups
Description copied from interface:FetchPlanAddsgroupsto the set of fetch group names to use when loading objects.- Specified by:
addFetchGroupsin interfaceFetchPlan- Specified by:
addFetchGroupsin interfaceJDBCFetchPlan- Overrides:
addFetchGroupsin classFetchPlanImpl
-
addFetchGroups
Description copied from interface:FetchPlanAddsgroupsto the set of fetch group names to use when loading objects.- Specified by:
addFetchGroupsin interfaceFetchPlan- Specified by:
addFetchGroupsin interfaceJDBCFetchPlan- Overrides:
addFetchGroupsin classFetchPlanImpl
-
addField
Description copied from interface:FetchPlanAddsfieldto the set of field names to use when loading objects.- Specified by:
addFieldin interfaceFetchPlan- Specified by:
addFieldin interfaceJDBCFetchPlan- Overrides:
addFieldin classFetchPlanImpl
-
addField
Description copied from interface:FetchPlanAddsfieldto the set of fully-qualified field names to use when loading objects.- Specified by:
addFieldin interfaceFetchPlan- Specified by:
addFieldin interfaceJDBCFetchPlan- Overrides:
addFieldin classFetchPlanImpl
-
addFields
Description copied from interface:FetchPlanAddsfieldsto the set of field names to use when loading objects.- Specified by:
addFieldsin interfaceFetchPlan- Specified by:
addFieldsin interfaceJDBCFetchPlan- Overrides:
addFieldsin classFetchPlanImpl
-
addFields
Description copied from interface:FetchPlanAddsfieldsto the set of field names to use when loading objects.- Specified by:
addFieldsin interfaceFetchPlan- Specified by:
addFieldsin interfaceJDBCFetchPlan- Overrides:
addFieldsin classFetchPlanImpl
-
addFields
Description copied from interface:FetchPlanAddsfieldsto the set of fully-qualified field names to use when loading objects.- Specified by:
addFieldsin interfaceFetchPlan- Specified by:
addFieldsin interfaceJDBCFetchPlan- Overrides:
addFieldsin classFetchPlanImpl
-
addFields
Description copied from interface:FetchPlanAddsfieldsto the set of fully-qualified field names to use when loading objects.- Specified by:
addFieldsin interfaceFetchPlan- Specified by:
addFieldsin interfaceJDBCFetchPlan- Overrides:
addFieldsin classFetchPlanImpl
-
clearFetchGroups
Description copied from interface:FetchPlanClears the set of fetch group names to use wen loading data. After this operation is invoked, only those fields in the default fetch group (and any requested field) will be loaded when loading an object.- Specified by:
clearFetchGroupsin interfaceFetchPlan- Specified by:
clearFetchGroupsin interfaceJDBCFetchPlan- Overrides:
clearFetchGroupsin classFetchPlanImpl
-
clearFields
Description copied from interface:FetchPlanClears the set of field names to use wen loading data. After this operation is invoked, only those fields in the configured fetch groups will be loaded when loading an object.- Specified by:
clearFieldsin interfaceFetchPlan- Specified by:
clearFieldsin interfaceJDBCFetchPlan- Overrides:
clearFieldsin classFetchPlanImpl
-
removeFetchGroup
Description copied from interface:FetchPlanRemove the given fetch group.- Specified by:
removeFetchGroupin interfaceFetchPlan- Specified by:
removeFetchGroupin interfaceJDBCFetchPlan- Overrides:
removeFetchGroupin classFetchPlanImpl
-
removeFetchGroups
Description copied from interface:FetchPlanRemovesgroupsfrom the set of fetch group names to use when loading objects.- Specified by:
removeFetchGroupsin interfaceFetchPlan- Specified by:
removeFetchGroupsin interfaceJDBCFetchPlan- Overrides:
removeFetchGroupsin classFetchPlanImpl
-
removeFetchGroups
Description copied from interface:FetchPlanRemovesgroupsfrom the set of fetch group names to use when loading objects.- Specified by:
removeFetchGroupsin interfaceFetchPlan- Specified by:
removeFetchGroupsin interfaceJDBCFetchPlan- Overrides:
removeFetchGroupsin classFetchPlanImpl
-
removeField
Description copied from interface:FetchPlanRemove the given field.- Specified by:
removeFieldin interfaceFetchPlan- Specified by:
removeFieldin interfaceJDBCFetchPlan- Overrides:
removeFieldin classFetchPlanImpl
-
removeField
Description copied from interface:FetchPlanRemove the given fully-qualified field.- Specified by:
removeFieldin interfaceFetchPlan- Specified by:
removeFieldin interfaceJDBCFetchPlan- Overrides:
removeFieldin classFetchPlanImpl
-
removeFields
Description copied from interface:FetchPlanRemovesfieldsfrom the set of field names to use when loading objects.- Specified by:
removeFieldsin interfaceFetchPlan- Specified by:
removeFieldsin interfaceJDBCFetchPlan- Overrides:
removeFieldsin classFetchPlanImpl
-
removeFields
Description copied from interface:FetchPlanRemovesfieldsfrom the set of field names to use when loading objects.- Specified by:
removeFieldsin interfaceFetchPlan- Specified by:
removeFieldsin interfaceJDBCFetchPlan- Overrides:
removeFieldsin classFetchPlanImpl
-
removeFields
Description copied from interface:FetchPlanRemovesfieldsfrom the set of fully-qualified field names to use when loading objects.- Specified by:
removeFieldsin interfaceFetchPlan- Specified by:
removeFieldsin interfaceJDBCFetchPlan- Overrides:
removeFieldsin classFetchPlanImpl
-
removeFields
Description copied from interface:FetchPlanRemovesfieldsfrom the set of fully-qualified field names to use when loading objects.- Specified by:
removeFieldsin interfaceFetchPlan- Specified by:
removeFieldsin interfaceJDBCFetchPlan- Overrides:
removeFieldsin classFetchPlanImpl
-
resetFetchGroups
Description copied from interface:FetchPlanResets the set of fetch groups to the list in the global configuration.- Specified by:
resetFetchGroupsin interfaceFetchPlan- Specified by:
resetFetchGroupsin interfaceJDBCFetchPlan- Overrides:
resetFetchGroupsin classFetchPlanImpl
-
setQueryResultCacheEnabled
Description copied from interface:FetchPlanControl whether or not query caching is enabled. This has no effect if the datacache plugin is not installed, or if the query cache size is set to zero.- Specified by:
setQueryResultCacheEnabledin interfaceFetchPlan- Specified by:
setQueryResultCacheEnabledin interfaceJDBCFetchPlan- Overrides:
setQueryResultCacheEnabledin classFetchPlanImpl
-
setFetchBatchSize
Description copied from interface:FetchPlanSet the fetch batch size for large result set support. Defaults to theopenjpa.FetchBatchSizesetting. Note that this property will be ignored under some data stores.- Specified by:
setFetchBatchSizein interfaceFetchPlan- Specified by:
setFetchBatchSizein interfaceJDBCFetchPlan- Overrides:
setFetchBatchSizein classFetchPlanImpl
-
setLockTimeout
Description copied from interface:FetchPlanThe number of milliseconds to wait for an object lock, or -1 for no limit.- Specified by:
setLockTimeoutin interfaceFetchPlan- Specified by:
setLockTimeoutin interfaceJDBCFetchPlan- Overrides:
setLockTimeoutin classFetchPlanImpl
-
setMaxFetchDepth
Description copied from interface:FetchPlanThe maximum fetch depth when loading an object.- Specified by:
setMaxFetchDepthin interfaceFetchPlan- Specified by:
setMaxFetchDepthin interfaceJDBCFetchPlan- Overrides:
setMaxFetchDepthin classFetchPlanImpl
-
setReadLockMode
Description copied from interface:FetchPlanThe lock level to use for locking loaded objects.- Specified by:
setReadLockModein interfaceFetchPlan- Specified by:
setReadLockModein interfaceJDBCFetchPlan- Overrides:
setReadLockModein classFetchPlanImpl
-
setWriteLockMode
Description copied from interface:FetchPlanThe lock level to use for locking dirtied objects.- Specified by:
setWriteLockModein interfaceFetchPlan- Specified by:
setWriteLockModein interfaceJDBCFetchPlan- Overrides:
setWriteLockModein classFetchPlanImpl
-
setQueryTimeout
Description copied from interface:FetchPlanThe number of milliseconds to wait for a query, or -1 for no limit.- Specified by:
setQueryTimeoutin interfaceFetchPlan- Specified by:
setQueryTimeoutin interfaceJDBCFetchPlan- Overrides:
setQueryTimeoutin classFetchPlanImpl
-
getIgnoreDfgForFkSelect
public boolean getIgnoreDfgForFkSelect()Description copied from interface:JDBCFetchPlanAffirms if foreign key for a relation field will be pre-fetched as part of the owning object irrespective of whether the field is included in the default fetch group of this fetch configuration.
By default, foreign key for a relation field is pre-fetched as part of the owning object only if the field in included in the default fetch group of this fetch configuration.- Specified by:
getIgnoreDfgForFkSelectin interfaceJDBCFetchPlan
-
setIgnoreDfgForFkSelect
public void setIgnoreDfgForFkSelect(boolean b) Description copied from interface:JDBCFetchPlanAffirms if foreign key for a relation field will be pre-fetched as part of the owning object irrespective of whether the field is included in the default fetch group of this fetch configuration.
By default, foreign key for a relation field is pre-fetched as part of the owning object only if the field in included in the default fetch group of this fetch configuration.- Specified by:
setIgnoreDfgForFkSelectin interfaceJDBCFetchPlan
-