org.apache.oodt.cas.filemgr.structs
Class RangeQueryCriteria

java.lang.Object
  extended by org.apache.oodt.cas.filemgr.structs.QueryCriteria
      extended by org.apache.oodt.cas.filemgr.structs.RangeQueryCriteria
All Implemented Interfaces:
Cloneable

public class RangeQueryCriteria
extends QueryCriteria

Version:
$Revision: 9683 $

A Range Criteria element for a Query to the Catalog.

Author:
woollard, bfoster

Constructor Summary
RangeQueryCriteria()
          Default constructor.
RangeQueryCriteria(String elementName, String start, String end)
          Constructor for the RangeQuerycriteria class.
RangeQueryCriteria(String elementName, String start, String end, boolean inclusive)
          Constructor for the RangeQueryCriteria clas that can be used to specify both inclusive and exclusive ranges.
 
Method Summary
 String getElementName()
          Implementation of the abstract method inherited from QueryCriteria for accessing the element name to search on.
 String getEndValue()
          Accessor method for the end value of the element to search on.
 boolean getInclusive()
          Accessor method for the inclusive setting for the range.
 String getStartValue()
          Accessor method for the start value of the element to search on.
 void setElementName(String elementName)
          Implementation of the abstract method inherited from QueryCriteria for mutating the element name to search on.
 void setEndValue(String value)
          Mutator method for the end value fo the element to search on.
 void setInclusive(boolean flag)
          Mutator method for the inclusive setting for the range.
 void setStartValue(String value)
          Mutator method for the start value fo the element to search on.
 String toString()
          Implementation of the abstract method inherited from QueryCriteria for generating a human-parsable string version of the query criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeQueryCriteria

public RangeQueryCriteria()
Default constructor.


RangeQueryCriteria

public RangeQueryCriteria(String elementName,
                          String start,
                          String end)
Constructor for the RangeQuerycriteria class. Note that this default range is inclusive.

Parameters:
elementName - The name of the element to search on.
start - The start value for the range search as a String.
end - The end value for the range search as a String.

RangeQueryCriteria

public RangeQueryCriteria(String elementName,
                          String start,
                          String end,
                          boolean inclusive)
Constructor for the RangeQueryCriteria clas that can be used to specify both inclusive and exclusive ranges.

Parameters:
elementName - The name of the element to search on.
start - The start value for the range search as a String.
end - The end value for the range search as a String.
inclusive - Boolean: true for inclusive, false for exclusive.
Method Detail

getStartValue

public String getStartValue()
Accessor method for the start value of the element to search on.

Returns:
The start value of the element to search on as a String.

setStartValue

public void setStartValue(String value)
Mutator method for the start value fo the element to search on.

Parameters:
value - The start value of the range as a String.

getEndValue

public String getEndValue()
Accessor method for the end value of the element to search on.

Returns:
The end value of the element to search on as a String.

setEndValue

public void setEndValue(String value)
Mutator method for the end value fo the element to search on.

Parameters:
value - The end value of the range as a String.

getInclusive

public boolean getInclusive()
Accessor method for the inclusive setting for the range.

Returns:
The boolean inclusive/exclusive flag.

setInclusive

public void setInclusive(boolean flag)
Mutator method for the inclusive setting for the range. Note that flag should be set to true for inclusive, false for exclusive.

Parameters:
inclusive - The boolean inclusive/exclusive flag.

getElementName

public String getElementName()
Implementation of the abstract method inherited from QueryCriteria for accessing the element name to search on.

Specified by:
getElementName in class QueryCriteria
Returns:
The element name to search on as a String.

setElementName

public void setElementName(String elementName)
Implementation of the abstract method inherited from QueryCriteria for mutating the element name to search on.

Specified by:
setElementName in class QueryCriteria
Parameters:
elementName - The element name to search on as a String.

toString

public String toString()
Implementation of the abstract method inherited from QueryCriteria for generating a human-parsable string version of the query criteria. Note that the returned String follows the Lucene query language.

Specified by:
toString in class QueryCriteria
Returns:
The query as a String.


Copyright © 1999-2011 Apache OODT. All Rights Reserved.