Package org.ametys.cms.search.query
Class DoubleQuery
- java.lang.Object
-
- org.ametys.cms.search.query.AbstractFieldQuery
-
- org.ametys.cms.search.query.DoubleQuery
-
- All Implemented Interfaces:
Query
public class DoubleQuery extends AbstractFieldQuery
Represents aQuerytesting a double field.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.cms.search.query.Query
Query.LogicalOperator, Query.Operator
-
-
Field Summary
Fields Modifier and Type Field Description protected Query.Operator_operatorThe operator.protected Double_valueThe boolean value to test.-
Fields inherited from class org.ametys.cms.search.query.AbstractFieldQuery
_fieldPath
-
-
Constructor Summary
Constructors Constructor Description DoubleQuery(String fieldPath)Build a DoubleQuery testing the existence of the field.DoubleQuery(String fieldPath, Double value)Build a DoubleQuery.DoubleQuery(String fieldPath, Query.Operator op, Double value)Build a DoubleQuery.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringbuild()Build the solr query string representing the Query object.booleanequals(Object obj)Query.OperatorgetOperator()Get the operator.doublegetValue()Get the value.inthashCode()-
Methods inherited from class org.ametys.cms.search.query.AbstractFieldQuery
getFieldPath
-
-
-
-
Field Detail
-
_operator
protected Query.Operator _operator
The operator.
-
-
Constructor Detail
-
DoubleQuery
public DoubleQuery(String fieldPath)
Build a DoubleQuery testing the existence of the field.- Parameters:
fieldPath- the field path
-
DoubleQuery
public DoubleQuery(String fieldPath, Double value)
Build a DoubleQuery.- Parameters:
fieldPath- the field's pathvalue- the value.
-
DoubleQuery
public DoubleQuery(String fieldPath, Query.Operator op, Double value)
Build a DoubleQuery.- Parameters:
fieldPath- the field's pathop- the operator.value- the value.
-
-
Method Detail
-
getOperator
public Query.Operator getOperator()
Get the operator.- Returns:
- the operator.
-
getValue
public double getValue()
Get the value.- Returns:
- the value.
-
build
public String build() throws QuerySyntaxException
Description copied from interface:QueryBuild the solr query string representing the Query object.- Returns:
- the solr query string representing the Query object.
- Throws:
QuerySyntaxException- if the query can't be built because of a syntax error.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractFieldQuery
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractFieldQuery
-
-