Class JDBCFetchConfigurationImpl
- java.lang.Object
 - 
- org.apache.openjpa.kernel.FetchConfigurationImpl
 - 
- org.apache.openjpa.jdbc.kernel.JDBCFetchConfigurationImpl
 
 
 
- 
- All Implemented Interfaces:
 Serializable,Cloneable,EagerFetchModes,JDBCFetchConfiguration,LRSSizes,JoinSyntaxes,FetchConfiguration,LockLevels,LockScopes,QueryFlushModes
- Direct Known Subclasses:
 TargetFetchConfiguration
public class JDBCFetchConfigurationImpl extends FetchConfigurationImpl implements JDBCFetchConfiguration
JDBC extensions to OpenJPA'sFetchConfiguration.- Author:
 - Abe White
 - See Also:
 - Serialized Form
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classJDBCFetchConfigurationImpl.JDBCConfigurationStateConfigurable JDBC state shared throughout a traversal chain.- 
Nested classes/interfaces inherited from class org.apache.openjpa.kernel.FetchConfigurationImpl
FetchConfigurationImpl.ConfigurationState 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description protected JDBCFetchConfigurationImpl.JDBCConfigurationState_state- 
Fields inherited from interface org.apache.openjpa.jdbc.kernel.EagerFetchModes
EAGER_JOIN, EAGER_NONE, EAGER_PARALLEL 
- 
Fields inherited from interface org.apache.openjpa.kernel.FetchConfiguration
DEFAULT, FETCH_LOAD, FETCH_NONE, FETCH_REF 
- 
Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes
SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL 
- 
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.jdbc.kernel.LRSSizes
SIZE_LAST, SIZE_QUERY, SIZE_UNKNOWN 
- 
Fields inherited from interface org.apache.openjpa.kernel.QueryFlushModes
FLUSH_FALSE, FLUSH_TRUE, FLUSH_WITH_CONNECTION 
 - 
 
- 
Constructor Summary
Constructors Modifier Constructor Description JDBCFetchConfigurationImpl()protectedJDBCFetchConfigurationImpl(FetchConfigurationImpl.ConfigurationState state, JDBCFetchConfigurationImpl.JDBCConfigurationState jstate) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JDBCFetchConfigurationaddFetchInnerJoin(String join)Addsfieldto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationaddFetchInnerJoins(Collection<String> joins)Addsfieldsto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationaddJoin(String join)Addsfieldto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationaddJoins(Collection<String> joins)Addsfieldsto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationclearJoins()Clears the set of field names to join when loading data.voidcopy(FetchConfiguration fetch)Copy the state from the given fetch configuration to this one.intgetEagerFetchMode()Return the eager fetch mode.intgetFetchDirection()The fetch direction to use as a constant fromResultSet.Set<String>getFetchInnerJoins()Returns the names of the inner fetch joins that this component will use when loading objects.booleangetIgnoreDfgForFkSelect()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.intgetIsolation()The isolation level for queries issued to the database.Set<String>getJoins()Returns the names of the joins that this component will use when loading objects.intgetJoinSyntax()The join syntax to use.intgetLRSSize()The large result set size mode to use.intgetResultSetType()The result set type to use as a constant fromResultSet.intgetSubclassFetchMode()Return the subclass fetch mode.intgetSubclassFetchMode(ClassMapping cls)Return the effective subclass fetch mode for the given type.booleanhasFetchInnerJoin(String field)Return true if the given fully-qualified inner fetch join has been added.booleanhasJoin(String field)Return true if the given fully-qualified join has been added.protected FetchConfigurationImplnewInstance(FetchConfigurationImpl.ConfigurationState state)Return a new hollow instance.ResultList<?>newResultList(ResultObjectProvider rop)Return a new result list for the current fetch configuration.JDBCFetchConfigurationremoveJoin(String field)Removesfieldto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationremoveJoins(Collection<String> joins)Removesfieldsfrom the set of fully-qualified field names to eagerly join when loading objects.voidsetContext(StoreContext ctx)Called automatically by the system to associate the fetch configuration with a context before use.JDBCFetchConfigurationsetEagerFetchMode(int mode)Set the eager fetch mode.JDBCFetchConfigurationsetFetchDirection(int direction)The fetch direction to use as a constant fromResultSet.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.JDBCFetchConfigurationsetIsolation(int level)The isolation level for queries issued to the database.JDBCFetchConfigurationsetJoinSyntax(int syntax)The join syntax to use.JDBCFetchConfigurationsetLRSSize(int size)The large result set size mode to use.JDBCFetchConfigurationsetResultSetType(int type)The result set type to use as a constant fromResultSet.JDBCFetchConfigurationsetSubclassFetchMode(int mode)Set the subclass fetch mode.JDBCFetchConfigurationtraverseJDBC(FieldMetaData fm)Convenience method to cast traversal to store-specific type.- 
Methods inherited from class org.apache.openjpa.kernel.FetchConfigurationImpl
addFetchGroup, addFetchGroups, addField, addFields, clearFetchGroups, clearFields, clone, getCacheRetrieveMode, getCacheStoreMode, getContext, getExtendedPathLookup, getFetchBatchSize, getFetchGroups, getFields, getFlushBeforeQueries, getHint, getHints, getLockScope, getLockTimeout, getMaxFetchDepth, getQueryCacheEnabled, getQueryTimeout, getReadLockLevel, getRootClasses, getRootInstances, getSupportedHints, getWriteLockLevel, hasFetchGroup, hasFetchGroupAll, hasFetchGroupDefault, hasField, isDefaultPUFetchGroupConfigurationOnly, isFetchConfigurationSQLCacheAdmissible, isHintSet, lock, populateHintSetter, populateHintSetter, removeFetchGroup, removeFetchGroups, removeField, removeFields, removeHint, removeHint, requiresFetch, requiresLoad, resetFetchGroups, setCacheRetrieveMode, setCacheStoreMode, setExtendedPathLookup, setFetchBatchSize, setFlushBeforeQueries, setHint, setHint, setLockScope, setLockTimeout, setMaxFetchDepth, setQueryCacheEnabled, setQueryTimeout, setReadLockLevel, setRootClasses, setRootInstances, setWriteLockLevel, toString, toString, traverse, unlock 
- 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.apache.openjpa.kernel.FetchConfiguration
addFetchGroup, addFetchGroups, addField, addFields, clearFetchGroups, clearFields, clone, getCacheRetrieveMode, getCacheStoreMode, getContext, getExtendedPathLookup, getFetchBatchSize, getFetchGroups, getFields, getFlushBeforeQueries, getHint, getHints, getLockScope, getLockTimeout, getMaxFetchDepth, getQueryCacheEnabled, getQueryTimeout, getReadLockLevel, getRootClasses, getRootInstances, getWriteLockLevel, hasFetchGroup, hasField, isDefaultPUFetchGroupConfigurationOnly, isFetchConfigurationSQLCacheAdmissible, isHintSet, lock, removeFetchGroup, removeFetchGroups, removeField, removeFields, requiresFetch, requiresLoad, resetFetchGroups, setCacheRetrieveMode, setCacheStoreMode, setExtendedPathLookup, setFetchBatchSize, setFlushBeforeQueries, setHint, setHint, setLockScope, setLockTimeout, setMaxFetchDepth, setQueryCacheEnabled, setQueryTimeout, setReadLockLevel, setRootClasses, setRootInstances, setWriteLockLevel, traverse, unlock 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_state
protected final JDBCFetchConfigurationImpl.JDBCConfigurationState _state
 
 - 
 
- 
Constructor Detail
- 
JDBCFetchConfigurationImpl
public JDBCFetchConfigurationImpl()
 
- 
JDBCFetchConfigurationImpl
protected JDBCFetchConfigurationImpl(FetchConfigurationImpl.ConfigurationState state, JDBCFetchConfigurationImpl.JDBCConfigurationState jstate)
 
 - 
 
- 
Method Detail
- 
newInstance
protected FetchConfigurationImpl newInstance(FetchConfigurationImpl.ConfigurationState state)
Description copied from class:FetchConfigurationImplReturn a new hollow instance.- Overrides:
 newInstancein classFetchConfigurationImpl
 
- 
setContext
public void setContext(StoreContext ctx)
Description copied from interface:FetchConfigurationCalled automatically by the system to associate the fetch configuration with a context before use. The fetch configuration properties should be synchronized with the context's configuration object. Subclasses for specific back ends cannot rely on the context's configuration implementing their back end's configuration sub-interface.- Specified by:
 setContextin interfaceFetchConfiguration- Overrides:
 setContextin classFetchConfigurationImpl
 
- 
copy
public void copy(FetchConfiguration fetch)
Description copied from interface:FetchConfigurationCopy the state from the given fetch configuration to this one.- Specified by:
 copyin interfaceFetchConfiguration- Overrides:
 copyin classFetchConfigurationImpl
 
- 
getIgnoreDfgForFkSelect
public boolean getIgnoreDfgForFkSelect()
Description copied from interface:JDBCFetchConfigurationAffirms 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 interfaceJDBCFetchConfiguration
 
- 
setIgnoreDfgForFkSelect
public void setIgnoreDfgForFkSelect(boolean b)
Description copied from interface:JDBCFetchConfigurationAffirms 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 interfaceJDBCFetchConfiguration
 
- 
getEagerFetchMode
public int getEagerFetchMode()
Description copied from interface:JDBCFetchConfigurationReturn the eager fetch mode. Defaults to theopenjpa.jdbc.EagerFetchModesetting.- Specified by:
 getEagerFetchModein interfaceJDBCFetchConfiguration
 
- 
setEagerFetchMode
public JDBCFetchConfiguration setEagerFetchMode(int mode)
Description copied from interface:JDBCFetchConfigurationSet the eager fetch mode. Defaults to theopenjpa.jdbc.EagerFetchModesetting.- Specified by:
 setEagerFetchModein interfaceJDBCFetchConfiguration
 
- 
getSubclassFetchMode
public int getSubclassFetchMode()
Description copied from interface:JDBCFetchConfigurationReturn the subclass fetch mode. Defaults to theopenjpa.jdbc.SubclassFetchModesetting.- Specified by:
 getSubclassFetchModein interfaceJDBCFetchConfiguration
 
- 
getSubclassFetchMode
public int getSubclassFetchMode(ClassMapping cls)
Description copied from interface:JDBCFetchConfigurationReturn the effective subclass fetch mode for the given type.- Specified by:
 getSubclassFetchModein interfaceJDBCFetchConfiguration
 
- 
setSubclassFetchMode
public JDBCFetchConfiguration setSubclassFetchMode(int mode)
Description copied from interface:JDBCFetchConfigurationSet the subclass fetch mode. Defaults to theopenjpa.jdbc.SubclassFetchModesetting.- Specified by:
 setSubclassFetchModein interfaceJDBCFetchConfiguration
 
- 
getResultSetType
public int getResultSetType()
Description copied from interface:JDBCFetchConfigurationThe result set type to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.ResultSetTypesetting.- Specified by:
 getResultSetTypein interfaceJDBCFetchConfiguration
 
- 
setResultSetType
public JDBCFetchConfiguration setResultSetType(int type)
Description copied from interface:JDBCFetchConfigurationThe result set type to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.ResultSetTypesetting.- Specified by:
 setResultSetTypein interfaceJDBCFetchConfiguration
 
- 
getFetchDirection
public int getFetchDirection()
Description copied from interface:JDBCFetchConfigurationThe fetch direction to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.FetchDirectionsetting.- Specified by:
 getFetchDirectionin interfaceJDBCFetchConfiguration
 
- 
setFetchDirection
public JDBCFetchConfiguration setFetchDirection(int direction)
Description copied from interface:JDBCFetchConfigurationThe fetch direction to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.FetchDirectionsetting.- Specified by:
 setFetchDirectionin interfaceJDBCFetchConfiguration
 
- 
getLRSSize
public int getLRSSize()
Description copied from interface:JDBCFetchConfigurationThe large result set size mode to use. Defaults to theopenjpa.jdbc.LRSSizesetting.- Specified by:
 getLRSSizein interfaceJDBCFetchConfiguration
 
- 
setLRSSize
public JDBCFetchConfiguration setLRSSize(int size)
Description copied from interface:JDBCFetchConfigurationThe large result set size mode to use. Defaults to theopenjpa.jdbc.LRSSizesetting.- Specified by:
 setLRSSizein interfaceJDBCFetchConfiguration
 
- 
getJoinSyntax
public int getJoinSyntax()
Description copied from interface:JDBCFetchConfigurationThe join syntax to use.- Specified by:
 getJoinSyntaxin interfaceJDBCFetchConfiguration
 
- 
setJoinSyntax
public JDBCFetchConfiguration setJoinSyntax(int syntax)
Description copied from interface:JDBCFetchConfigurationThe join syntax to use.- Specified by:
 setJoinSyntaxin interfaceJDBCFetchConfiguration
 
- 
newResultList
public ResultList<?> newResultList(ResultObjectProvider rop)
Description copied from interface:FetchConfigurationReturn a new result list for the current fetch configuration.- Specified by:
 newResultListin interfaceFetchConfiguration- Overrides:
 newResultListin classFetchConfigurationImpl
 
- 
getJoins
public Set<String> getJoins()
Description copied from interface:JDBCFetchConfigurationReturns the names of the joins that this component will use when loading objects. Defaults to the empty set. This set is not thread safe.- Specified by:
 getJoinsin interfaceJDBCFetchConfiguration
 
- 
hasJoin
public boolean hasJoin(String field)
Description copied from interface:JDBCFetchConfigurationReturn true if the given fully-qualified join has been added.- Specified by:
 hasJoinin interfaceJDBCFetchConfiguration
 
- 
addJoin
public JDBCFetchConfiguration addJoin(String join)
Description copied from interface:JDBCFetchConfigurationAddsfieldto the set of fully-qualified field names to eagerly join when loading objects. Each class can have at most one to-many eagerly joined fields.- Specified by:
 addJoinin interfaceJDBCFetchConfiguration
 
- 
addJoins
public JDBCFetchConfiguration addJoins(Collection<String> joins)
Description copied from interface:JDBCFetchConfigurationAddsfieldsto the set of fully-qualified field names to eagerly join when loading objects. Each class can have at most one to-many eagerly joined fields.- Specified by:
 addJoinsin interfaceJDBCFetchConfiguration
 
- 
removeJoin
public JDBCFetchConfiguration removeJoin(String field)
Description copied from interface:JDBCFetchConfigurationRemovesfieldto the set of fully-qualified field names to eagerly join when loading objects.- Specified by:
 removeJoinin interfaceJDBCFetchConfiguration
 
- 
removeJoins
public JDBCFetchConfiguration removeJoins(Collection<String> joins)
Description copied from interface:JDBCFetchConfigurationRemovesfieldsfrom the set of fully-qualified field names to eagerly join when loading objects.- Specified by:
 removeJoinsin interfaceJDBCFetchConfiguration
 
- 
clearJoins
public JDBCFetchConfiguration clearJoins()
Description copied from interface:JDBCFetchConfigurationClears the set of field names to join when loading data.- Specified by:
 clearJoinsin interfaceJDBCFetchConfiguration
 
- 
getIsolation
public int getIsolation()
Description copied from interface:JDBCFetchConfigurationThe isolation level for queries issued to the database. This overrides the persistence-unit-wide
openjpa.jdbc.TransactionIsolationvalue.Must be one of
Connection.TRANSACTION_NONE,Connection.TRANSACTION_READ_UNCOMMITTED,Connection.TRANSACTION_READ_COMMITTED,Connection.TRANSACTION_REPEATABLE_READ,Connection.TRANSACTION_SERIALIZABLE, or -1 for the default connection level specified by the context in which this fetch configuration is being used.- Specified by:
 getIsolationin interfaceJDBCFetchConfiguration
 
- 
setIsolation
public JDBCFetchConfiguration setIsolation(int level)
Description copied from interface:JDBCFetchConfigurationThe isolation level for queries issued to the database. This overrides the persistence-unit-wide
openjpa.jdbc.TransactionIsolationvalue.Must be one of
Connection.TRANSACTION_NONE,Connection.TRANSACTION_READ_UNCOMMITTED,Connection.TRANSACTION_READ_COMMITTED,Connection.TRANSACTION_REPEATABLE_READ,Connection.TRANSACTION_SERIALIZABLE, or -1 for the default connection level specified by the context in which this fetch configuration is being used.- Specified by:
 setIsolationin interfaceJDBCFetchConfiguration
 
- 
traverseJDBC
public JDBCFetchConfiguration traverseJDBC(FieldMetaData fm)
Description copied from interface:JDBCFetchConfigurationConvenience method to cast traversal to store-specific type.- Specified by:
 traverseJDBCin interfaceJDBCFetchConfiguration
 
- 
getFetchInnerJoins
public Set<String> getFetchInnerJoins()
Description copied from interface:JDBCFetchConfigurationReturns the names of the inner fetch joins that this component will use when loading objects. Defaults to the empty set. This set is not thread safe.- Specified by:
 getFetchInnerJoinsin interfaceJDBCFetchConfiguration
 
- 
hasFetchInnerJoin
public boolean hasFetchInnerJoin(String field)
Description copied from interface:JDBCFetchConfigurationReturn true if the given fully-qualified inner fetch join has been added.- Specified by:
 hasFetchInnerJoinin interfaceJDBCFetchConfiguration
 
- 
addFetchInnerJoin
public JDBCFetchConfiguration addFetchInnerJoin(String join)
Description copied from interface:JDBCFetchConfigurationAddsfieldto the set of fully-qualified field names to eagerly join when loading objects. Each class can have at most one to-many eagerly joined fields.- Specified by:
 addFetchInnerJoinin interfaceJDBCFetchConfiguration
 
- 
addFetchInnerJoins
public JDBCFetchConfiguration addFetchInnerJoins(Collection<String> joins)
Description copied from interface:JDBCFetchConfigurationAddsfieldsto the set of fully-qualified field names to eagerly join when loading objects. Each class can have at most one to-many eagerly joined fields.- Specified by:
 addFetchInnerJoinsin interfaceJDBCFetchConfiguration
 
 - 
 
 -