Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.jdbc.kernel
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's `FetchConfiguration`.

Author:
  Abe White
See Also:
  Serialized Form

Nested Class Summary
`protected static class` | `JDBCFetchConfigurationImpl.JDBCConfigurationState` Configurable JDBC state shared throughout a traversal chain.

Nested classes/interfaces inherited from class org.apache.openjpa.kernel.FetchConfigurationImpl
`FetchConfigurationImpl.ConfigurationState`

Field Summary
`protected JDBCFetchConfigurationImpl.JDBCConfigurationState` | `_state`

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`

Fields inherited from interface org.apache.openjpa.jdbc.kernel.EagerFetchModes
`EAGER_JOIN, EAGER_NONE, EAGER_PARALLEL`

Fields inherited from interface org.apache.openjpa.jdbc.kernel.LRSSizes
`SIZE_LAST, SIZE_QUERY, SIZE_UNKNOWN`

Fields inherited from interface org.apache.openjpa.jdbc.sql.JoinSyntaxes
`SYNTAX_DATABASE, SYNTAX_SQL92, SYNTAX_TRADITIONAL`

Constructor Summary
`` | `JDBCFetchConfigurationImpl()`
`protected` | `JDBCFetchConfigurationImpl(FetchConfigurationImpl.ConfigurationState state, JDBCFetchConfigurationImpl.JDBCConfigurationState jstate)`

Method Summary
`JDBCFetchConfiguration` | `addFetchInnerJoin(String join)` Adds `field` to the set of fully-qualified field names to eagerly join when loading objects.
`JDBCFetchConfiguration` | `addFetchInnerJoins(Collection<String> joins)` Adds `fields` to the set of fully-qualified field names to eagerly join when loading objects.
`JDBCFetchConfiguration` | `addJoin(String join)` Adds `field` to the set of fully-qualified field names to eagerly join when loading objects.
`JDBCFetchConfiguration` | `addJoins(Collection<String> joins)` Adds `fields` to the set of fully-qualified field names to eagerly join when loading objects.
`JDBCFetchConfiguration` | `clearJoins()` Clears the set of field names to join when loading data.
`void` | `copy(FetchConfiguration fetch)` Copy the state from the given fetch configuration to this one.
`int` | `getEagerFetchMode()` Return the eager fetch mode.
`int` | `getFetchDirection()` The fetch direction to use as a constant from `ResultSet`.
`Set<String>` | `getFetchInnerJoins()` Returns the names of the inner fetch joins that this component will use when loading objects.
`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.
`int` | `getIsolation()` 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.
`int` | `getJoinSyntax()` The join syntax to use.
`int` | `getLRSSize()` The large result set size mode to use.
`int` | `getResultSetType()` The result set type to use as a constant from `ResultSet`.
`int` | `getSubclassFetchMode()` Return the subclass fetch mode.
`int` | `getSubclassFetchMode(ClassMapping cls)` Return the effective subclass fetch mode for the given type.
`boolean` | `hasFetchInnerJoin(String field)` Return true if the given fully-qualified inner fetch join has been added.
`boolean` | `hasJoin(String field)` Return true if the given fully-qualified join has been added.
`protected FetchConfigurationImpl` | `newInstance(FetchConfigurationImpl.ConfigurationState state)` Return a new hollow instance.
`ResultList<?>` | `newResultList(ResultObjectProvider rop)` Return a new result list for the current fetch configuration.
`JDBCFetchConfiguration` | `removeJoin(String field)` Removes `field` to the set of fully-qualified field names to eagerly join when loading objects.
`JDBCFetchConfiguration` | `removeJoins(Collection<String> joins)` Removes `fields` from the set of fully-qualified field names to eagerly join when loading objects.
`void` | `setContext(StoreContext ctx)` Called automatically by the system to associate the fetch configuration with a context before use.
`JDBCFetchConfiguration` | `setEagerFetchMode(int mode)` Set the eager fetch mode.
`JDBCFetchConfiguration` | `setFetchDirection(int direction)` The fetch direction to use as a constant from `ResultSet`.
`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.
`JDBCFetchConfiguration` | `setIsolation(int level)` The isolation level for queries issued to the database.
`JDBCFetchConfiguration` | `setJoinSyntax(int syntax)` The join syntax to use.
`JDBCFetchConfiguration` | `setLRSSize(int size)` The large result set size mode to use.
`JDBCFetchConfiguration` | `setResultSetType(int type)` The result set type to use as a constant from `ResultSet`.
`JDBCFetchConfiguration` | `setSubclassFetchMode(int mode)` Set the subclass fetch mode.
`JDBCFetchConfiguration` | `traverseJDBC(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, 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, 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: `FetchConfigurationImpl`
  Return a new hollow instance.

  Overrides:
    `newInstance` in class `FetchConfigurationImpl`

### setContext

    public void setContext(StoreContext ctx)

  Description copied from interface: `FetchConfiguration`
  Called 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:
    `setContext` in interface `FetchConfiguration`
  Overrides:
    `setContext` in class `FetchConfigurationImpl`

### copy

    public void copy(FetchConfiguration fetch)

  Description copied from interface: `FetchConfiguration`
  Copy the state from the given fetch configuration to this one.

  Specified by:
    `copy` in interface `FetchConfiguration`
  Overrides:
    `copy` in class `FetchConfigurationImpl`

### getIgnoreDfgForFkSelect

    public boolean getIgnoreDfgForFkSelect()

  Description copied from interface: `JDBCFetchConfiguration`
  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.

  Specified by:
    `getIgnoreDfgForFkSelect` in interface `JDBCFetchConfiguration`

### setIgnoreDfgForFkSelect

    public void setIgnoreDfgForFkSelect(boolean b)

  Description copied from interface: `JDBCFetchConfiguration`
  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.

  Specified by:
    `setIgnoreDfgForFkSelect` in interface `JDBCFetchConfiguration`

### getEagerFetchMode

    public int getEagerFetchMode()

  Description copied from interface: `JDBCFetchConfiguration`
  Return the eager fetch mode. Defaults to the `openjpa.jdbc.EagerFetchMode` setting.

  Specified by:
    `getEagerFetchMode` in interface `JDBCFetchConfiguration`

### setEagerFetchMode

    public JDBCFetchConfiguration setEagerFetchMode(int mode)

  Description copied from interface: `JDBCFetchConfiguration`
  Set the eager fetch mode. Defaults to the `openjpa.jdbc.EagerFetchMode` setting.

  Specified by:
    `setEagerFetchMode` in interface `JDBCFetchConfiguration`

### getSubclassFetchMode

    public int getSubclassFetchMode()

  Description copied from interface: `JDBCFetchConfiguration`
  Return the subclass fetch mode. Defaults to the `openjpa.jdbc.SubclassFetchMode` setting.

  Specified by:
    `getSubclassFetchMode` in interface `JDBCFetchConfiguration`

### getSubclassFetchMode

    public int getSubclassFetchMode(ClassMapping cls)

  Description copied from interface: `JDBCFetchConfiguration`
  Return the effective subclass fetch mode for the given type.

  Specified by:
    `getSubclassFetchMode` in interface `JDBCFetchConfiguration`

### setSubclassFetchMode

    public JDBCFetchConfiguration setSubclassFetchMode(int mode)

  Description copied from interface: `JDBCFetchConfiguration`
  Set the subclass fetch mode. Defaults to the `openjpa.jdbc.SubclassFetchMode` setting.

  Specified by:
    `setSubclassFetchMode` in interface `JDBCFetchConfiguration`

### getResultSetType

    public int getResultSetType()

  Description copied from interface: `JDBCFetchConfiguration`
  The result set type to use as a constant from `ResultSet`. Defaults to the `openjpa.jdbc.ResultSetType` setting.

  Specified by:
    `getResultSetType` in interface `JDBCFetchConfiguration`

### setResultSetType

    public JDBCFetchConfiguration setResultSetType(int type)

  Description copied from interface: `JDBCFetchConfiguration`
  The result set type to use as a constant from `ResultSet`. Defaults to the `openjpa.jdbc.ResultSetType` setting.

  Specified by:
    `setResultSetType` in interface `JDBCFetchConfiguration`

### getFetchDirection

    public int getFetchDirection()

  Description copied from interface: `JDBCFetchConfiguration`
  The fetch direction to use as a constant from `ResultSet`. Defaults to the `openjpa.jdbc.FetchDirection` setting.

  Specified by:
    `getFetchDirection` in interface `JDBCFetchConfiguration`

### setFetchDirection

    public JDBCFetchConfiguration setFetchDirection(int direction)

  Description copied from interface: `JDBCFetchConfiguration`
  The fetch direction to use as a constant from `ResultSet`. Defaults to the `openjpa.jdbc.FetchDirection` setting.

  Specified by:
    `setFetchDirection` in interface `JDBCFetchConfiguration`

### getLRSSize

    public int getLRSSize()

  Description copied from interface: `JDBCFetchConfiguration`
  The large result set size mode to use. Defaults to the `openjpa.jdbc.LRSSize` setting.

  Specified by:
    `getLRSSize` in interface `JDBCFetchConfiguration`

### setLRSSize

    public JDBCFetchConfiguration setLRSSize(int size)

  Description copied from interface: `JDBCFetchConfiguration`
  The large result set size mode to use. Defaults to the `openjpa.jdbc.LRSSize` setting.

  Specified by:
    `setLRSSize` in interface `JDBCFetchConfiguration`

### getJoinSyntax

    public int getJoinSyntax()

  Description copied from interface: `JDBCFetchConfiguration`
  The join syntax to use.

  Specified by:
    `getJoinSyntax` in interface `JDBCFetchConfiguration`

### setJoinSyntax

    public JDBCFetchConfiguration setJoinSyntax(int syntax)

  Description copied from interface: `JDBCFetchConfiguration`
  The join syntax to use.

  Specified by:
    `setJoinSyntax` in interface `JDBCFetchConfiguration`

### newResultList

    public ResultList<?> newResultList(ResultObjectProvider rop)

  Description copied from interface: `FetchConfiguration`
  Return a new result list for the current fetch configuration.

  Specified by:
    `newResultList` in interface `FetchConfiguration`
  Overrides:
    `newResultList` in class `FetchConfigurationImpl`

### getJoins

    public Set<String> getJoins()

  Description copied from interface: `JDBCFetchConfiguration`
  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.

  Specified by:
    `getJoins` in interface `JDBCFetchConfiguration`

### hasJoin

    public boolean hasJoin(String field)

  Description copied from interface: `JDBCFetchConfiguration`
  Return true if the given fully-qualified join has been added.

  Specified by:
    `hasJoin` in interface `JDBCFetchConfiguration`

### addJoin

    public JDBCFetchConfiguration addJoin(String join)

  Description copied from interface: `JDBCFetchConfiguration`
  Adds `field` to 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:
    `addJoin` in interface `JDBCFetchConfiguration`

### addJoins

    public JDBCFetchConfiguration addJoins(Collection<String> joins)

  Description copied from interface: `JDBCFetchConfiguration`
  Adds `fields` to 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:
    `addJoins` in interface `JDBCFetchConfiguration`

### removeJoin

    public JDBCFetchConfiguration removeJoin(String field)

  Description copied from interface: `JDBCFetchConfiguration`
  Removes `field` to the set of fully-qualified field names to eagerly join when loading objects.

  Specified by:
    `removeJoin` in interface `JDBCFetchConfiguration`

### removeJoins

    public JDBCFetchConfiguration removeJoins(Collection<String> joins)

  Description copied from interface: `JDBCFetchConfiguration`
  Removes `fields` from the set of fully-qualified field names to eagerly join when loading objects.

  Specified by:
    `removeJoins` in interface `JDBCFetchConfiguration`

### clearJoins

    public JDBCFetchConfiguration clearJoins()

  Description copied from interface: `JDBCFetchConfiguration`
  Clears the set of field names to join when loading data.

  Specified by:
    `clearJoins` in interface `JDBCFetchConfiguration`

### getIsolation

    public int getIsolation()

  Description copied from interface: `JDBCFetchConfiguration`

  The isolation level for queries issued to the database. This overrides the persistence-unit-wide `openjpa.jdbc.TransactionIsolation` value.

  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:
    `getIsolation` in interface `JDBCFetchConfiguration`

### setIsolation

    public JDBCFetchConfiguration setIsolation(int level)

  Description copied from interface: `JDBCFetchConfiguration`

  The isolation level for queries issued to the database. This overrides the persistence-unit-wide `openjpa.jdbc.TransactionIsolation` value.

  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:
    `setIsolation` in interface `JDBCFetchConfiguration`

### traverseJDBC

    public JDBCFetchConfiguration traverseJDBC(FieldMetaData fm)

  Description copied from interface: `JDBCFetchConfiguration`
  Convenience method to cast traversal to store-specific type.

  Specified by:
    `traverseJDBC` in interface `JDBCFetchConfiguration`

### getFetchInnerJoins

    public Set<String> getFetchInnerJoins()

  Description copied from interface: `JDBCFetchConfiguration`
  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.

  Specified by:
    `getFetchInnerJoins` in interface `JDBCFetchConfiguration`

### hasFetchInnerJoin

    public boolean hasFetchInnerJoin(String field)

  Description copied from interface: `JDBCFetchConfiguration`
  Return true if the given fully-qualified inner fetch join has been added.

  Specified by:
    `hasFetchInnerJoin` in interface `JDBCFetchConfiguration`

### addFetchInnerJoin

    public JDBCFetchConfiguration addFetchInnerJoin(String join)

  Description copied from interface: `JDBCFetchConfiguration`
  Adds `field` to 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:
    `addFetchInnerJoin` in interface `JDBCFetchConfiguration`

### addFetchInnerJoins

    public JDBCFetchConfiguration addFetchInnerJoins(Collection<String> joins)

  Description copied from interface: `JDBCFetchConfiguration`
  Adds `fields` to 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:
    `addFetchInnerJoins` in interface `JDBCFetchConfiguration`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.