|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.FetchPlanImpl
This class implements the FetchPlan interface. In addition to the FetchPlan interface implementation, this class updates and provides for each class managed the fields correspondent to the actual fetch plan. A fetch group defines a particular loaded state for an object graph. It specifies fields to be loaded for all of the instances in the graph. Fetch groups are activated using methods on an interface called FetchPlan. FetchPlan interface is provided to user and enables him add, remove or reset the active groups in the fetch plan
Nested Class Summary | |
class |
FetchPlanImpl.FetchPlanForClass
Class managing the fetch plan for a particular class. |
Field Summary | |
protected static Localiser |
LOCALISER
Localisation utility for output messages |
static java.lang.String |
NONE
For use with addGroup , removeGroup , and the
various setGroups methods. |
Fields inherited from interface javax.jdo.FetchPlan |
ALL, DEFAULT, DETACH_LOAD_FIELDS, DETACH_UNLOAD_FIELDS, FETCH_SIZE_GREEDY, FETCH_SIZE_OPTIMAL |
Constructor Summary | |
FetchPlanImpl()
Constructor. |
Method Summary | |
javax.jdo.FetchPlan |
addGroup(java.lang.String fetchGroupName)
|
javax.jdo.FetchPlan |
clearGroups()
Method to clear the current groups and activate the DFG. |
javax.jdo.FetchPlan |
getCopy()
Returns a copy of this FetchPlan with all settings initialized |
int |
getDetachmentOptions()
Return the options to be used at detachment. |
java.lang.Class[] |
getDetachmentRootClasses()
Accessor for the root classes of the detachment graph for DetachAllOnCommit. |
java.util.Collection |
getDetachmentRoots()
Accessor for the roots of the detachment graph for DetachAllOnCommit. |
FetchPlanImpl.FetchPlanForClass |
getFetchPlanForClass(AbstractClassMetaData cmd)
Access the fetch plan for the class |
int |
getFetchSize()
|
java.util.Set |
getGroups()
Accessor for the groups for this FetchPlan. |
int |
getMaxFetchDepth()
Accessor for the maximum fetch depth. |
FetchPlanImpl.FetchPlanForClass |
manageFetchPlanForClass(AbstractClassMetaData cmd)
Manage the fetch plan for the class |
javax.jdo.FetchPlan |
removeGroup(java.lang.String fetchGroupName)
|
javax.jdo.FetchPlan |
setDetachmentOptions(int options)
Set the options to be used at detachment. |
javax.jdo.FetchPlan |
setDetachmentRootClasses(java.lang.Class[] rootClasses)
Set the classes used for roots of the detachment graph for DetachAllOnCommit. |
javax.jdo.FetchPlan |
setDetachmentRoots(java.util.Collection roots)
Set the roots for DetachAllOnCommit |
javax.jdo.FetchPlan |
setFetchSize(int fetchSize)
|
javax.jdo.FetchPlan |
setGroup(java.lang.String fetchGroupName)
Method to set the fetch group. |
javax.jdo.FetchPlan |
setGroups(java.util.Collection fetchGroupNames)
|
javax.jdo.FetchPlan |
setGroups(java.lang.String[] fetchGroupNames)
Method to set the groups using an array. |
javax.jdo.FetchPlan |
setMaxFetchDepth(int max)
Mutator for the maximum fetch depth where -1 implies no restriction on the fetch depth and 0 is invalid and throws a JDOUserException. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final Localiser LOCALISER
public static final java.lang.String NONE
addGroup
, removeGroup
, and the
various setGroups
methods. Value: none
.
Was originally part of JDO 2 spec, but was dropped before final release.
Included here for convenient way of getting back to no fields.
Constructor Detail |
public FetchPlanImpl()
Method Detail |
public FetchPlanImpl.FetchPlanForClass manageFetchPlanForClass(AbstractClassMetaData cmd)
cmd
- AbstractClassMetaData for the class to manage
public FetchPlanImpl.FetchPlanForClass getFetchPlanForClass(AbstractClassMetaData cmd)
cmd
- the AbstractClassMetaData
public javax.jdo.FetchPlan addGroup(java.lang.String fetchGroupName)
addGroup
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan removeGroup(java.lang.String fetchGroupName)
removeGroup
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan clearGroups()
clearGroups
in interface javax.jdo.FetchPlan
FetchPlan.clearGroups()
public java.util.Set getGroups()
getGroups
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan setGroups(java.util.Collection fetchGroupNames)
setGroups
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan setGroups(java.lang.String[] fetchGroupNames)
setGroups
in interface javax.jdo.FetchPlan
fetchGroupNames
- Names of the fetch groups
public javax.jdo.FetchPlan setGroup(java.lang.String fetchGroupName)
setGroup
in interface javax.jdo.FetchPlan
fetchGroupName
- Name of the fetch group
FetchPlan.setGroup(java.lang.String)
public javax.jdo.FetchPlan setDetachmentRoots(java.util.Collection roots)
setDetachmentRoots
in interface javax.jdo.FetchPlan
roots
- The roots of the detachment graph.
public java.util.Collection getDetachmentRoots()
getDetachmentRoots
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan setDetachmentRootClasses(java.lang.Class[] rootClasses)
setDetachmentRootClasses
in interface javax.jdo.FetchPlan
rootClasses
- Classes to be used as roots of the detachment graph
public java.lang.Class[] getDetachmentRootClasses()
getDetachmentRootClasses
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan setMaxFetchDepth(int max)
setMaxFetchDepth
in interface javax.jdo.FetchPlan
max
- The maximum fetch depth to fetch topublic int getMaxFetchDepth()
getMaxFetchDepth
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan setFetchSize(int fetchSize)
setFetchSize
in interface javax.jdo.FetchPlan
public int getFetchSize()
getFetchSize
in interface javax.jdo.FetchPlan
public int getDetachmentOptions()
getDetachmentOptions
in interface javax.jdo.FetchPlan
public javax.jdo.FetchPlan setDetachmentOptions(int options)
setDetachmentOptions
in interface javax.jdo.FetchPlan
options
- The options
public java.lang.String toString()
public javax.jdo.FetchPlan getCopy()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |