Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.0.3 generated on February 20 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.runtime
Interface FetchConfiguration

All Superinterfaces:
  Serializable

All Known Subinterfaces:
  JDBCFetchConfiguration

public interface FetchConfiguration
extends Serializable

Allows configuration and optimization of how objects are loaded from the data store.

Since:
  3.0

Field Summary
`static int` | `EAGER_FETCH_MULTIPLE` Constant indicating that eager fetching should be optimized for selecting multiple objects.
`static int` | `EAGER_FETCH_NONE` Constant indicating not to try to load related objects when querying for an object.
`static int` | `EAGER_FETCH_SINGLE` Constant indicating that eager fetching should be optimized for selecting a single object.

Method Summary
`boolean` | `addFetchGroup(String group)` Adds `group` to the set of fetch group names to use when loading objects.
`boolean` | `addFetchGroups(Collection groups)` Adds `groups` to the set of fetch group names to use when loading objects.
`boolean` | `addFetchGroups(String[] groups)` Adds `groups` to the set of fetch group names to use when loading objects.
`void` | `clearFetchGroups()` Clears the set of fetch group names to use wen loading data.
`Object` | `clone()` Implementations must be cloneable.
`int` | `getEagerFetchMode()` Return the eager fetch mode.
`int` | `getFetchBatchSize()` Return the fetch batch size for large result set support.
`String[]` | `getFetchGroups()` Returns the names of the fetch groups that this component will use when loading objects.
`int` | `getFlushBeforeQueries()` The query automatic flush configuration.
`boolean` | `hasFetchGroup(String group)` Return true if the given fetch group has been added.
`boolean` | `isQueryCacheEnabled()` Return whether or not query caching is enabled.
`ResultList` | `newResultList(ResultObjectProvider rop)` Return a new result list for the current fetch configuration.
`boolean` | `removeFetchGroup(String group)` Remove the given fetch group.
`boolean` | `removeFetchGroups(Collection groups)` Removes `groups` from the set of fetch group names to use when loading objects.
`boolean` | `removeFetchGroups(String[] groups)` Removes `groups` from the set of fetch group names to use when loading objects.
`void` | `setEagerFetchMode(int mode)` Set the eager fetch mode.
`void` | `setFetchBatchSize(int fetchBatchSize)` Set the fetch batch size for large result set support.
`void` | `setFlushBeforeQueries(int flush)` The query automatic flush configuration.
`void` | `setQueryCacheEnabled(boolean cache)` Control whether or not query caching is enabled.

Field Detail

### EAGER_FETCH_NONE

    public static final int EAGER_FETCH_NONE

  Constant indicating not to try to load related objects when querying for an object.

### EAGER_FETCH_SINGLE

    public static final int EAGER_FETCH_SINGLE

  Constant indicating that eager fetching should be optimized for selecting a single object.

### EAGER_FETCH_MULTIPLE

    public static final int EAGER_FETCH_MULTIPLE

  Constant indicating that eager fetching should be optimized for selecting multiple objects.

Method Detail

### getEagerFetchMode

    public int getEagerFetchMode()

  Return the eager fetch mode. Defaults to the `kodo.EagerFetchMode` setting.

### setEagerFetchMode

    public void setEagerFetchMode(int mode)

  Set the eager fetch mode. Defaults to the `kodo.EagerFetchMode` setting.

### getFetchBatchSize

    public int getFetchBatchSize()

  Return the fetch batch size for large result set support. Defaults to the `kodo.FetchBatchSize` setting. Note that this property will be ignored under some data stores.

### setFetchBatchSize

    public void setFetchBatchSize(int fetchBatchSize)

  Set the fetch batch size for large result set support. Defaults to the `kodo.FetchBatchSize` setting. Note that this property will be ignored under some data stores.

### isQueryCacheEnabled

    public boolean isQueryCacheEnabled()

  Return whether or not query caching is enabled. If this returns `true` but the datacache plugin is not installed, caching will not be enabled. If this returns `false`, query caching will not be used even if the datacache plugin is installed.

### setQueryCacheEnabled

    public void setQueryCacheEnabled(boolean cache)

  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.

### getFlushBeforeQueries

    public int getFlushBeforeQueries()

  The query automatic flush configuration.
  See Also:
    `KodoQuery#FLUSH_TRUE`, `KodoQuery#FLUSH_FALSE`, `KodoQuery#FLUSH_WITH_CONNECTION`

### setFlushBeforeQueries

    public void setFlushBeforeQueries(int flush)

  The query automatic flush configuration.
  See Also:
    `KodoQuery#FLUSH_TRUE`, `KodoQuery#FLUSH_FALSE`, `KodoQuery#FLUSH_WITH_CONNECTION`

### getFetchGroups

    public String[] getFetchGroups()

  Returns the names of the fetch groups that this component will use when loading objects. Defaults to the `kodo.FetchGroups` setting.

### hasFetchGroup

    public boolean hasFetchGroup(String group)

  Return true if the given fetch group has been added.

### addFetchGroup

    public boolean addFetchGroup(String group)

  Adds `group` to the set of fetch group names to use when loading objects.
  Returns:
    `true` if `group` was added; `false` if `group` was already in the fetch group set

### addFetchGroups

    public boolean addFetchGroups(String[] groups)

  Adds `groups` to the set of fetch group names to use when loading objects.
  Returns:
    `true` if the set of fetch group names to load was updated as a result of this operation

### addFetchGroups

    public boolean addFetchGroups(Collection groups)

  Adds `groups` to the set of fetch group names to use when loading objects.
  Returns:
    `true` if the set of fetch group names to load was updated as a result of this operation

### removeFetchGroup

    public boolean removeFetchGroup(String group)

  Remove the given fetch group.

### removeFetchGroups

    public boolean removeFetchGroups(String[] groups)

  Removes `groups` from the set of fetch group names to use when loading objects.
  Returns:
    `true` if the set of fetch group names to load was updated as a result of this operation

### removeFetchGroups

    public boolean removeFetchGroups(Collection groups)

  Removes `groups` from the set of fetch group names to use when loading objects.
  Returns:
    `true` if the set of fetch group names to load was updated as a result of this operation

### clearFetchGroups

    public void clearFetchGroups()

  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.

### newResultList

    public ResultList newResultList(ResultObjectProvider rop)

  Return a new result list for the current fetch configuration.

### clone

    public Object clone()

  Implementations must be cloneable.
  Overrides:
    `clone` in class `Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 3.0.3 generated on February 20 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.