org.apache.openjpa.persistence.jdbc
Class JDBCFetchPlanImpl

java.lang.Object
  extended by org.apache.openjpa.persistence.FetchPlanImpl
      extended by org.apache.openjpa.persistence.jdbc.JDBCFetchPlanImpl
All Implemented Interfaces:
FetchPlan, JDBCFetchPlan

public class JDBCFetchPlanImpl
extends FetchPlanImpl
implements JDBCFetchPlan

JDBC extensions to the fetch plan.

Since:
0.4.0
Author:
Abe White

Field Summary
 
Fields inherited from interface org.apache.openjpa.persistence.FetchPlan
DEFAULT, DEPTH_INFINITE, GROUP_ALL, GROUP_DEFAULT
 
Constructor Summary
JDBCFetchPlanImpl(FetchConfiguration fetch)
          Constructor; supply delegate.
 
Method Summary
 JDBCFetchPlan addFetchGroup(String group)
          Adds group to the set of fetch group to use when loading objects.
 JDBCFetchPlan addFetchGroups(Collection groups)
          Adds groups to the set of fetch group names to use when loading objects.
 JDBCFetchPlan addFetchGroups(String... groups)
          Adds groups to the set of fetch group names to use when loading objects.
 JDBCFetchPlan addField(Class cls, String field)
          Adds field to the set of field names to use when loading objects.
 JDBCFetchPlan addField(String field)
          Adds field to the set of fully-qualified field names to use when loading objects.
 JDBCFetchPlan addFields(Class cls, Collection fields)
          Adds fields to the set of field names to use when loading objects.
 JDBCFetchPlan addFields(Class cls, String... fields)
          Adds fields to the set of field names to use when loading objects.
 JDBCFetchPlan addFields(Collection fields)
          Adds fields to the set of fully-qualified field names to use when loading objects.
 JDBCFetchPlan addFields(String... fields)
          Adds fields to the set of fully-qualified field names to use when loading objects.
 JDBCFetchPlan clearFetchGroups()
          Clears the set of fetch group names to use wen loading data.
 JDBCFetchPlan clearFields()
          Clears the set of field names to use wen loading data.
 FetchMode getEagerFetchMode()
          Eager fetch mode in loading relations.
 FetchDirection getFetchDirection()
          Result set fetch direction.
 IsolationLevel getIsolation()
          The isolation level for queries issued to the database.
 JoinSyntax getJoinSyntax()
          SQL join syntax.
 LRSSizeAlgorithm getLRSSizeAlgorithm()
          How to determine the size of a large result set.
 ResultSetType getResultSetType()
          Type of JDBC result set to use for query results.
 FetchMode getSubclassFetchMode()
          Eager fetch mode in loading subclasses.
protected  DelegatingFetchConfiguration newDelegatingFetchConfiguration(FetchConfiguration fetch)
          Create a new exception-translating delegating fetch configuration.
 JDBCFetchPlan removeFetchGroup(String group)
          Remove the given fetch group.
 JDBCFetchPlan removeFetchGroups(Collection groups)
          Removes groups from the set of fetch group names to use when loading objects.
 JDBCFetchPlan removeFetchGroups(String... groups)
          Removes groups from the set of fetch group names to use when loading objects.
 JDBCFetchPlan removeField(Class cls, String field)
          Remove the given field.
 JDBCFetchPlan removeField(String field)
          Remove the given fully-qualified field.
 JDBCFetchPlan removeFields(Class cls, Collection fields)
          Removes fields from the set of field names to use when loading objects.
 JDBCFetchPlan removeFields(Class cls, String... fields)
          Removes fields from the set of field names to use when loading objects.
 JDBCFetchPlan removeFields(Collection fields)
          Removes fields from the set of fully-qualified field names to use when loading objects.
 JDBCFetchPlan removeFields(String... fields)
          Removes fields from the set of fully-qualified field names to use when loading objects.
 JDBCFetchPlan resetFetchGroups()
          Resets the set of fetch groups to the list in the global configuration.
 JDBCFetchPlanImpl setEagerFetchMode(FetchMode mode)
          Eager fetch mode in loading relations.
 JDBCFetchPlan setFetchBatchSize(int fetchBatchSize)
          Set the fetch batch size for large result set support.
 JDBCFetchPlanImpl setFetchDirection(FetchDirection direction)
          Result set fetch direction.
 JDBCFetchPlan setIsolation(IsolationLevel level)
          The isolation level for queries issued to the database.
 JDBCFetchPlanImpl setJoinSyntax(JoinSyntax syntax)
          SQL join syntax.
 JDBCFetchPlan setLockTimeout(int timeout)
          The number of milliseconds to wait for an object lock, or -1 for no limit.
 JDBCFetchPlanImpl setLRSSizeAlgorithm(LRSSizeAlgorithm lrsSizeAlgorithm)
          How to determine the size of a large result set.
 JDBCFetchPlan setMaxFetchDepth(int depth)
          The maximum fetch depth when loading an object.
 JDBCFetchPlan setQueryResultCacheEnabled(boolean cache)
          Control whether or not query caching is enabled.
 JDBCFetchPlan setReadLockMode(LockModeType mode)
          The lock level to use for locking loaded objects.
 JDBCFetchPlanImpl setResultSetType(ResultSetType type)
          Type of JDBC result set to use for query results.
 JDBCFetchPlanImpl setSubclassFetchMode(FetchMode mode)
          Eager fetch mode in loading subclasses.
 JDBCFetchPlan setWriteLockMode(LockModeType mode)
          The lock level to use for locking dirtied objects.
 
Methods inherited from class org.apache.openjpa.persistence.FetchPlanImpl
equals, getDelegate, getFetchBatchSize, getFetchGroups, getFields, getLockTimeout, getMaxFetchDepth, getQueryResultCacheEnabled, getReadLockMode, getWriteLockMode, hasField, hasField, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.persistence.FetchPlan
getFetchBatchSize, getFetchGroups, getFields, getLockTimeout, getMaxFetchDepth, getQueryResultCacheEnabled, getReadLockMode, getWriteLockMode, hasField, hasField
 

Constructor Detail

JDBCFetchPlanImpl

public JDBCFetchPlanImpl(FetchConfiguration fetch)
Constructor; supply delegate.

Method Detail

newDelegatingFetchConfiguration

protected DelegatingFetchConfiguration newDelegatingFetchConfiguration(FetchConfiguration fetch)
Description copied from class: FetchPlanImpl
Create a new exception-translating delegating fetch configuration.

Overrides:
newDelegatingFetchConfiguration in class FetchPlanImpl

getEagerFetchMode

public FetchMode getEagerFetchMode()
Description copied from interface: JDBCFetchPlan
Eager fetch mode in loading relations.

Specified by:
getEagerFetchMode in interface JDBCFetchPlan

setEagerFetchMode

public JDBCFetchPlanImpl setEagerFetchMode(FetchMode mode)
Description copied from interface: JDBCFetchPlan
Eager fetch mode in loading relations.

Specified by:
setEagerFetchMode in interface JDBCFetchPlan

getSubclassFetchMode

public FetchMode getSubclassFetchMode()
Description copied from interface: JDBCFetchPlan
Eager fetch mode in loading subclasses.

Specified by:
getSubclassFetchMode in interface JDBCFetchPlan

setSubclassFetchMode

public JDBCFetchPlanImpl setSubclassFetchMode(FetchMode mode)
Description copied from interface: JDBCFetchPlan
Eager fetch mode in loading subclasses.

Specified by:
setSubclassFetchMode in interface JDBCFetchPlan

getResultSetType

public ResultSetType getResultSetType()
Description copied from interface: JDBCFetchPlan
Type of JDBC result set to use for query results.

Specified by:
getResultSetType in interface JDBCFetchPlan

setResultSetType

public JDBCFetchPlanImpl setResultSetType(ResultSetType type)
Description copied from interface: JDBCFetchPlan
Type of JDBC result set to use for query results.

Specified by:
setResultSetType in interface JDBCFetchPlan

getFetchDirection

public FetchDirection getFetchDirection()
Description copied from interface: JDBCFetchPlan
Result set fetch direction.

Specified by:
getFetchDirection in interface JDBCFetchPlan

setFetchDirection

public JDBCFetchPlanImpl setFetchDirection(FetchDirection direction)
Description copied from interface: JDBCFetchPlan
Result set fetch direction.

Specified by:
setFetchDirection in interface JDBCFetchPlan

getLRSSizeAlgorithm

public LRSSizeAlgorithm getLRSSizeAlgorithm()
Description copied from interface: JDBCFetchPlan
How to determine the size of a large result set.

Specified by:
getLRSSizeAlgorithm in interface JDBCFetchPlan

setLRSSizeAlgorithm

public JDBCFetchPlanImpl setLRSSizeAlgorithm(LRSSizeAlgorithm lrsSizeAlgorithm)
Description copied from interface: JDBCFetchPlan
How to determine the size of a large result set.

Specified by:
setLRSSizeAlgorithm in interface JDBCFetchPlan

getJoinSyntax

public JoinSyntax getJoinSyntax()
Description copied from interface: JDBCFetchPlan
SQL join syntax.

Specified by:
getJoinSyntax in interface JDBCFetchPlan

setJoinSyntax

public JDBCFetchPlanImpl setJoinSyntax(JoinSyntax syntax)
Description copied from interface: JDBCFetchPlan
SQL join syntax.

Specified by:
setJoinSyntax in interface JDBCFetchPlan

getIsolation

public IsolationLevel getIsolation()
Description copied from interface: JDBCFetchPlan
The isolation level for queries issued to the database. This overrides the persistence-unit-wide openjpa.jdbc.TransactionIsolation value.

Specified by:
getIsolation in interface JDBCFetchPlan

setIsolation

public JDBCFetchPlan setIsolation(IsolationLevel level)
Description copied from interface: JDBCFetchPlan
The isolation level for queries issued to the database. This overrides the persistence-unit-wide openjpa.jdbc.TransactionIsolation value.

Specified by:
setIsolation in interface JDBCFetchPlan

addFetchGroup

public JDBCFetchPlan addFetchGroup(String group)
Description copied from interface: FetchPlan
Adds group to the set of fetch group to use when loading objects.

Specified by:
addFetchGroup in interface FetchPlan
Specified by:
addFetchGroup in interface JDBCFetchPlan
Overrides:
addFetchGroup in class FetchPlanImpl

addFetchGroups

public JDBCFetchPlan addFetchGroups(Collection groups)
Description copied from interface: FetchPlan
Adds groups to the set of fetch group names to use when loading objects.

Specified by:
addFetchGroups in interface FetchPlan
Specified by:
addFetchGroups in interface JDBCFetchPlan
Overrides:
addFetchGroups in class FetchPlanImpl

addFetchGroups

public JDBCFetchPlan addFetchGroups(String... groups)
Description copied from interface: FetchPlan
Adds groups to the set of fetch group names to use when loading objects.

Specified by:
addFetchGroups in interface FetchPlan
Specified by:
addFetchGroups in interface JDBCFetchPlan
Overrides:
addFetchGroups in class FetchPlanImpl

addField

public JDBCFetchPlan addField(Class cls,
                              String field)
Description copied from interface: FetchPlan
Adds field to the set of field names to use when loading objects.

Specified by:
addField in interface FetchPlan
Specified by:
addField in interface JDBCFetchPlan
Overrides:
addField in class FetchPlanImpl

addField

public JDBCFetchPlan addField(String field)
Description copied from interface: FetchPlan
Adds field to the set of fully-qualified field names to use when loading objects.

Specified by:
addField in interface FetchPlan
Specified by:
addField in interface JDBCFetchPlan
Overrides:
addField in class FetchPlanImpl

addFields

public JDBCFetchPlan addFields(Class cls,
                               Collection fields)
Description copied from interface: FetchPlan
Adds fields to the set of field names to use when loading objects.

Specified by:
addFields in interface FetchPlan
Specified by:
addFields in interface JDBCFetchPlan
Overrides:
addFields in class FetchPlanImpl

addFields

public JDBCFetchPlan addFields(Class cls,
                               String... fields)
Description copied from interface: FetchPlan
Adds fields to the set of field names to use when loading objects.

Specified by:
addFields in interface FetchPlan
Specified by:
addFields in interface JDBCFetchPlan
Overrides:
addFields in class FetchPlanImpl

addFields

public JDBCFetchPlan addFields(Collection fields)
Description copied from interface: FetchPlan
Adds fields to the set of fully-qualified field names to use when loading objects.

Specified by:
addFields in interface FetchPlan
Specified by:
addFields in interface JDBCFetchPlan
Overrides:
addFields in class FetchPlanImpl

addFields

public JDBCFetchPlan addFields(String... fields)
Description copied from interface: FetchPlan
Adds fields to the set of fully-qualified field names to use when loading objects.

Specified by:
addFields in interface FetchPlan
Specified by:
addFields in interface JDBCFetchPlan
Overrides:
addFields in class FetchPlanImpl

clearFetchGroups

public JDBCFetchPlan clearFetchGroups()
Description copied from interface: FetchPlan
Clears 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:
clearFetchGroups in interface FetchPlan
Specified by:
clearFetchGroups in interface JDBCFetchPlan
Overrides:
clearFetchGroups in class FetchPlanImpl

clearFields

public JDBCFetchPlan clearFields()
Description copied from interface: FetchPlan
Clears 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:
clearFields in interface FetchPlan
Specified by:
clearFields in interface JDBCFetchPlan
Overrides:
clearFields in class FetchPlanImpl

removeFetchGroup

public JDBCFetchPlan removeFetchGroup(String group)
Description copied from interface: FetchPlan
Remove the given fetch group.

Specified by:
removeFetchGroup in interface FetchPlan
Specified by:
removeFetchGroup in interface JDBCFetchPlan
Overrides:
removeFetchGroup in class FetchPlanImpl

removeFetchGroups

public JDBCFetchPlan removeFetchGroups(Collection groups)
Description copied from interface: FetchPlan
Removes groups from the set of fetch group names to use when loading objects.

Specified by:
removeFetchGroups in interface FetchPlan
Specified by:
removeFetchGroups in interface JDBCFetchPlan
Overrides:
removeFetchGroups in class FetchPlanImpl

removeFetchGroups

public JDBCFetchPlan removeFetchGroups(String... groups)
Description copied from interface: FetchPlan
Removes groups from the set of fetch group names to use when loading objects.

Specified by:
removeFetchGroups in interface FetchPlan
Specified by:
removeFetchGroups in interface JDBCFetchPlan
Overrides:
removeFetchGroups in class FetchPlanImpl

removeField

public JDBCFetchPlan removeField(Class cls,
                                 String field)
Description copied from interface: FetchPlan
Remove the given field.

Specified by:
removeField in interface FetchPlan
Specified by:
removeField in interface JDBCFetchPlan
Overrides:
removeField in class FetchPlanImpl

removeField

public JDBCFetchPlan removeField(String field)
Description copied from interface: FetchPlan
Remove the given fully-qualified field.

Specified by:
removeField in interface FetchPlan
Specified by:
removeField in interface JDBCFetchPlan
Overrides:
removeField in class FetchPlanImpl

removeFields

public JDBCFetchPlan removeFields(Class cls,
                                  Collection fields)
Description copied from interface: FetchPlan
Removes fields from the set of field names to use when loading objects.

Specified by:
removeFields in interface FetchPlan
Specified by:
removeFields in interface JDBCFetchPlan
Overrides:
removeFields in class FetchPlanImpl

removeFields

public JDBCFetchPlan removeFields(Class cls,
                                  String... fields)
Description copied from interface: FetchPlan
Removes fields from the set of field names to use when loading objects.

Specified by:
removeFields in interface FetchPlan
Specified by:
removeFields in interface JDBCFetchPlan
Overrides:
removeFields in class FetchPlanImpl

removeFields

public JDBCFetchPlan removeFields(Collection fields)
Description copied from interface: FetchPlan
Removes fields from the set of fully-qualified field names to use when loading objects.

Specified by:
removeFields in interface FetchPlan
Specified by:
removeFields in interface JDBCFetchPlan
Overrides:
removeFields in class FetchPlanImpl

removeFields

public JDBCFetchPlan removeFields(String... fields)
Description copied from interface: FetchPlan
Removes fields from the set of fully-qualified field names to use when loading objects.

Specified by:
removeFields in interface FetchPlan
Specified by:
removeFields in interface JDBCFetchPlan
Overrides:
removeFields in class FetchPlanImpl

resetFetchGroups

public JDBCFetchPlan resetFetchGroups()
Description copied from interface: FetchPlan
Resets the set of fetch groups to the list in the global configuration.

Specified by:
resetFetchGroups in interface FetchPlan
Specified by:
resetFetchGroups in interface JDBCFetchPlan
Overrides:
resetFetchGroups in class FetchPlanImpl

setQueryResultCacheEnabled

public JDBCFetchPlan setQueryResultCacheEnabled(boolean cache)
Description copied from interface: FetchPlan
Control 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:
setQueryResultCacheEnabled in interface FetchPlan
Specified by:
setQueryResultCacheEnabled in interface JDBCFetchPlan
Overrides:
setQueryResultCacheEnabled in class FetchPlanImpl

setFetchBatchSize

public JDBCFetchPlan setFetchBatchSize(int fetchBatchSize)
Description copied from interface: FetchPlan
Set the fetch batch size for large result set support. Defaults to the openjpa.FetchBatchSize setting. Note that this property will be ignored under some data stores.

Specified by:
setFetchBatchSize in interface FetchPlan
Specified by:
setFetchBatchSize in interface JDBCFetchPlan
Overrides:
setFetchBatchSize in class FetchPlanImpl

setLockTimeout

public JDBCFetchPlan setLockTimeout(int timeout)
Description copied from interface: FetchPlan
The number of milliseconds to wait for an object lock, or -1 for no limit.

Specified by:
setLockTimeout in interface FetchPlan
Specified by:
setLockTimeout in interface JDBCFetchPlan
Overrides:
setLockTimeout in class FetchPlanImpl

setMaxFetchDepth

public JDBCFetchPlan setMaxFetchDepth(int depth)
Description copied from interface: FetchPlan
The maximum fetch depth when loading an object.

Specified by:
setMaxFetchDepth in interface FetchPlan
Specified by:
setMaxFetchDepth in interface JDBCFetchPlan
Overrides:
setMaxFetchDepth in class FetchPlanImpl

setReadLockMode

public JDBCFetchPlan setReadLockMode(LockModeType mode)
Description copied from interface: FetchPlan
The lock level to use for locking loaded objects.

Specified by:
setReadLockMode in interface FetchPlan
Specified by:
setReadLockMode in interface JDBCFetchPlan
Overrides:
setReadLockMode in class FetchPlanImpl

setWriteLockMode

public JDBCFetchPlan setWriteLockMode(LockModeType mode)
Description copied from interface: FetchPlan
The lock level to use for locking dirtied objects.

Specified by:
setWriteLockMode in interface FetchPlan
Specified by:
setWriteLockMode in interface JDBCFetchPlan
Overrides:
setWriteLockMode in class FetchPlanImpl


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