Interface JDBCFetchConfiguration
-
- All Superinterfaces:
Cloneable,EagerFetchModes,FetchConfiguration,JoinSyntaxes,LockLevels,LockScopes,LRSSizes,QueryFlushModes,Serializable
- All Known Implementing Classes:
DelegatingJDBCFetchConfiguration,JDBCFetchConfigurationImpl,TargetFetchConfiguration
public interface JDBCFetchConfiguration extends FetchConfiguration, EagerFetchModes, LRSSizes, JoinSyntaxes
JDBC extensions to OpenJPA'sFetchConfiguration.- Since:
- 0.3.0
- Author:
- Abe White
-
-
Field Summary
-
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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JDBCFetchConfigurationaddFetchInnerJoin(String field)Addsfieldto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationaddFetchInnerJoins(Collection<String> fields)Addsfieldsto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationaddJoin(String field)Addsfieldto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationaddJoins(Collection<String> fields)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.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.JDBCFetchConfigurationremoveJoin(String field)Removesfieldto the set of fully-qualified field names to eagerly join when loading objects.JDBCFetchConfigurationremoveJoins(Collection<String> fields)Removesfieldsfrom the set of fully-qualified field names to eagerly join when loading objects.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 lrsSize)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 interface org.apache.openjpa.kernel.FetchConfiguration
addFetchGroup, addFetchGroups, addField, addFields, clearFetchGroups, clearFields, clone, copy, 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, newResultList, removeFetchGroup, removeFetchGroups, removeField, removeFields, requiresFetch, requiresLoad, resetFetchGroups, setCacheRetrieveMode, setCacheStoreMode, setContext, setExtendedPathLookup, setFetchBatchSize, setFlushBeforeQueries, setHint, setHint, setLockScope, setLockTimeout, setMaxFetchDepth, setQueryCacheEnabled, setQueryTimeout, setReadLockLevel, setRootClasses, setRootInstances, setWriteLockLevel, traverse, unlock
-
-
-
-
Method Detail
-
getEagerFetchMode
int getEagerFetchMode()
Return the eager fetch mode. Defaults to theopenjpa.jdbc.EagerFetchModesetting.
-
setEagerFetchMode
JDBCFetchConfiguration setEagerFetchMode(int mode)
Set the eager fetch mode. Defaults to theopenjpa.jdbc.EagerFetchModesetting.
-
getSubclassFetchMode
int getSubclassFetchMode()
Return the subclass fetch mode. Defaults to theopenjpa.jdbc.SubclassFetchModesetting.
-
getSubclassFetchMode
int getSubclassFetchMode(ClassMapping cls)
Return the effective subclass fetch mode for the given type.
-
setSubclassFetchMode
JDBCFetchConfiguration setSubclassFetchMode(int mode)
Set the subclass fetch mode. Defaults to theopenjpa.jdbc.SubclassFetchModesetting.
-
getResultSetType
int getResultSetType()
The result set type to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.ResultSetTypesetting.
-
setResultSetType
JDBCFetchConfiguration setResultSetType(int type)
The result set type to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.ResultSetTypesetting.
-
getFetchDirection
int getFetchDirection()
The fetch direction to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.FetchDirectionsetting.
-
setFetchDirection
JDBCFetchConfiguration setFetchDirection(int direction)
The fetch direction to use as a constant fromResultSet. Defaults to theopenjpa.jdbc.FetchDirectionsetting.
-
getLRSSize
int getLRSSize()
The large result set size mode to use. Defaults to theopenjpa.jdbc.LRSSizesetting.
-
setLRSSize
JDBCFetchConfiguration setLRSSize(int lrsSize)
The large result set size mode to use. Defaults to theopenjpa.jdbc.LRSSizesetting.
-
getJoinSyntax
int getJoinSyntax()
The join syntax to use.
-
setJoinSyntax
JDBCFetchConfiguration setJoinSyntax(int syntax)
The join syntax to use.
-
getJoins
Set<String> getJoins()
Returns the names of the joins that this component will use when loading objects. Defaults to the empty set. This set is not thread safe.- Since:
- 0.4.0.0
-
hasJoin
boolean hasJoin(String field)
Return true if the given fully-qualified join has been added.- Since:
- 0.4.0.0
-
addJoin
JDBCFetchConfiguration addJoin(String field)
Addsfieldto 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.- Since:
- 0.4.0.0
-
addJoins
JDBCFetchConfiguration addJoins(Collection<String> fields)
Addsfieldsto 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.- Since:
- 0.4.0.0
-
removeJoin
JDBCFetchConfiguration removeJoin(String field)
Removesfieldto the set of fully-qualified field names to eagerly join when loading objects.- Since:
- 0.4.0.0
-
removeJoins
JDBCFetchConfiguration removeJoins(Collection<String> fields)
Removesfieldsfrom the set of fully-qualified field names to eagerly join when loading objects.- Since:
- 0.4.0.0
-
clearJoins
JDBCFetchConfiguration clearJoins()
Clears the set of field names to join when loading data.- Since:
- 0.4.0.0
-
getIsolation
int getIsolation()
The 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.- Since:
- 0.9.7
-
setIsolation
JDBCFetchConfiguration setIsolation(int level)
The 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.- Since:
- 0.9.7
-
traverseJDBC
JDBCFetchConfiguration traverseJDBC(FieldMetaData fm)
Convenience method to cast traversal to store-specific type.
-
getFetchInnerJoins
Set<String> getFetchInnerJoins()
Returns 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.- Since:
- 1.0.3
-
hasFetchInnerJoin
boolean hasFetchInnerJoin(String field)
Return true if the given fully-qualified inner fetch join has been added.- Since:
- 1.0.3
-
addFetchInnerJoin
JDBCFetchConfiguration addFetchInnerJoin(String field)
Addsfieldto 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.- Since:
- 1.0.3
-
addFetchInnerJoins
JDBCFetchConfiguration addFetchInnerJoins(Collection<String> fields)
Addsfieldsto 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.- Since:
- 1.0.3
-
getIgnoreDfgForFkSelect
boolean getIgnoreDfgForFkSelect()
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.
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.- Since:
- 2.2.0
-
setIgnoreDfgForFkSelect
void setIgnoreDfgForFkSelect(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.
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.- Since:
- 2.2.0
-
-