org.apache.blur.thrift.generated
Class Query

java.lang.Object
  extended by org.apache.blur.thrift.generated.Query
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Query>, TBase<Query,Query._Fields>

public class Query
extends Object
implements TBase<Query,Query._Fields>, Serializable, Cloneable

The Query object holds the query string (normal Lucene syntax), filters and type of scoring (used when super query is on).

See Also:
Serialized Form

Nested Class Summary
static class Query._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
static Map<Query._Fields,FieldMetaData> metaDataMap
           
 String query
          A Lucene syntax based query.
 String recordFilter
          The Record filter (normal Lucene syntax), is a filter performed before the join to filter out Records from the results.
 String rowFilter
          The Row filter (normal Lucene syntax), is a filter performed after the join to filter out entire Rows from the results.
 boolean rowQuery
          If the Row query is on, meaning the query will be perform against all the Records (joining records in some cases) and the result will be Rows (groupings of Record).
 ScoreType scoreType
          The scoring type, see the document on ScoreType for explanation of each score type.
 
Constructor Summary
Query()
           
Query(Query other)
          Performs a deep copy on other.
Query(String query, boolean rowQuery, ScoreType scoreType, String rowFilter, String recordFilter)
           
 
Method Summary
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(Query other)
           
 Query deepCopy()
           
 boolean equals(Object that)
           
 boolean equals(Query that)
           
 Query._Fields fieldForId(int fieldId)
          Get the F instance that corresponds to fieldId.
 Object getFieldValue(Query._Fields field)
          Get a field's value by field variable.
 String getQuery()
          A Lucene syntax based query.
 String getRecordFilter()
          The Record filter (normal Lucene syntax), is a filter performed before the join to filter out Records from the results.
 String getRowFilter()
          The Row filter (normal Lucene syntax), is a filter performed after the join to filter out entire Rows from the results.
 ScoreType getScoreType()
          The scoring type, see the document on ScoreType for explanation of each score type.
 int hashCode()
           
 boolean isRowQuery()
          If the Row query is on, meaning the query will be perform against all the Records (joining records in some cases) and the result will be Rows (groupings of Record).
 boolean isSet(Query._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetQuery()
          Returns true if field query is set (has been assigned a value) and false otherwise
 boolean isSetRecordFilter()
          Returns true if field recordFilter is set (has been assigned a value) and false otherwise
 boolean isSetRowFilter()
          Returns true if field rowFilter is set (has been assigned a value) and false otherwise
 boolean isSetRowQuery()
          Returns true if field rowQuery is set (has been assigned a value) and false otherwise
 boolean isSetScoreType()
          Returns true if field scoreType is set (has been assigned a value) and false otherwise
 void read(TProtocol iprot)
          Reads the TObject from the given input protocol.
 void setFieldValue(Query._Fields field, Object value)
          Set a field's value by field variable.
 Query setQuery(String query)
          A Lucene syntax based query.
 void setQueryIsSet(boolean value)
           
 Query setRecordFilter(String recordFilter)
          The Record filter (normal Lucene syntax), is a filter performed before the join to filter out Records from the results.
 void setRecordFilterIsSet(boolean value)
           
 Query setRowFilter(String rowFilter)
          The Row filter (normal Lucene syntax), is a filter performed after the join to filter out entire Rows from the results.
 void setRowFilterIsSet(boolean value)
           
 Query setRowQuery(boolean rowQuery)
          If the Row query is on, meaning the query will be perform against all the Records (joining records in some cases) and the result will be Rows (groupings of Record).
 void setRowQueryIsSet(boolean value)
           
 Query setScoreType(ScoreType scoreType)
          The scoring type, see the document on ScoreType for explanation of each score type.
 void setScoreTypeIsSet(boolean value)
           
 String toString()
           
 void unsetQuery()
           
 void unsetRecordFilter()
           
 void unsetRowFilter()
           
 void unsetRowQuery()
           
 void unsetScoreType()
           
 void validate()
           
 void write(TProtocol oprot)
          Writes the objects out to the protocol
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

query

public String query
A Lucene syntax based query.


rowQuery

public boolean rowQuery
If the Row query is on, meaning the query will be perform against all the Records (joining records in some cases) and the result will be Rows (groupings of Record).


scoreType

public ScoreType scoreType
The scoring type, see the document on ScoreType for explanation of each score type.

See Also:
ScoreType

rowFilter

public String rowFilter
The Row filter (normal Lucene syntax), is a filter performed after the join to filter out entire Rows from the results. This field is ignored when rowQuery is false.


recordFilter

public String recordFilter
The Record filter (normal Lucene syntax), is a filter performed before the join to filter out Records from the results.


metaDataMap

public static final Map<Query._Fields,FieldMetaData> metaDataMap
Constructor Detail

Query

public Query()

Query

public Query(String query,
             boolean rowQuery,
             ScoreType scoreType,
             String rowFilter,
             String recordFilter)

Query

public Query(Query other)
Performs a deep copy on other.

Method Detail

deepCopy

public Query deepCopy()
Specified by:
deepCopy in interface TBase<Query,Query._Fields>

clear

public void clear()
Description copied from interface: TBase
Return to the state of having just been initialized, as though you had just called the default constructor.

Specified by:
clear in interface TBase<Query,Query._Fields>

getQuery

public String getQuery()
A Lucene syntax based query.


setQuery

public Query setQuery(String query)
A Lucene syntax based query.


unsetQuery

public void unsetQuery()

isSetQuery

public boolean isSetQuery()
Returns true if field query is set (has been assigned a value) and false otherwise


setQueryIsSet

public void setQueryIsSet(boolean value)

isRowQuery

public boolean isRowQuery()
If the Row query is on, meaning the query will be perform against all the Records (joining records in some cases) and the result will be Rows (groupings of Record).


setRowQuery

public Query setRowQuery(boolean rowQuery)
If the Row query is on, meaning the query will be perform against all the Records (joining records in some cases) and the result will be Rows (groupings of Record).


unsetRowQuery

public void unsetRowQuery()

isSetRowQuery

public boolean isSetRowQuery()
Returns true if field rowQuery is set (has been assigned a value) and false otherwise


setRowQueryIsSet

public void setRowQueryIsSet(boolean value)

getScoreType

public ScoreType getScoreType()
The scoring type, see the document on ScoreType for explanation of each score type.

See Also:
ScoreType

setScoreType

public Query setScoreType(ScoreType scoreType)
The scoring type, see the document on ScoreType for explanation of each score type.

See Also:
ScoreType

unsetScoreType

public void unsetScoreType()

isSetScoreType

public boolean isSetScoreType()
Returns true if field scoreType is set (has been assigned a value) and false otherwise


setScoreTypeIsSet

public void setScoreTypeIsSet(boolean value)

getRowFilter

public String getRowFilter()
The Row filter (normal Lucene syntax), is a filter performed after the join to filter out entire Rows from the results. This field is ignored when rowQuery is false.


setRowFilter

public Query setRowFilter(String rowFilter)
The Row filter (normal Lucene syntax), is a filter performed after the join to filter out entire Rows from the results. This field is ignored when rowQuery is false.


unsetRowFilter

public void unsetRowFilter()

isSetRowFilter

public boolean isSetRowFilter()
Returns true if field rowFilter is set (has been assigned a value) and false otherwise


setRowFilterIsSet

public void setRowFilterIsSet(boolean value)

getRecordFilter

public String getRecordFilter()
The Record filter (normal Lucene syntax), is a filter performed before the join to filter out Records from the results.


setRecordFilter

public Query setRecordFilter(String recordFilter)
The Record filter (normal Lucene syntax), is a filter performed before the join to filter out Records from the results.


unsetRecordFilter

public void unsetRecordFilter()

isSetRecordFilter

public boolean isSetRecordFilter()
Returns true if field recordFilter is set (has been assigned a value) and false otherwise


setRecordFilterIsSet

public void setRecordFilterIsSet(boolean value)

setFieldValue

public void setFieldValue(Query._Fields field,
                          Object value)
Description copied from interface: TBase
Set a field's value by field variable. Primitive types must be "boxed" in the appropriate object wrapper type.

Specified by:
setFieldValue in interface TBase<Query,Query._Fields>

getFieldValue

public Object getFieldValue(Query._Fields field)
Description copied from interface: TBase
Get a field's value by field variable. Primitive types will be wrapped in the appropriate "boxed" types.

Specified by:
getFieldValue in interface TBase<Query,Query._Fields>

isSet

public boolean isSet(Query._Fields field)
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise

Specified by:
isSet in interface TBase<Query,Query._Fields>

equals

public boolean equals(Object that)
Overrides:
equals in class Object

equals

public boolean equals(Query that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Query other)
Specified by:
compareTo in interface Comparable<Query>

fieldForId

public Query._Fields fieldForId(int fieldId)
Description copied from interface: TBase
Get the F instance that corresponds to fieldId.

Specified by:
fieldForId in interface TBase<Query,Query._Fields>

read

public void read(TProtocol iprot)
          throws TException
Description copied from interface: TBase
Reads the TObject from the given input protocol.

Specified by:
read in interface TBase<Query,Query._Fields>
Parameters:
iprot - Input protocol
Throws:
TException

write

public void write(TProtocol oprot)
           throws TException
Description copied from interface: TBase
Writes the objects out to the protocol

Specified by:
write in interface TBase<Query,Query._Fields>
Parameters:
oprot - Output protocol
Throws:
TException

toString

public String toString()
Overrides:
toString in class Object

validate

public void validate()
              throws TException
Throws:
TException


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.