Class TermRange
- java.lang.Object
-
- com.attivio.sdk.search.query.phrase.Phrase
-
- com.attivio.sdk.search.query.phrase.PhraseTerm
-
- com.attivio.sdk.search.query.phrase.TermRange
-
- All Implemented Interfaces:
TokenAnnotationSet,java.io.Serializable,java.lang.Cloneable
public final class TermRange extends PhraseTerm
Phrase that matches all terms in a range.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.query.phrase.Phrase
Phrase.Parameter
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.query.phrase.PhraseTerm
annotations, endOffset, startOffset
-
Fields inherited from class com.attivio.sdk.search.query.phrase.Phrase
boost, parameters
-
-
Constructor Summary
Constructors Constructor Description TermRange()Constructor.TermRange(java.lang.Object lowerTerm, java.lang.Object upperTerm)Constructor.TermRange(java.lang.Object lowerTerm, java.lang.Object upperTerm, boolean includeLower, boolean includeUpper)Constructor.TermRange(java.lang.String lowerTerm, java.lang.String upperTerm)Constructor.TermRange(java.lang.String lowerTerm, java.lang.String upperTerm, boolean includeLower, boolean includeUpper)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)java.lang.StringgetLowerTerm()Get the term that specifies the lower bounds for this range.java.lang.StringgetUpperTerm()Get the term that specifies the upper bounds for this range.static TermRangegreaterThan(java.lang.Object term)Creates aTermRangethat matches all terms greater thanterm.inthashCode()booleanisIncludeLower()Get if thelower termshould be included in the range.booleanisIncludeUpper()Get if theupper termshould be included in the range.booleanisMatchAll()Returnstrueif this phrase will match all documents.static TermRangelessThan(java.lang.Object term)Creates aTermRangethat matches all terms less thanterm.voidsetIncludeLower(boolean value)Set if thelower termshould be included in the range.voidsetIncludeUpper(boolean value)Set if theupper termshould be included in the range.voidsetLowerTerm(java.lang.Object value)Set the term that specifies the lower bounds for this range.voidsetLowerTerm(java.lang.String value)Set the term that specifies the lower bounds for this range.voidsetParameter(java.lang.String name, java.lang.Object value)Set parameternametovalue.voidsetUpperTerm(java.lang.Object value)Set the term that specifies the upper bounds for this range.voidsetUpperTerm(java.lang.String value)Set the term that specifies the upper bounds for this range.voidtoString(java.lang.StringBuilder buffer, boolean compact)Appends the string representation of this query tobuffer.-
Methods inherited from class com.attivio.sdk.search.query.phrase.PhraseTerm
containsAnnotation, containsParameters, getAnnotations, getEndOffset, getStartOffset, offsetGap, rewriteChildren, setAnnotation, setAnnotations, setEndOffset, setStartOffset, unsetAnnotation
-
Methods inherited from class com.attivio.sdk.search.query.phrase.Phrase
clone, containsParameters, copyParameters, getBoost, getParameter, getParameter, getParameter, getParameter, getParameterInternal, parameters, parseIntParameter, removeParameter, rewrite, setBoost, setParameters, toArray, toString, toString
-
-
-
-
Constructor Detail
-
TermRange
public TermRange()
Constructor.
-
TermRange
public TermRange(java.lang.String lowerTerm, java.lang.String upperTerm)Constructor.
-
TermRange
public TermRange(java.lang.Object lowerTerm, java.lang.Object upperTerm)Constructor.
-
TermRange
public TermRange(java.lang.String lowerTerm, java.lang.String upperTerm, boolean includeLower, boolean includeUpper)Constructor.
-
TermRange
public TermRange(java.lang.Object lowerTerm, java.lang.Object upperTerm, boolean includeLower, boolean includeUpper)Constructor.
-
-
Method Detail
-
isMatchAll
public boolean isMatchAll()
Returnstrueif this phrase will match all documents.- Overrides:
isMatchAllin classPhrase
-
setParameter
public void setParameter(java.lang.String name, java.lang.Object value)Set parameternametovalue.NOTE:
nameis case insensitive.- Overrides:
setParameterin classPhraseTerm
-
getLowerTerm
public java.lang.String getLowerTerm()
Get the term that specifies the lower bounds for this range.If this value is
null, the lower bound is unbounded.
-
setLowerTerm
public void setLowerTerm(java.lang.String value)
Set the term that specifies the lower bounds for this range.If
valueisnull, the lower bound will be unbounded.
-
setLowerTerm
public void setLowerTerm(java.lang.Object value)
Set the term that specifies the lower bounds for this range.If
valueisnull, the lower bound will be unbounded.
-
getUpperTerm
public java.lang.String getUpperTerm()
Get the term that specifies the upper bounds for this range.If this value is
null, the upper bound is unbounded.
-
setUpperTerm
public void setUpperTerm(java.lang.String value)
Set the term that specifies the upper bounds for this range.If
valueisnull, the upper bound will be unbounded.
-
setUpperTerm
public void setUpperTerm(java.lang.Object value)
Set the term that specifies the upper bounds for this range.If
valueisnull, the upper bound will be unbounded.
-
isIncludeLower
public boolean isIncludeLower()
Get if thelower termshould be included in the range.
-
setIncludeLower
public void setIncludeLower(boolean value)
Set if thelower termshould be included in the range.
-
isIncludeUpper
public boolean isIncludeUpper()
Get if theupper termshould be included in the range.
-
setIncludeUpper
public void setIncludeUpper(boolean value)
Set if theupper termshould be included in the range.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classPhraseTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classPhraseTerm
-
toString
public void toString(java.lang.StringBuilder buffer, boolean compact)Appends the string representation of this query tobuffer.
-
lessThan
public static TermRange lessThan(java.lang.Object term)
Creates aTermRangethat matches all terms less thanterm.
-
-