public class TreeBuilder extends Object
Constructor and Description |
---|
TreeBuilder() |
Modifier and Type | Method and Description |
---|---|
static List<INode> |
buildFromChildIds(List<?> rows,
String rowVariable,
ValueBinding rowIdBinding,
ValueBinding childIdsBinding)
Deprecated.
|
static List<INode> |
buildFromChildIds(List<?> rows,
String rowVariable,
ValueExpression rowIdBinding,
ValueExpression childIdsBinding)
Build a tree out a list of rows,
where the tree structure is determined by child-ids bindings
(ie each row contains a field with the ids of its children).
|
static List<INode> |
buildFromParentIds(List<?> rows,
String rowVariable,
ValueBinding rowIdBinding,
ValueBinding parentIdBinding)
Deprecated.
|
static List<INode> |
buildFromParentIds(List<?> rows,
String rowVariable,
ValueExpression rowIdBinding,
ValueExpression parentIdBinding)
Build a tree out a list of rows,
where the tree structure is determined by parent-id bindings
(ie each row contains a field with the id of its parent).
|
@Deprecated public static List<INode> buildFromParentIds(List<?> rows, String rowVariable, ValueBinding rowIdBinding, ValueBinding parentIdBinding)
buildFromParentIds(List, String, ValueExpression, ValueExpression)
insteadT
- rows
- List of rows. This may be empty, but not null.rowVariable
- Row variable used in row-id and parent-id bindings.
For example, if the row-id binding is #{row.id}, the row variable is "row".rowIdBinding
- Binding expression that calculates the row-id for the current row.
This must return a unique string id for each row.parentIdBinding
- Binding expression that calculates the parent-id for the current row.
This must return null for rows that represent roots, and a valid parent row-id for all other rows.INode
roots of the tree.
Never null; may be empty if original list of rows was empty.public static List<INode> buildFromParentIds(List<?> rows, String rowVariable, ValueExpression rowIdBinding, ValueExpression parentIdBinding)
T
- rows
- List of rows. This may be empty, but not null.rowVariable
- Row variable used in row-id and parent-id bindings.
For example, if the row-id binding is #{row.id}, the row variable is "row".rowIdBinding
- Binding expression that calculates the row-id for the current row.
This must return a unique string id for each row.parentIdBinding
- Binding expression that calculates the parent-id for the current row.
This must return null for rows that represent roots, and a valid parent row-id for all other rows.INode
roots of the tree.
Never null; may be empty if original list of rows was empty.@Deprecated public static List<INode> buildFromChildIds(List<?> rows, String rowVariable, ValueBinding rowIdBinding, ValueBinding childIdsBinding)
buildFromChildIds(List, String, ValueExpression, ValueExpression)
insteadT
- rows
- List of rows. This may be empty, but not null.rowVariable
- Row variable used in row-id and child-ids bindings.
For example, if the row-id binding is #{row.id}, the row variable is "row".rowIdBinding
- Binding expression that calculates the row-id for the current row.
This must return a unique string id for each row.childIdsBinding
- Binding expression that calculates the child-ids for the current row.
This must return a comma-separated String
of row-ids, a Collection
of row-ids,
an array of String
row-ids, or null. It may return an empty string, collection, or array.INode
roots of the tree.
Never null; may be empty if original list of rows was empty.public static List<INode> buildFromChildIds(List<?> rows, String rowVariable, ValueExpression rowIdBinding, ValueExpression childIdsBinding)
T
- rows
- List of rows. This may be empty, but not null.rowVariable
- Row variable used in row-id and child-ids bindings.
For example, if the row-id binding is #{row.id}, the row variable is "row".rowIdBinding
- Binding expression that calculates the row-id for the current row.
This must return a unique string id for each row.childIdsBinding
- Binding expression that calculates the child-ids for the current row.
This must return a comma-separated String
of row-ids, a Collection
of row-ids,
an array of String
row-ids, or null. It may return an empty string, collection, or array.INode
roots of the tree.
Never null; may be empty if original list of rows was empty.