org.objectweb.speedo.mim.api
Interface FetchPlanItf

All Known Implementing Classes:
JDOFetchPlan, SpeedoFetchPlan

public interface FetchPlanItf

Fetch groups are activated using methods on this interface. An instance of this interface can be obtained from PersistenceManager.getFetchPlan(), Extent.getFetchPlan(), and Query.getFetchPlan(). When a Query or Extent is retrieved from a PersistenceManager, its FetchPlan is initialized to the same settings as that of the PersistenceManager. Subsequent modifications of the Query or Extent's FetchPlan are not reflected in the FetchPlan of the PersistenceManager.


Field Summary
static java.lang.String ALL
          For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls.
static java.lang.String DEFAULT
          For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls.
static int FETCH_SIZE_GREEDY
          For use with #setFetchSize.
static int FETCH_SIZE_OPTIMAL
          For use with #setFetchSize.
static java.lang.String NONE
          For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls.
static java.lang.String VALUES
          For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls.
 
Method Summary
 FetchPlanItf speedoAddGroup(java.lang.String fetchGroupName)
          Add the fetch group to the set of active fetch groups.
 FetchPlanItf speedoClearGroups()
          Remove all active groups leaving no active fetch group.
 int speedoGetFetchSize()
          Return the fetch size, or FETCH_SIZE_OPTIMAL if not set, or FETCH_SIZE_GREEDY to fetch all.
 java.util.Collection speedoGetGroups()
          Return the names of all active fetch groups.
 FetchPlanItf speedoRemoveGroup(java.lang.String fetchGroupName)
          Remove the fetch group from the set active fetch groups.
 FetchPlanItf speedoSetFetchSize(int fetchSize)
          Set the fetch size for large result set support.
 FetchPlanItf speedoSetGroup(java.lang.String fetchGroupName)
          Set the active fetch groups to the single named fetch group.
 FetchPlanItf speedoSetGroups(java.util.Collection fetchGroupNames)
          Set a collection of groups.
 FetchPlanItf speedoSetGroups(java.lang.String[] fetchGroupNames)
          Set a collection of groups.
 

Field Detail

DEFAULT

static final java.lang.String DEFAULT
For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls. Value: default.

See Also:
Constant Field Values

ALL

static final java.lang.String ALL
For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls. Value: all.

See Also:
Constant Field Values

VALUES

static final java.lang.String VALUES
For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls. Value: values.

See Also:
Constant Field Values

NONE

static final java.lang.String NONE
For use with speedoAddGroup(String), speedoRemoveGroup(String), and the various speedoSetGroups(java.util.Collection) calls. Value: none.

See Also:
Constant Field Values

FETCH_SIZE_GREEDY

static final int FETCH_SIZE_GREEDY
For use with #setFetchSize. Value: -1.

See Also:
Constant Field Values

FETCH_SIZE_OPTIMAL

static final int FETCH_SIZE_OPTIMAL
For use with #setFetchSize. Value: 0.

See Also:
Constant Field Values
Method Detail

speedoAddGroup

FetchPlanItf speedoAddGroup(java.lang.String fetchGroupName)
Add the fetch group to the set of active fetch groups.

Returns:
the FetchPlan

speedoRemoveGroup

FetchPlanItf speedoRemoveGroup(java.lang.String fetchGroupName)
Remove the fetch group from the set active fetch groups.

Returns:
the FetchPlan

speedoClearGroups

FetchPlanItf speedoClearGroups()
Remove all active groups leaving no active fetch group.

Returns:
the FetchPlan

speedoGetGroups

java.util.Collection speedoGetGroups()
Return the names of all active fetch groups.

Returns:
the names of active fetch groups

speedoSetGroups

FetchPlanItf speedoSetGroups(java.util.Collection fetchGroupNames)
Set a collection of groups.

Parameters:
fetchGroupNames - a collection of names of fetch groups
Returns:
the FetchPlan

speedoSetGroups

FetchPlanItf speedoSetGroups(java.lang.String[] fetchGroupNames)
Set a collection of groups.

Parameters:
fetchGroupNames - a String array of names of fetch groups
Returns:
the FetchPlan

speedoSetGroup

FetchPlanItf speedoSetGroup(java.lang.String fetchGroupName)
Set the active fetch groups to the single named fetch group.

Parameters:
fetchGroupName - the single fetch group
Returns:
the FetchPlan

speedoSetFetchSize

FetchPlanItf speedoSetFetchSize(int fetchSize)
Set the fetch size for large result set support. Use FETCH_SIZE_OPTIMAL to unset, and FETCH_SIZE_GREEDY to force loading of everything.

Parameters:
fetchSize - the fetch size
Returns:
the FetchPlan

speedoGetFetchSize

int speedoGetFetchSize()
Return the fetch size, or FETCH_SIZE_OPTIMAL if not set, or FETCH_SIZE_GREEDY to fetch all.

Returns:
the fetch size