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 TypeMethodDescriptionbuild()
columns
(Collection<Column<String>> columns) description
(String description) limit
(int limit) Default ','singleSelection
(boolean singleSelection) Default falsestringFunction
(Function<Entity, String> stringFunction) Override the default toString() for search elements when displayed in a field based on this model
-
Method Details
-
columns
- Parameters:
columns
- the columns to search by- Returns:
- this builder
- Throws:
IllegalArgumentException
- in casecolumns
is empty
-
stringFunction
Override the default toString() for search elements when displayed in a field based on this model- Parameters:
stringFunction
- the function providing the toString() functionality- Returns:
- this builder
-
description
- Parameters:
description
- the description- Returns:
- this builder
-
singleSelection
Default false- Parameters:
singleSelection
- true if single selection should be enabled- Returns:
- this builder
-
separator
Default ','- Parameters:
multipleItemSeparator
- the text used to separate multiple selected items- Returns:
- this builder
-
limit
- Parameters:
limit
- the search result limit- Returns:
- this builder
-
build
EntitySearchModel build()- Returns:
- a new
EntitySearchModel
based on this builder
-