T
- Class that this FetchGroup is forpublic class FetchGroup<T> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
ALL |
static String |
BASIC |
static String |
DEFAULT |
static String |
MULTIVALUED |
static String |
RELATIONSHIP |
Constructor and Description |
---|
FetchGroup(FetchGroup<T> grp)
Constructor to take a copy of the supplied group, but modifiable.
|
FetchGroup(NucleusContext nucleusCtx,
String name,
Class<T> cls)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FetchGroup |
addCategory(String categoryName)
Convenience method to add the members for the specified category.
|
FetchGroup |
addMember(String memberName)
Method to add a field of the class to the fetch group.
|
FetchGroup |
addMembers(String[] members) |
void |
deregisterListener(FetchPlan plan)
Method to deregister a listener for changes to this FetchGroup.
|
void |
disconnectFromListeners()
Method to disconnect this fetch group from all listeners since the group is removed from use.
|
boolean |
equals(Object obj) |
Collection<FetchPlan> |
getListenerFPs() |
Set<String> |
getMembers()
Accessor for the members that are in this fetch group.
|
String |
getName()
Accessor for the group name.
|
boolean |
getPostLoad()
Accessor for whether to call postLoad when this group is loaded.
|
int |
getRecursionDepth(String memberName)
Accessor for the recursion depth for the specified field/property.
|
Class<T> |
getType()
Accessor for the class that this group is for.
|
int |
hashCode() |
boolean |
isUnmodifiable()
Accessor for modifiability status of this group.
|
void |
registerListener(FetchPlan plan)
Method to register a listener for changes to this FetchGroup.
|
FetchGroup |
removeCategory(String categoryName)
Convenience method to remove the members for the specified category.
|
FetchGroup |
removeMember(String memberName)
Method to remove a field of the class from the fetch group.
|
FetchGroup |
removeMembers(String[] members) |
void |
setPostLoad(boolean postLoad)
Mutator for whether the postLoad callback should be called on loading this fetch group.
|
FetchGroup |
setRecursionDepth(String memberName,
int recursionDepth)
Method to set the recursion depth for the specified field/property.
|
FetchGroup |
setUnmodifiable()
Method to make the group unmodifiable.
|
String |
toString() |
public static final String DEFAULT
public static final String RELATIONSHIP
public static final String MULTIVALUED
public static final String BASIC
public static final String ALL
public FetchGroup(NucleusContext nucleusCtx, String name, Class<T> cls)
nucleusCtx
- Contextname
- Name of the groupcls
- The classpublic FetchGroup(FetchGroup<T> grp)
grp
- The existing grouppublic String getName()
public void setPostLoad(boolean postLoad)
postLoad
- Whether the postLoad callback should be called.public boolean getPostLoad()
public int getRecursionDepth(String memberName)
memberName
- Name of field/propertypublic FetchGroup setRecursionDepth(String memberName, int recursionDepth)
memberName
- Name of field/propertyrecursionDepth
- Recursion depthpublic FetchGroup setUnmodifiable()
public boolean isUnmodifiable()
public FetchGroup addCategory(String categoryName)
categoryName
- Name of the categorypublic FetchGroup removeCategory(String categoryName)
categoryName
- Name of the categorypublic Set<String> getMembers()
public FetchGroup addMember(String memberName)
memberName
- Name of the field/propertyNucleusUserException
- if the field/property doesn't exist for this classpublic FetchGroup removeMember(String memberName)
memberName
- Name of the field/propertyNucleusUserException
- if the field/property doesn't exist for this classpublic FetchGroup addMembers(String[] members)
public FetchGroup removeMembers(String[] members)
public Collection<FetchPlan> getListenerFPs()
public void registerListener(FetchPlan plan)
plan
- The FetchPlan that is listeningpublic void deregisterListener(FetchPlan plan)
plan
- The FetchPlan that is no longer listeningpublic void disconnectFromListeners()
Copyright © 2019. All rights reserved.