Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.descriptors
Class FetchGroupManager

`java.lang.Object
oracle.toplink.descriptors.FetchGroupManager`

public class FetchGroupManager
extends java.lang.Object

Purpose: The fetch group manager controls the named fetch groups defined at the descriptor level. TopLink supports multiple, overlapped fetch groups, optionally with one of them as the default fetch group. The domain object must implement oracle.toplink.queryframework.FetchGroupTracker interface, in order to make use of the fetch group performance enhancement feature. Please refer to FetchGroup class for the prons and cons of fetch group usage.

Since:
  TopLink 10.1.3.
See Also:
  `FetchGroup`, `FetchGroupTracker`

Constructor Summary
`FetchGroupManager()` Constructor

Method Summary
`void` | `addFetchGroup(FetchGroup group)` Add a named fetch group to the descriptor
`ClassDescriptor` | `getClassDescriptor()` PUBLIC: Return the referenced descriptor.
`FetchGroup` | `getDefaultFetchGroup()` Return the descriptor-level default fetch group.
`FetchGroup` | `getFetchGroup(java.lang.String groupName)` Return a pre-defined named fetch group.
`java.util.Map` | `getFetchGroups()` Return the fetch group map: keyed by the group name, valued by the fetch group object.
`boolean` | `isAttributeFetched(java.lang.Object object, java.lang.String attributeName)` Return true if the attribute of the object has already been fetched
`void` | `setDefaultFetchGroup(FetchGroup newDefaultFetchGroup)` Set the descriptor-level default fetch group.
`void` | `setDescriptor(Descriptor descriptor)` Set the referenced descriptor.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FetchGroupManager

    public FetchGroupManager()

  Constructor

Method Detail

### addFetchGroup

    public void addFetchGroup(FetchGroup group)

  Add a named fetch group to the descriptor

### getFetchGroups

    public java.util.Map getFetchGroups()

  Return the fetch group map: keyed by the group name, valued by the fetch group object.

### getDefaultFetchGroup

    public FetchGroup getDefaultFetchGroup()

  Return the descriptor-level default fetch group. All read object and read all queries would use the default fetch group if no fetch group is explicitly defined for the query, unless setShouldUseDefaultFetchGroup(false); is also called on the query. Default fetch group should be used carefully. It would be beneficial if most of the system queries are for the subset of the object, so un-needed attributes data would not have to be read, and the users do not have to setup every query for the given fetch group, as default one is always used. However, if queries on object are mostly use case specific and not systematic, using default fetch group could cause undesirable extra round-trip and performance degradation.
  See Also:
    `ObjectLevelReadQuery.setShouldUseDefaultFetchGroup(boolean)`

### getFetchGroup

    public FetchGroup getFetchGroup(java.lang.String groupName)

  Return a pre-defined named fetch group.

### setDefaultFetchGroup

    public void setDefaultFetchGroup(FetchGroup newDefaultFetchGroup)

  Set the descriptor-level default fetch group. All read object and read all queries would use the default fetch group if no fetch group is explicitly defined for the query, unless setShouldUseDefaultFetchGroup(false); is also called on the query. Default fetch group should be used carefully. It would be beneficial if most of the system queries are for the subset of the object, so un-needed attributes data would not have to be read, and the users do not have to setup every query for the given fetch group, as default one is always used. However, if queries on object are mostly use case specific and not systematic, using default fetch group could cause undesirable extra round-trip and performance degradation.
  See Also:
    `ObjectLevelReadQuery.setShouldUseDefaultFetchGroup(boolean)`

### isAttributeFetched

    public boolean isAttributeFetched(java.lang.Object object,
                                      java.lang.String attributeName)

  Return true if the attribute of the object has already been fetched

### getClassDescriptor

    public ClassDescriptor getClassDescriptor()

  PUBLIC: Return the referenced descriptor.

### setDescriptor

    public void setDescriptor(Descriptor descriptor)

  Set the referenced descriptor.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD