Module is.codion.framework.model
Package is.codion.framework.model
Interface ModelLink.Builder<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<M,E,T,R>,T extends EntityTableModel<M,E,T,R>,R extends EntityEditor<M,E,T,R>,B extends ModelLink.Builder<M,E,T,R,B>>
- Type Parameters:
M- theEntityModeltypeE- theEntityEditModeltypeT- theEntityTableModeltypeR- theEntityEditortypeB- the builder type
- All Known Subinterfaces:
ForeignKeyModelLink.Builder<M,E, T, R, B>
- Enclosing interface:
ModelLink<M extends EntityModel<M,E, T, R>, E extends EntityEditModel<M, E, T, R>, T extends EntityTableModel<M, E, T, R>, R extends EntityEditor<M, E, T, R>>
public static interface ModelLink.Builder<M extends EntityModel<M,E,T,R>,E extends EntityEditModel<M,E,T,R>,T extends EntityTableModel<M,E,T,R>,R extends EntityEditor<M,E,T,R>,B extends ModelLink.Builder<M,E,T,R,B>>
Builds a
ModelLink-
Method Summary
Modifier and TypeMethodDescriptionactive(boolean active) build()onDelete(Consumer<Collection<Entity>> onDelete) onInsert(Consumer<Collection<Entity>> onInsert) onSelection(Consumer<Collection<Entity>> onSelection) Note that only active model links respond to parent model selection by default.
-
Method Details
-
onSelection
Note that only active model links respond to parent model selection by default.- Parameters:
onSelection- called when the selection changes in the parent model- Returns:
- this builder
- See Also:
-
onInsert
- Parameters:
onInsert- called when an insert is performed in the parent model- Returns:
- this builder
-
onUpdate
- Parameters:
onUpdate- called when an update is performed in the parent model- Returns:
- this builder
-
onDelete
- Parameters:
onDelete- called when delete is performed in the parent model- Returns:
- this builder
-
active
- Parameters:
active- the initial active state of this link- Returns:
- this builder
-
build
- Returns:
- a
ModelLink
-