Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityTreeModel.Builder.RootsStep
- All Known Subinterfaces:
SwingEntityTreeModel.Builder.RootsStep
- Enclosing interface:
EntityTreeModel.Builder<B extends EntityTreeModel.Builder<B>>
public static interface EntityTreeModel.Builder.RootsStep
Provides a
EntityTreeModel.Builder.ConnectionStep-
Method Summary
Modifier and TypeMethodDescriptionroots(EntityType entityType) roots(EntityType entityType, Consumer<EntityTreeModel.Builder.Roots> roots) Configures the query selecting the roots.
-
Method Details
-
roots
- Parameters:
entityType- the type of the root entities- Returns:
- a
EntityTreeModel.Builder.ConnectionStep
-
roots
EntityTreeModel.Builder.ConnectionStep roots(EntityType entityType, Consumer<EntityTreeModel.Builder.Roots> roots) Configures the query selecting the roots. A condition replaces the default one, the self-referencing foreign keys being null, which it may include if needed.
EntityTreeModel.builder() .roots(Employee.TYPE, roots -> roots .condition(() -> Employee.LASTNAME.equalTo("Edwards")) .select(select -> select.orderBy(ascending(Employee.LASTNAME))));- Parameters:
entityType- the type of the root entitiesroots- configures the query selecting the roots- Returns:
- a
EntityTreeModel.Builder.ConnectionStep - See Also:
-