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 boolean
equals(java.lang.Object other)
java.lang.String
getLowerTerm()
Get the term that specifies the lower bounds for this range.java.lang.String
getUpperTerm()
Get the term that specifies the upper bounds for this range.static TermRange
greaterThan(java.lang.Object term)
Creates aTermRange
that matches all terms greater thanterm
.int
hashCode()
boolean
isIncludeLower()
Get if thelower term
should be included in the range.boolean
isIncludeUpper()
Get if theupper term
should be included in the range.boolean
isMatchAll()
Returnstrue
if this phrase will match all documents.static TermRange
lessThan(java.lang.Object term)
Creates aTermRange
that matches all terms less thanterm
.void
setIncludeLower(boolean value)
Set if thelower term
should be included in the range.void
setIncludeUpper(boolean value)
Set if theupper term
should be included in the range.void
setLowerTerm(java.lang.Object value)
Set the term that specifies the lower bounds for this range.void
setLowerTerm(java.lang.String value)
Set the term that specifies the lower bounds for this range.void
setParameter(java.lang.String name, java.lang.Object value)
Set parametername
tovalue
.void
setUpperTerm(java.lang.Object value)
Set the term that specifies the upper bounds for this range.void
setUpperTerm(java.lang.String value)
Set the term that specifies the upper bounds for this range.void
toString(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()
Returnstrue
if this phrase will match all documents.- Overrides:
isMatchAll
in classPhrase
-
setParameter
public void setParameter(java.lang.String name, java.lang.Object value)
Set parametername
tovalue
.NOTE:
name
is case insensitive.- Overrides:
setParameter
in 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
value
isnull
, 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
value
isnull
, 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
value
isnull
, 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
value
isnull
, the upper bound will be unbounded.
-
isIncludeLower
public boolean isIncludeLower()
Get if thelower term
should be included in the range.
-
setIncludeLower
public void setIncludeLower(boolean value)
Set if thelower term
should be included in the range.
-
isIncludeUpper
public boolean isIncludeUpper()
Get if theupper term
should be included in the range.
-
setIncludeUpper
public void setIncludeUpper(boolean value)
Set if theupper term
should be included in the range.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classPhraseTerm
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in 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 aTermRange
that matches all terms less thanterm
.
-
-