Module is.codion.framework.model
Package is.codion.framework.model
Interface ModelLink.Builder<B extends ModelLink.Builder<B>>
- Type Parameters:
B- the builder type
- All Known Subinterfaces:
ForeignKeyModelLink.Builder<B>
- Enclosing interface:
ModelLink
public static interface ModelLink.Builder<B extends ModelLink.Builder<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
-
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
ModelLink build()- Returns:
- a
ModelLink
-