Package org.datanucleus.api.jakarta
Class JakartaFetchPlan
- java.lang.Object
-
- org.datanucleus.api.jakarta.JakartaFetchPlan
-
- All Implemented Interfaces:
Serializable
public class JakartaFetchPlan extends Object implements Serializable
Implementation of a FetchPlan for Jakarta Persistence. Provides a Jakarta Persistence wrapper around the internal org.datanucleus.FetchPlan.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JakartaFetchPlan(org.datanucleus.FetchPlan fp)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JakartaFetchPlan
addGroup(String group)
Method to add a group to the fetch plan.JakartaFetchPlan
clearGroups()
Method to clear the fetch plan groups.int
getDetachmentOptions()
Accessor for the detachment options.Class[]
getDetachmentRootClasses()
Accessor for the detachment root classes.Collection
getDetachmentRoots()
Accessor for the detachment roots.int
getFetchSize()
Accessor for the fetch size.Set<String>
getGroups()
Accessor for the groups.org.datanucleus.FetchPlan
getInternalFetchPlan()
Accessor for the internal fetch plan.int
getMaxFetchDepth()
Accessor for the max fetch depth.JakartaFetchPlan
removeGroup(String group)
Method to remove a group from the FetchPlan.JakartaFetchPlan
setDetachmentOptions(int options)
Method to set the detachment options.JakartaFetchPlan
setDetachmentRootClasses(Class... rootClasses)
Method to set the detachment root classes.JakartaFetchPlan
setDetachmentRoots(Collection roots)
Method to set the detachment roots.JakartaFetchPlan
setFetchSize(int size)
Method to set the fetch size (large result sets).JakartaFetchPlan
setGroup(String group)
Method to set the FetchPlan to a single group.JakartaFetchPlan
setGroups(String... groups)
Method to set the groups to the passed array.JakartaFetchPlan
setGroups(Collection groups)
Method to set the groups to the passed collection.JakartaFetchPlan
setMaxFetchDepth(int depth)
Method to set the max fetch depth.String
toString()
-
-
-
Method Detail
-
addGroup
public JakartaFetchPlan addGroup(String group)
Method to add a group to the fetch plan.- Parameters:
group
- The group to add- Returns:
- The updated FetchPlan
-
clearGroups
public JakartaFetchPlan clearGroups()
Method to clear the fetch plan groups.- Returns:
- The updated FetchPlan
-
removeGroup
public JakartaFetchPlan removeGroup(String group)
Method to remove a group from the FetchPlan.- Parameters:
group
- The group to remove- Returns:
- The updated FetchPlan
-
setGroup
public JakartaFetchPlan setGroup(String group)
Method to set the FetchPlan to a single group.- Parameters:
group
- The group to set- Returns:
- The updated FetchPlan
-
setGroups
public JakartaFetchPlan setGroups(Collection groups)
Method to set the groups to the passed collection.- Parameters:
groups
- Collection of groups- Returns:
- Updated FetchPlan
-
setGroups
public JakartaFetchPlan setGroups(String... groups)
Method to set the groups to the passed array.- Parameters:
groups
- Collection of groups- Returns:
- Updated FetchPlan
-
getFetchSize
public int getFetchSize()
Accessor for the fetch size.- Returns:
- The fetch size
-
setFetchSize
public JakartaFetchPlan setFetchSize(int size)
Method to set the fetch size (large result sets).- Parameters:
size
- The size- Returns:
- Updated FetchPlan
-
getMaxFetchDepth
public int getMaxFetchDepth()
Accessor for the max fetch depth.- Returns:
- Max fetch depth
-
setMaxFetchDepth
public JakartaFetchPlan setMaxFetchDepth(int depth)
Method to set the max fetch depth.- Parameters:
depth
- The depth- Returns:
- Updated FetchPlan
-
getDetachmentOptions
public int getDetachmentOptions()
Accessor for the detachment options.- Returns:
- Detachment options.
-
getDetachmentRootClasses
public Class[] getDetachmentRootClasses()
Accessor for the detachment root classes.- Returns:
- Detachment root classes
-
getDetachmentRoots
public Collection getDetachmentRoots()
Accessor for the detachment roots.- Returns:
- Detachment roots
-
setDetachmentOptions
public JakartaFetchPlan setDetachmentOptions(int options)
Method to set the detachment options.- Parameters:
options
- Detachment options- Returns:
- Updated FetchPlan
-
setDetachmentRootClasses
public JakartaFetchPlan setDetachmentRootClasses(Class... rootClasses)
Method to set the detachment root classes.- Parameters:
rootClasses
- The detachment root classes- Returns:
- Updated FetchPlan
-
setDetachmentRoots
public JakartaFetchPlan setDetachmentRoots(Collection roots)
Method to set the detachment roots.- Parameters:
roots
- Detachment roots- Returns:
- Updated FetchPlan
-
getInternalFetchPlan
public final org.datanucleus.FetchPlan getInternalFetchPlan()
Accessor for the internal fetch plan.- Returns:
- Internal fetch plan
-
-