Class AbstractSearchFieldsHolder
java.lang.Object
ch.tocco.nice2.model.entity.impl.entity.search.AbstractSearchFieldsHolder
- All Implemented Interfaces:
CommonSearchModel
- Direct Known Subclasses:
FulltextSearchModelImpl
,RelationSearchModelImpl
,RemoteFieldModelImpl
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.model.entity.api.search.CommonSearchModel
CommonSearchModel.SearchField
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Used in subclassed createEmptyInstance().getMaxCharsForField
(String fieldName) Tells the max number of characters to search in this field if defined.getMinCharsForField
(String fieldName) Tells the min number of characters required to search in this field, falls back to default.@Nullable SearchFieldsModel
boolean
Tells if the model is not null, but not if it has content.void
setMinChars
(int minChars) void
-
Field Details
-
searchFields
-
-
Constructor Details
-
AbstractSearchFieldsHolder
public AbstractSearchFieldsHolder()
-
-
Method Details
-
getMinChars
- Specified by:
getMinChars
in interfaceCommonSearchModel
-
setMinChars
public void setMinChars(int minChars) - Specified by:
setMinChars
in interfaceCommonSearchModel
-
getMinCharsForField
Description copied from interface:CommonSearchModel
Tells the min number of characters required to search in this field, falls back to default.- Specified by:
getMinCharsForField
in interfaceCommonSearchModel
- Parameters:
fieldName
- The name of the entity field.- Returns:
- Null if field is not used, otherwise
>= 1
.
-
getMaxCharsForField
Description copied from interface:CommonSearchModel
Tells the max number of characters to search in this field if defined.- Specified by:
getMaxCharsForField
in interfaceCommonSearchModel
- Parameters:
fieldName
- The name of the entity field, 0 for no limit.- Returns:
- Null if field is not used.
-
getSearchFieldsModel
- Specified by:
getSearchFieldsModel
in interfaceCommonSearchModel
-
setSearchFieldsModel
- Specified by:
setSearchFieldsModel
in interfaceCommonSearchModel
-
hasSearchFieldsModel
public boolean hasSearchFieldsModel()Description copied from interface:CommonSearchModel
Tells if the model is not null, but not if it has content.- Specified by:
hasSearchFieldsModel
in interfaceCommonSearchModel
-
assignEmptySearchFields
protected void assignEmptySearchFields()Used in subclassed createEmptyInstance().
-