Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityTreeModel.Builder.Children
- Enclosing interface:
EntityTreeModel.Builder<B extends EntityTreeModel.Builder<B>>
public static interface EntityTreeModel.Builder.Children
Configures the children via a foreign key: their condition, combined with the foreign key condition owned
by the tree, the EntityConnection.Select they are selected with and their comparator.
A limit or an offset leaves children out.
-
Method Summary
Modifier and TypeMethodDescriptioncomparator(@Nullable Comparator<Entity> comparator) Specifies the comparator for the children, in place of the order by of their select, the comparator of the tree and the comparator of the entity type.Specifies a condition the children must satisfy, combined with the foreign key condition, applying when finding which nodes have children as well.Configures theEntityConnection.Selectthe children are selected with, the order by, the attributes or the reference depth for example, its where condition already set.
-
Method Details
-
condition
Specifies a condition the children must satisfy, combined with the foreign key condition, applying when finding which nodes have children as well.- Parameters:
condition- supplies the condition, called each time the children are selected- Returns:
- this children instance
-
select
Configures theEntityConnection.Selectthe children are selected with, the order by, the attributes or the reference depth for example, its where condition already set. Its order by does not apply when finding which nodes have children.Called each time the children are selected, and once when the model is built, to find out whether it specifies an order by.
- Parameters:
select- configures the select builder- Returns:
- this children instance
-
comparator
Specifies the comparator for the children, in place of the order by of their select, the comparator of the tree and the comparator of the entity type.- Parameters:
comparator- the comparator, null for the query order- Returns:
- this children instance
- See Also:
-