Class FOSearchCriterion
- java.lang.Object
 - 
- org.ametys.web.frontoffice.search.instance.model.FOSearchCriterion
 
 
- 
public class FOSearchCriterion extends Object
A FO search criterion, representing a criterion valued by the webmaster when creating itsSearchServiceInstance, i.e. a filled line in the 'Criterion' page (third page) on the creation/edition dialog box of a search service. 
- 
- 
Field Summary
Fields Modifier and Type Field Description private SearchCriterionDefinition_criterionDefinitionprivate String_idprivate FOSearchCriterionMode_modeprivate String_operatorprivate EnumeratedValues.RestrictedValues_restrictedValuesprivate Object_staticValue 
- 
Constructor Summary
Constructors Constructor Description FOSearchCriterion(String id, SearchCriterionDefinition criterionDefinition, String operator, FOSearchCriterionMode mode, EnumeratedValues.RestrictedValues restrictedValues, Object staticValue)Creates a SearchCriterion for Front-Office search service 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchCriterionDefinitiongetCriterionDefinition()Gets the definition of the criterionStringgetId()Gets the id of the criterionFOSearchCriterionModegetMode()Gets the modeStringgetOperator()Gets the operator (as string)Optional<EnumeratedValues.RestrictedValues>getRestrictedValues()Gets the restricted values.Optional<Object>getStaticValue()Gets the static value. 
 - 
 
- 
- 
Field Detail
- 
_criterionDefinition
private SearchCriterionDefinition _criterionDefinition
 
- 
_mode
private FOSearchCriterionMode _mode
 
- 
_restrictedValues
private EnumeratedValues.RestrictedValues _restrictedValues
 
- 
_staticValue
private Object _staticValue
 
 - 
 
- 
Constructor Detail
- 
FOSearchCriterion
public FOSearchCriterion(String id, SearchCriterionDefinition criterionDefinition, String operator, FOSearchCriterionMode mode, EnumeratedValues.RestrictedValues restrictedValues, Object staticValue)
Creates a SearchCriterion for Front-Office search service- Parameters:
 id- the id of the criterioncriterionDefinition- the definition of the criterionoperator- the operator (as string)mode- the moderestrictedValues- the restricted values. Must be non-empty if mode isFOSearchCriterionMode.RESTRICTED_USER_INPUT, must be empty otherwise.staticValue- the static value. Must be non-empty if mode isFOSearchCriterionMode.STATIC, must be empty otherwise.
 
 - 
 
- 
Method Detail
- 
getCriterionDefinition
public SearchCriterionDefinition getCriterionDefinition()
Gets the definition of the criterion- Returns:
 - the definition of the criterion
 
 
- 
getOperator
public String getOperator()
Gets the operator (as string)- Returns:
 - the operator (as string)
 
 
- 
getMode
public FOSearchCriterionMode getMode()
Gets the mode- Returns:
 - the mode
 
 
- 
getRestrictedValues
public Optional<EnumeratedValues.RestrictedValues> getRestrictedValues()
Gets the restricted values. Must be non-empty ifgetMode()returnsFOSearchCriterionMode.RESTRICTED_USER_INPUT, must be empty otherwise.- Returns:
 - the restricted values
 
 
- 
getStaticValue
public Optional<Object> getStaticValue()
Gets the static value. Must be non-empty ifgetMode()returnsFOSearchCriterionMode.STATIC, must be empty otherwise.- Returns:
 - the static value
 
 
 - 
 
 -