Class WordingSearchCriterionDefinition
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<MetadataType>
-
- org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
-
- org.ametys.web.frontoffice.search.metamodel.impl.WordingSearchCriterionDefinition
-
- All Implemented Interfaces:
SearchCriterionDefinition
- Direct Known Subclasses:
TitleOrWordingSearchCriterionDefinition
public class WordingSearchCriterionDefinition extends AbstractDefaultSearchCriterionDefinition
A wordingSearchCriterionDefinition, based onFullTextQueries
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWordingSearchCriterionDefinition.WordingTypeThe type ofWordingSearchCriterionDefinition
-
Field Summary
Fields Modifier and Type Field Description protected WordingSearchCriterionDefinition.WordingType_wordingTypeThe wording type
-
Constructor Summary
Constructors Constructor Description WordingSearchCriterionDefinition(String id, String pluginName, I18nizableText label, Optional<Searchable> searchable, WordingSearchCriterionDefinition.WordingType wordingType)Constructs aWordingSearchCriterionDefinition
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Query_getTextFieldQuery(Object value, Query.Operator operator, String language)Get the text field queryprotected Query_getWordsQuery(Object value, Query.Operator operator, String language)Get the words queryQuerygetEmptyValueQuery(String language, Map<String,Object> contextualParameters)Gets the query for testing the value is emptyQuerygetQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)Gets the query associated to the given value-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
dispose, getEnumeratedValues, getSearchable, isEnumerated, isTooBigForStaticEnumerator, toJSON
-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.SearchCriterionDefinition
getContextPrefixLabels, getId, getLabel, getType, getValidator, getWidget, getWidgetParameters
-
-
-
-
Field Detail
-
_wordingType
protected WordingSearchCriterionDefinition.WordingType _wordingType
The wording type
-
-
Constructor Detail
-
WordingSearchCriterionDefinition
public WordingSearchCriterionDefinition(String id, String pluginName, I18nizableText label, Optional<Searchable> searchable, WordingSearchCriterionDefinition.WordingType wordingType)
Constructs aWordingSearchCriterionDefinition- Parameters:
id- The idpluginName- The plugin namelabel- The labelsearchable- theSearchablewordingType- the type ofWordingSearchCriterionDefinition
-
-
Method Detail
-
getQuery
public Query getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
Description copied from interface:SearchCriterionDefinitionGets the query associated to the given value- Parameters:
value- the valueoperator- the operatorlanguage- The current search language.contextualParameters- the search contextual parameters.- Returns:
- the query associated to the given value
-
_getTextFieldQuery
protected Query _getTextFieldQuery(Object value, Query.Operator operator, String language)
Get the text field query- Parameters:
value- the valueoperator- the operatorlanguage- the language- Returns:
- the text field query
-
_getWordsQuery
protected Query _getWordsQuery(Object value, Query.Operator operator, String language)
Get the words query- Parameters:
value- the valueoperator- the operatorlanguage- the language- Returns:
- the words query
-
getEmptyValueQuery
public Query getEmptyValueQuery(String language, Map<String,Object> contextualParameters)
Description copied from interface:SearchCriterionDefinitionGets the query for testing the value is empty- Parameters:
language- The current search language.contextualParameters- the search contextual parameters.- Returns:
- the query for testing the value is empty
-
-