Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityConditions.Builder
- Enclosing interface:
EntityConditions
public static interface EntityConditions.Builder
Builds an
EntityConditions-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe second step in building anEntityConditionsstatic interfaceThe first step in building anEntityConditions -
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> EntityConditions.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
EntityConditions.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
EntityConditions build()- Returns:
- a new
EntityConditionsinstance - 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
-