Class SetListUtil
- java.lang.Object
-
- de.gebit.integrity.remoting.entities.setlist.SetListUtil
-
public final class SetListUtil extends java.lang.Object
This utility class collects several methods used to exploreSetList
s. Quite some of these could well be implemented in theSetListEntry
class, but they've been deliberately implemented in a separate utility class to minimize code changes in the set list classes and thus minimize the risk of introducing serialization incompatibilities.- Author:
- Rene Schneider - initial API and implementation
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SetListEntry
getSetListEntryChild(SetListEntry anEntry, SetList aSetList, int aChildIndex)
Returns the actual child entry at a specified position within the children of a specifiedSetListEntry
.static int
getSetListEntryChildCount(SetListEntry anEntry)
Returns the number of children that a specifiedSetListEntry
has.static java.util.List<java.lang.Integer>
getSetListEntryChildReferences(SetListEntry anEntry)
Returns a list of child node references belonging to a specifiedSetListEntry
.static java.util.List<SetListEntry>
getSetListEntryChilds(SetListEntry anEntry, SetList aSetList)
Returns the actual child entries of the givenSetListEntry
.
-
-
-
Method Detail
-
getSetListEntryChildCount
public static int getSetListEntryChildCount(SetListEntry anEntry)
Returns the number of children that a specifiedSetListEntry
has. This includes only "children" to be displayed as child nodes in the tree.- Parameters:
anEntry
- the entry- Returns:
- the number of child nodes
-
getSetListEntryChildReferences
public static java.util.List<java.lang.Integer> getSetListEntryChildReferences(SetListEntry anEntry)
Returns a list of child node references belonging to a specifiedSetListEntry
. This only includes such children that should be displayed in the tree.- Parameters:
anEntry
- the entry- Returns:
- a list of child references (entry IDs), or null if this is not applicable.
-
getSetListEntryChild
public static SetListEntry getSetListEntryChild(SetListEntry anEntry, SetList aSetList, int aChildIndex)
Returns the actual child entry at a specified position within the children of a specifiedSetListEntry
.- Parameters:
anEntry
- the entryaSetList
- the setlist that the entry belongs toaChildIndex
- the index of the child to get- Returns:
- the child entry, or null if there is none
-
getSetListEntryChilds
public static java.util.List<SetListEntry> getSetListEntryChilds(SetListEntry anEntry, SetList aSetList)
Returns the actual child entries of the givenSetListEntry
.- Parameters:
anEntry
- the entryaSetList
- the setlist that the entry belongs to- Returns:
- the list of childs, or null if the entry does not refer to any childs due to its type
-
-