Overview | Package | Class | Tree | Deprecated | Index | Help
| Kodo 4.0.0RC2 generated on May 12 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kodo.kernel
Interface FetchConfiguration

All Superinterfaces:
  Cloneable, LockLevels, QueryFlushModes, Serializable

All Known Subinterfaces:
  JDBCFetchConfiguration

    public interface FetchConfiguration

extends Serializable, Cloneable, LockLevels, QueryFlushModes

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

Since:
  3.0

Field Summary
`static int` | `DEFAULT` Constant to revert any setting back to its default value.
`static String` | `FETCH_GROUP_ALL` Special fetch group name that is used by Kodo to indicate that all fetch groups should be loaded by this configuration.

Fields inherited from interface kodo.kernel.LockLevels
`LOCK_NONE, LOCK_READ, LOCK_WRITE`

Fields inherited from interface kodo.kernel.QueryFlushModes
`FLUSH_FALSE, FLUSH_TRUE, FLUSH_WITH_CONNECTION`

Method Summary
`FetchConfiguration` | `addFetchGroup(String group)` Adds `group` to the set of fetch group names to use when loading objects.
`FetchConfiguration` | `addFetchGroups(Collection groups)` Adds `groups` to the set of fetch group names to use when loading objects.
`FetchConfiguration` | `addField(String field)` Adds `field` to the set of fully-qualified field names to use when loading objects.
`FetchConfiguration` | `addFields(Collection fields)` Adds `fields` to the set of fully-qualified field names to use when loading objects.
`FetchConfiguration` | `clearFetchGroups()` Clears the set of fetch group names to use when loading data.
`FetchConfiguration` | `clearFields()` Clears the set of field names to use when loading data.
`Object` | `clone()` Clone this instance.
`void` | `copy(FetchConfiguration fetch)` Copy the state from the given fetch configuration to this one.
`StoreContext` | `getContext()` Return the context assiciated with this configuration; may be null if it has not been set or this object has been serialized.
`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.
`String[]` | `getFields()` Returns the names of the fields that this component will use when loading objects.
`int` | `getFlushBeforeQueries()` The query automatic flush configuration.
`Object` | `getHint(String name)` Returns the hint for the specific key, or null if the hint is not specified.
`int` | `getLockTimeout()` The number of milliseconds to wait for an object lock, or -1 for no limit.
`boolean` | `getQueryCache()` Return whether or not query caching is enabled.
`int` | `getReadLockLevel()` The lock level to use for locking loaded objects.
`int` | `getWriteLockLevel()` The lock level to use for locking dirtied objects.
`boolean` | `hasFetchGroup(String group)` Return true if the given fetch group has been added.
`boolean` | `hasField(String field)` Return true if the given fully-qualified field has been added.
`ResultList` | `newResultList(ResultObjectProvider rop)` Return a new result list for the current fetch configuration.
`FetchConfiguration` | `removeFetchGroup(String group)` Remove the given fetch group.
`FetchConfiguration` | `removeFetchGroups(Collection groups)` Removes `groups` from the set of fetch group names to use when loading objects.
`FetchConfiguration` | `removeField(String field)` Remove the given fully-qualified field.
`FetchConfiguration` | `removeFields(Collection fields)` Removes `fields` from the set of fully-qualified field names to use when loading objects.
`FetchConfiguration` | `resetFetchGroups()` Resets the set of fetch groups to the list in the global configuration.
`void` | `setContext(StoreContext ctx)` Called automatically by the system to associate the fetch configuration with a context before use.
`FetchConfiguration` | `setFetchBatchSize(int fetchBatchSize)` Set the fetch batch size for large result set support.
`FetchConfiguration` | `setFlushBeforeQueries(int flush)` The query automatic flush configuration.
`void` | `setHint(String name, Object value)` Sets an arbitrary query hint that may be utilized during execution.
`FetchConfiguration` | `setLockTimeout(int timeout)` The number of milliseconds to wait for an object lock, or -1 for no limit.
`FetchConfiguration` | `setQueryCache(boolean cache)` Control whether or not query caching is enabled.
`FetchConfiguration` | `setReadLockLevel(int level)` The lock level to use for locking loaded objects.
`FetchConfiguration` | `setWriteLockLevel(int level)` The lock level to use for locking dirtied objects.

Field Detail

### DEFAULT

    static final int DEFAULT

  Constant to revert any setting back to its default value.

  See Also:
    Constant Field Values

### FETCH_GROUP_ALL

    static final String FETCH_GROUP_ALL

  Special fetch group name that is used by Kodo to indicate that all fetch groups should be loaded by this configuration.

  See Also:
    Constant Field Values

Method Detail

### getContext

    StoreContext getContext()

  Return the context assiciated with this configuration; may be null if it has not been set or this object has been serialized. In this case, the fetch configuration may not allow the setting of certain properties that require non-standard license capabilities.

### setContext

    void setContext(StoreContext ctx)

  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.

### clone

    Object clone()

  Clone this instance.

### copy

    void copy(FetchConfiguration fetch)

  Copy the state from the given fetch configuration to this one.

### getFetchBatchSize

    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

    FetchConfiguration 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.

### getQueryCache

    boolean getQueryCache()

  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.

### setQueryCache

    FetchConfiguration setQueryCache(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

    int getFlushBeforeQueries()

  The query automatic flush configuration.

### setFlushBeforeQueries

    FetchConfiguration setFlushBeforeQueries(int flush)

  The query automatic flush configuration.

### getFetchGroups

    String[] getFetchGroups()

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

### hasFetchGroup

    boolean hasFetchGroup(String group)

  Return true if the given fetch group has been added.

### addFetchGroup

    FetchConfiguration addFetchGroup(String group)

  Adds `group` to the set of fetch group names to use when loading objects.

### addFetchGroups

    FetchConfiguration addFetchGroups(Collection groups)

  Adds `groups` to the set of fetch group names to use when loading objects.

### removeFetchGroup

    FetchConfiguration removeFetchGroup(String group)

  Remove the given fetch group.

### removeFetchGroups

    FetchConfiguration removeFetchGroups(Collection groups)

  Removes `groups` from the set of fetch group names to use when loading objects.

### clearFetchGroups

    FetchConfiguration clearFetchGroups()

  Clears the set of fetch group names to use when 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.

### resetFetchGroups

    FetchConfiguration resetFetchGroups()

  Resets the set of fetch groups to the list in the global configuration.

### getFields

    String[] getFields()

  Returns the names of the fields that this component will use when loading objects. Defaults to the empty set.

### hasField

    boolean hasField(String field)

  Return true if the given fully-qualified field has been added.

### addField

    FetchConfiguration addField(String field)

  Adds `field` to the set of fully-qualified field names to use when loading objects.

### addFields

    FetchConfiguration addFields(Collection fields)

  Adds `fields` to the set of fully-qualified field names to use when loading objects.

### removeField

    FetchConfiguration removeField(String field)

  Remove the given fully-qualified field.

### removeFields

    FetchConfiguration removeFields(Collection fields)

  Removes `fields` from the set of fully-qualified field names to use when loading objects.

### clearFields

    FetchConfiguration clearFields()

  Clears the set of field names to use when loading data. After this operation is invoked, only those fields in the configured fetch groups will be loaded when loading an object.

### getLockTimeout

    int getLockTimeout()

  The number of milliseconds to wait for an object lock, or -1 for no limit.

  Since:
    3.1

### setLockTimeout

    FetchConfiguration setLockTimeout(int timeout)

  The number of milliseconds to wait for an object lock, or -1 for no limit.

  Since:
    3.1

### getReadLockLevel

    int getReadLockLevel()

  The lock level to use for locking loaded objects.

  Since:
    3.1

### setReadLockLevel

    FetchConfiguration setReadLockLevel(int level)

  The lock level to use for locking loaded objects.

  Since:
    3.1

### getWriteLockLevel

    int getWriteLockLevel()

  The lock level to use for locking dirtied objects.

  Since:
    3.1

### setWriteLockLevel

    FetchConfiguration setWriteLockLevel(int level)

  The lock level to use for locking dirtied objects.

  Since:
    3.1

### newResultList

    ResultList newResultList(ResultObjectProvider rop)

  Return a new result list for the current fetch configuration.

### setHint

    void setHint(String name,
                 Object value)

  Sets an arbitrary query hint that may be utilized during execution. The hint may be datastore-specific.

  Parameters:
    `name` - the name of the hint
    `value` - the value of the hint
  Since:
    4.0

### getHint

    Object getHint(String name)

  Returns the hint for the specific key, or null if the hint is not specified.

  Parameters:
    `name` - the hint name
  Since:
    4.0

Overview | Package | Class | Tree | Deprecated | Index | Help
| Kodo 4.0.0RC2 generated on May 12 2006
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.