Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityConditionModel.Builder
- Enclosing interface:
EntityConditionModel
public static interface EntityConditionModel.Builder
Builds an
EntityConditionModel-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe second step in building anEntityConditionModelstatic interfaceThe first step in building anEntityConditionModel -
Method Summary
Modifier and TypeMethodDescriptionbuild()condition(Column<T> column, Consumer<ColumnConditionModel.Builder<T>> condition) Configures the condition model for the given column, the builder received being initialized with the column defaults.condition(ForeignKey foreignKey, Consumer<ForeignKeyConditionModel.Builder> condition) Configures the condition model for the given foreign key, the builder received being initialized with the foreign key defaults, the caption included.Excludes the given columns and foreign keys, no condition model being created for them.
-
Method Details
-
exclude
Excludes the given columns and foreign keys, no condition model being created for them.- Parameters:
attributes- the columns and foreign keys to exclude- Returns:
- this builder
-
condition
<T> EntityConditionModel.Builder condition(Column<T> column, Consumer<ColumnConditionModel.Builder<T>> condition) Configures the condition model for the given column, the builder received being initialized with the column defaults. Replaces any previous configuration of the given column.- Type Parameters:
T- the column type- Parameters:
column- the columncondition- configures the condition model builder- Returns:
- this builder
-
condition
EntityConditionModel.Builder condition(ForeignKey foreignKey, Consumer<ForeignKeyConditionModel.Builder> condition) Configures the condition model for the given foreign key, the builder received being initialized with the foreign key defaults, the caption included. Replaces any previous configuration of the given foreign key.- Parameters:
foreignKey- the foreign keycondition- configures the condition model builder- Returns:
- this builder
-
build
EntityConditionModel build()- Returns:
- a new
EntityConditionModelinstance - Throws:
IllegalArgumentException- in case an excluded or configured attribute is not a column or foreign key of the underlying entity, or is both excluded and configured
-