Module is.codion.framework.model
Package is.codion.framework.model
Interface EntitySearchModel.Builder
- Enclosing interface:
- EntitySearchModel
public static interface EntitySearchModel.Builder
A builder for a
EntitySearchModel
.-
Method Summary
Modifier and TypeMethodDescriptionattributes
(Collection<Attribute<?>> attributes) build()
columns
(Collection<Column<String>> columns) limit
(int limit) Defaults toEntityDefinition.orderBy()
.singleSelection
(boolean singleSelection) Default false
-
Method Details
-
columns
- Parameters:
columns
- the columns to search by- Returns:
- this builder
- Throws:
IllegalArgumentException
- in casecolumns
is empty or a column is not associated with the underlying entity
-
attributes
- Parameters:
attributes
- the attributes to include when querying entities from the database, an empty Collection means all- Returns:
- this builder
- Throws:
IllegalArgumentException
- in case an attribute is not associated with the underlying entity
-
orderBy
Defaults toEntityDefinition.orderBy()
.- Parameters:
orderBy
- theOrderBy
to use when querying entities from the database- Returns:
- this builder
-
singleSelection
Default false- Parameters:
singleSelection
- true if single selection should be enabled- Returns:
- this builder
-
limit
- Parameters:
limit
- the search result limit- Returns:
- this builder
-
build
EntitySearchModel build()- Returns:
- a new
EntitySearchModel
based on this builder
-