public class FetchGroup
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALL |
static java.lang.String |
BASIC |
static java.lang.String |
DEFAULT |
protected static Localiser |
LOCALISER
Localisation utility for output messages
|
static java.lang.String |
MULTIVALUED |
static java.lang.String |
RELATIONSHIP |
| Constructor and Description |
|---|
FetchGroup(FetchGroup grp)
Constructor to take a copy of the supplied group, but modifiable.
|
FetchGroup(NucleusContext nucleusCtx,
java.lang.String name,
java.lang.Class cls)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FetchGroup |
addCategory(java.lang.String categoryName)
Convenience method to add the members for the specified category.
|
FetchGroup |
addMember(java.lang.String memberName)
Method to add a field of the class to the fetch group.
|
FetchGroup |
addMembers(java.lang.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.
|
java.util.Set<java.lang.String> |
getMembers()
Accessor for the members that are in this fetch group.
|
java.lang.String |
getName()
Accessor for the group name.
|
boolean |
getPostLoad()
Accessor for whether to call postLoad when this group is loaded.
|
int |
getRecursionDepth(java.lang.String memberName)
Accessor for the recursion depth for the specified field/property.
|
java.lang.Class |
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(java.lang.String categoryName)
Convenience method to remove the members for the specified category.
|
FetchGroup |
removeMember(java.lang.String memberName)
Method to remove a field of the class from the fetch group.
|
FetchGroup |
removeMembers(java.lang.String[] members) |
void |
setPostLoad(boolean postLoad)
Mutator for whether the postLoad callback should be called on loading this fetch group.
|
FetchGroup |
setRecursionDepth(java.lang.String memberName,
int recursionDepth)
Method to set the recursion depth for the specified field/property.
|
FetchGroup |
setUnmodifiable()
Method to make the group unmodifiable.
|
java.lang.String |
toString() |
protected static final Localiser LOCALISER
public static final java.lang.String DEFAULT
public static final java.lang.String RELATIONSHIP
public static final java.lang.String MULTIVALUED
public static final java.lang.String BASIC
public static final java.lang.String ALL
public FetchGroup(NucleusContext nucleusCtx, java.lang.String name, java.lang.Class cls)
nucleusCtx - Contextname - Name of the groupcls - The classpublic FetchGroup(FetchGroup grp)
grp - The existing grouppublic java.lang.String getName()
public java.lang.Class getType()
public void setPostLoad(boolean postLoad)
postLoad - Whether the postLoad callback should be called.public boolean getPostLoad()
public int getRecursionDepth(java.lang.String memberName)
memberName - Name of field/propertypublic FetchGroup setRecursionDepth(java.lang.String memberName, int recursionDepth)
memberName - Name of field/propertyrecursionDepth - Recursion depthpublic FetchGroup setUnmodifiable()
public boolean isUnmodifiable()
public FetchGroup addCategory(java.lang.String categoryName)
categoryName - Name of the categorypublic FetchGroup removeCategory(java.lang.String categoryName)
categoryName - Name of the categorypublic java.util.Set<java.lang.String> getMembers()
public FetchGroup addMember(java.lang.String memberName)
memberName - Name of the field/propertyNucleusUserException - if the field/property doesn't exist for this classpublic FetchGroup removeMember(java.lang.String memberName)
memberName - Name of the field/propertyNucleusUserException - if the field/property doesn't exist for this classpublic FetchGroup addMembers(java.lang.String[] members)
public FetchGroup removeMembers(java.lang.String[] members)
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()
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2013. All Rights Reserved.