AbstractRangeQueryNode (Lucene 3.6.2 API)
Keywords: org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.queryParser.standard.nodes
Class AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>>

    java.lang.Object
      org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
          org.apache.lucene.queryParser.standard.nodes.AbstractRangeQueryNode<T>

Type Parameters:
  `T` - the type of the range query bounds (lower and upper)

All Implemented Interfaces:
  Serializable, Cloneable, FieldableNode, QueryNode, RangeQueryNode<FieldValuePairQueryNode<?>>

Direct Known Subclasses:
  NumericRangeQueryNode, TermRangeQueryNode

    public abstract class AbstractRangeQueryNode<T extends FieldValuePairQueryNode<?>>

extends QueryNodeImpl
implements RangeQueryNode<FieldValuePairQueryNode<?>>

This class should be extended by nodes intending to represent range queries.

See Also:
  Serialized Form

Field Summary

Fields inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
`PLAINTEXT_FIELD_NAME, toQueryStringIgnoreFields`

Constructor Summary
`protected` | `AbstractRangeQueryNode()` Constructs an `AbstractRangeQueryNode`, it should be invoked only by its extenders.

Method Summary
`CharSequence` | `getField()` Returns the field associated with this node.
`T` | `getLowerBound()` Returns the lower bound node.
`T` | `getUpperBound()` Returns the upper bound node.
`boolean` | `isLowerInclusive()` Returns whether the lower bound is inclusive or exclusive.
`boolean` | `isUpperInclusive()` Returns whether the upper bound is inclusive or exclusive.
`void` | `setBounds(T lower, T upper, boolean lowerInclusive, boolean upperInclusive)` Sets the lower and upper bounds.
`void` | `setField(CharSequence fieldName)` Sets the field associated with this node.
`CharSequence` | `toQueryString(EscapeQuerySyntax escapeSyntaxParser)` convert to a query string understood by the query parser

Methods inherited from class org.apache.lucene.queryParser.core.nodes.QueryNodeImpl
`add, add, allocate, clone, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isDefaultField, isLeaf, isRoot, set, setLeaf, setTag, setTag, toString, unsetTag, unsetTag`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.apache.lucene.queryParser.core.nodes.QueryNode
`add, add, cloneTree, containsTag, containsTag, getChildren, getParent, getTag, getTag, getTagMap, getTags, isLeaf, set, setTag, setTag, toString, unsetTag, unsetTag`

Constructor Detail

### AbstractRangeQueryNode

    protected AbstractRangeQueryNode()

  Constructs an `AbstractRangeQueryNode`, it should be invoked only by its extenders.

Method Detail

### getField

    public CharSequence getField()

  Returns the field associated with this node.

  Specified by:
    `getField` in interface `FieldableNode`
  Returns:
    the field associated with this node
  See Also:
    `FieldableNode`

### setField

    public void setField(CharSequence fieldName)

  Sets the field associated with this node.

  Specified by:
    `setField` in interface `FieldableNode`
  Parameters:
    `fieldName` - the field associated with this node

### getLowerBound

    public T getLowerBound()

  Returns the lower bound node.

  Specified by:
    `getLowerBound` in interface `RangeQueryNode<FieldValuePairQueryNode<?>>`
  Returns:
    the lower bound node.

### getUpperBound

    public T getUpperBound()

  Returns the upper bound node.

  Specified by:
    `getUpperBound` in interface `RangeQueryNode<FieldValuePairQueryNode<?>>`
  Returns:
    the upper bound node.

### isLowerInclusive

    public boolean isLowerInclusive()

  Returns whether the lower bound is inclusive or exclusive.

  Specified by:
    `isLowerInclusive` in interface `RangeQueryNode<FieldValuePairQueryNode<?>>`
  Returns:
    `true` if the lower bound is inclusive, otherwise, `false`

### isUpperInclusive

    public boolean isUpperInclusive()

  Returns whether the upper bound is inclusive or exclusive.

  Specified by:
    `isUpperInclusive` in interface `RangeQueryNode<FieldValuePairQueryNode<?>>`
  Returns:
    `true` if the upper bound is inclusive, otherwise, `false`

### setBounds

    public void setBounds(T lower,
                          T upper,
                          boolean lowerInclusive,
                          boolean upperInclusive)

  Sets the lower and upper bounds.

  Parameters:
    `lower` - the lower bound, `null` if lower bound is open
    `upper` - the upper bound, `null` if upper bound is open
    `lowerInclusive` - `true` if the lower bound is inclusive, otherwise, `false`
    `upperInclusive` - `true` if the upper bound is inclusive, otherwise, `false`
  See Also:
    `getLowerBound()`, `getUpperBound()`, `isLowerInclusive()`, `isUpperInclusive()`

### toQueryString

    public CharSequence toQueryString(EscapeQuerySyntax escapeSyntaxParser)

  Description copied from interface: `QueryNode`
  convert to a query string understood by the query parser

  Specified by:
    `toQueryString` in interface `QueryNode`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD