public interface EntitySearchModel
Searches for entities based on a search text and set of String based condition columns.
Factory for
EntitySearchModel.Builder
instances via builder(EntityType, EntityConnectionProvider)
.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A builder for aEntitySearchModel
.static interface
Manages the search strings and provides search results.static interface
Controls the selectionstatic interface
Column search settings -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue
<Integer> Specifies the default search result limit, that is, the maximum number of results, null meaning no limit Value type: Integer Default value: nullstatic final PropertyValue
<Boolean> Specifies whether searcy models handle entity edit events, by replacing updated entities and removing deleted ones Value type: Boolean Default value: true -
Method Summary
Modifier and TypeMethodDescriptionstatic EntitySearchModel.Builder
builder
(EntityType entityType, EntityConnectionProvider connectionProvider) Instantiates a newEntitySearchModel.Builder
, initialized with the search columns for the given entity typecolumns()
Controls the additional search condition supplier used when performing the next search data.limit()
search()
settings()
boolean
-
Field Details
-
HANDLE_EDIT_EVENTS
Specifies whether searcy models handle entity edit events, by replacing updated entities and removing deleted ones- Value type: Boolean
- Default value: true
- See Also:
-
DEFAULT_LIMIT
Specifies the default search result limit, that is, the maximum number of results, null meaning no limit- Value type: Integer
- Default value: null
-
-
Method Details
-
entityDefinition
EntityDefinition entityDefinition()- Returns:
- the underlying
EntityDefinition
-
connectionProvider
EntityConnectionProvider connectionProvider()- Returns:
- the connection provider used by this search model
-
search
EntitySearchModel.Search search()- Returns:
- the
EntitySearchModel.Search
-
selection
EntitySearchModel.Selection selection()- Returns:
- the selection
-
columns
Collection<Column<String>> columns()- Returns:
- the columns used when performing a search
-
limit
- Returns:
- the
Value
controlling the search result limit
-
condition
Controls the additional search condition supplier used when performing the next search data.
The supplied condition condition is AND'ed to the actual search condition.
NOTE, this does not affect the currently selected value(s), if any.
The condition supplier may not return null, doing so will cause an exception when searching.
- Returns:
- the
Value
controlling the additional condition supplier
-
settings
Map<Column<String>,EntitySearchModel.Settings> settings()- Returns:
- the settings associated with each search column
-
singleSelection
boolean singleSelection()- Returns:
- true if single selection is enabled
-
builder
static EntitySearchModel.Builder builder(EntityType entityType, EntityConnectionProvider connectionProvider) Instantiates a newEntitySearchModel.Builder
, initialized with the search columns for the given entity type- Parameters:
entityType
- the type of the entity to searchconnectionProvider
- the EntityConnectionProvider to use when performing the search- Returns:
- a new
EntitySearchModel.Builder
instance - See Also:
-