org.apache.blur.thrift.generated
Class BlurQuery

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

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

The Blur Query object that contains the query that needs to be executed along with the query options.

See Also:
Serialized Form

Nested Class Summary
static class BlurQuery._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 boolean cacheResult
          Enabled by default to cache this result.
 List<Facet> facets
          A list of Facets to execute with the given query.
 int fetch
          The number of fetched results, 10 by default.
 long maxQueryTime
          The maximum amount of time the query should execute before timing out.
static Map<BlurQuery._Fields,FieldMetaData> metaDataMap
           
 long minimumNumberOfResults
          The minimum number of results to find before returning.
 Query query
          The query information.
 String rowId
          Optional optimization for record queries to run against a single row.
 Selector selector
          Selector is used to fetch data in the search results, if null only location ids will be fetched.
 List<SortField> sortFields
          The sortfields are applied in order to sort the results.
 long start
          The starting result position, 0 by default.
 long startTime
          Sets the start time, if 0 the controller sets the time.
 boolean useCacheIfPresent
          Enabled by default to use a cached result if the query matches a previous run query with the configured amount of time.
 String userContext
          Sets a user context, only used for logging at this point.
 String uuid
          Sets the uuid of this query, this is normal set by the client so that the status of a running query can be found or the query can be canceled.
 
Constructor Summary
BlurQuery()
           
BlurQuery(BlurQuery other)
          Performs a deep copy on other.
BlurQuery(Query query, List<Facet> facets, Selector selector, boolean useCacheIfPresent, long start, int fetch, long minimumNumberOfResults, long maxQueryTime, String uuid, String userContext, boolean cacheResult, long startTime, List<SortField> sortFields, String rowId)
           
 
Method Summary
 void addToFacets(Facet elem)
           
 void addToSortFields(SortField elem)
           
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(BlurQuery other)
           
 BlurQuery deepCopy()
           
 boolean equals(BlurQuery that)
           
 boolean equals(Object that)
           
 BlurQuery._Fields fieldForId(int fieldId)
          Get the F instance that corresponds to fieldId.
 List<Facet> getFacets()
          A list of Facets to execute with the given query.
 Iterator<Facet> getFacetsIterator()
           
 int getFacetsSize()
           
 int getFetch()
          The number of fetched results, 10 by default.
 Object getFieldValue(BlurQuery._Fields field)
          Get a field's value by field variable.
 long getMaxQueryTime()
          The maximum amount of time the query should execute before timing out.
 long getMinimumNumberOfResults()
          The minimum number of results to find before returning.
 Query getQuery()
          The query information.
 String getRowId()
          Optional optimization for record queries to run against a single row.
 Selector getSelector()
          Selector is used to fetch data in the search results, if null only location ids will be fetched.
 List<SortField> getSortFields()
          The sortfields are applied in order to sort the results.
 Iterator<SortField> getSortFieldsIterator()
           
 int getSortFieldsSize()
           
 long getStart()
          The starting result position, 0 by default.
 long getStartTime()
          Sets the start time, if 0 the controller sets the time.
 String getUserContext()
          Sets a user context, only used for logging at this point.
 String getUuid()
          Sets the uuid of this query, this is normal set by the client so that the status of a running query can be found or the query can be canceled.
 int hashCode()
           
 boolean isCacheResult()
          Enabled by default to cache this result.
 boolean isSet(BlurQuery._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetCacheResult()
          Returns true if field cacheResult is set (has been assigned a value) and false otherwise
 boolean isSetFacets()
          Returns true if field facets is set (has been assigned a value) and false otherwise
 boolean isSetFetch()
          Returns true if field fetch is set (has been assigned a value) and false otherwise
 boolean isSetMaxQueryTime()
          Returns true if field maxQueryTime is set (has been assigned a value) and false otherwise
 boolean isSetMinimumNumberOfResults()
          Returns true if field minimumNumberOfResults 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 isSetRowId()
          Returns true if field rowId is set (has been assigned a value) and false otherwise
 boolean isSetSelector()
          Returns true if field selector is set (has been assigned a value) and false otherwise
 boolean isSetSortFields()
          Returns true if field sortFields is set (has been assigned a value) and false otherwise
 boolean isSetStart()
          Returns true if field start is set (has been assigned a value) and false otherwise
 boolean isSetStartTime()
          Returns true if field startTime is set (has been assigned a value) and false otherwise
 boolean isSetUseCacheIfPresent()
          Returns true if field useCacheIfPresent is set (has been assigned a value) and false otherwise
 boolean isSetUserContext()
          Returns true if field userContext is set (has been assigned a value) and false otherwise
 boolean isSetUuid()
          Returns true if field uuid is set (has been assigned a value) and false otherwise
 boolean isUseCacheIfPresent()
          Enabled by default to use a cached result if the query matches a previous run query with the configured amount of time.
 void read(TProtocol iprot)
          Reads the TObject from the given input protocol.
 BlurQuery setCacheResult(boolean cacheResult)
          Enabled by default to cache this result.
 void setCacheResultIsSet(boolean value)
           
 BlurQuery setFacets(List<Facet> facets)
          A list of Facets to execute with the given query.
 void setFacetsIsSet(boolean value)
           
 BlurQuery setFetch(int fetch)
          The number of fetched results, 10 by default.
 void setFetchIsSet(boolean value)
           
 void setFieldValue(BlurQuery._Fields field, Object value)
          Set a field's value by field variable.
 BlurQuery setMaxQueryTime(long maxQueryTime)
          The maximum amount of time the query should execute before timing out.
 void setMaxQueryTimeIsSet(boolean value)
           
 BlurQuery setMinimumNumberOfResults(long minimumNumberOfResults)
          The minimum number of results to find before returning.
 void setMinimumNumberOfResultsIsSet(boolean value)
           
 BlurQuery setQuery(Query query)
          The query information.
 void setQueryIsSet(boolean value)
           
 BlurQuery setRowId(String rowId)
          Optional optimization for record queries to run against a single row.
 void setRowIdIsSet(boolean value)
           
 BlurQuery setSelector(Selector selector)
          Selector is used to fetch data in the search results, if null only location ids will be fetched.
 void setSelectorIsSet(boolean value)
           
 BlurQuery setSortFields(List<SortField> sortFields)
          The sortfields are applied in order to sort the results.
 void setSortFieldsIsSet(boolean value)
           
 BlurQuery setStart(long start)
          The starting result position, 0 by default.
 void setStartIsSet(boolean value)
           
 BlurQuery setStartTime(long startTime)
          Sets the start time, if 0 the controller sets the time.
 void setStartTimeIsSet(boolean value)
           
 BlurQuery setUseCacheIfPresent(boolean useCacheIfPresent)
          Enabled by default to use a cached result if the query matches a previous run query with the configured amount of time.
 void setUseCacheIfPresentIsSet(boolean value)
           
 BlurQuery setUserContext(String userContext)
          Sets a user context, only used for logging at this point.
 void setUserContextIsSet(boolean value)
           
 BlurQuery setUuid(String uuid)
          Sets the uuid of this query, this is normal set by the client so that the status of a running query can be found or the query can be canceled.
 void setUuidIsSet(boolean value)
           
 String toString()
           
 void unsetCacheResult()
           
 void unsetFacets()
           
 void unsetFetch()
           
 void unsetMaxQueryTime()
           
 void unsetMinimumNumberOfResults()
           
 void unsetQuery()
           
 void unsetRowId()
           
 void unsetSelector()
           
 void unsetSortFields()
           
 void unsetStart()
           
 void unsetStartTime()
           
 void unsetUseCacheIfPresent()
           
 void unsetUserContext()
           
 void unsetUuid()
           
 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 Query query
The query information.


facets

public List<Facet> facets
A list of Facets to execute with the given query.


selector

public Selector selector
Selector is used to fetch data in the search results, if null only location ids will be fetched.


useCacheIfPresent

public boolean useCacheIfPresent
Enabled by default to use a cached result if the query matches a previous run query with the configured amount of time.


start

public long start
The starting result position, 0 by default.


fetch

public int fetch
The number of fetched results, 10 by default.


minimumNumberOfResults

public long minimumNumberOfResults
The minimum number of results to find before returning.


maxQueryTime

public long maxQueryTime
The maximum amount of time the query should execute before timing out.


uuid

public String uuid
Sets the uuid of this query, this is normal set by the client so that the status of a running query can be found or the query can be canceled.


userContext

public String userContext
Sets a user context, only used for logging at this point.


cacheResult

public boolean cacheResult
Enabled by default to cache this result. False would not cache the result.


startTime

public long startTime
Sets the start time, if 0 the controller sets the time.


sortFields

public List<SortField> sortFields
The sortfields are applied in order to sort the results.


rowId

public String rowId
Optional optimization for record queries to run against a single row. This will allow the query to be executed on one and only one shard in the cluster.


metaDataMap

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

BlurQuery

public BlurQuery()

BlurQuery

public BlurQuery(Query query,
                 List<Facet> facets,
                 Selector selector,
                 boolean useCacheIfPresent,
                 long start,
                 int fetch,
                 long minimumNumberOfResults,
                 long maxQueryTime,
                 String uuid,
                 String userContext,
                 boolean cacheResult,
                 long startTime,
                 List<SortField> sortFields,
                 String rowId)

BlurQuery

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

Method Detail

deepCopy

public BlurQuery deepCopy()
Specified by:
deepCopy in interface TBase<BlurQuery,BlurQuery._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<BlurQuery,BlurQuery._Fields>

getQuery

public Query getQuery()
The query information.


setQuery

public BlurQuery setQuery(Query query)
The query information.


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)

getFacetsSize

public int getFacetsSize()

getFacetsIterator

public Iterator<Facet> getFacetsIterator()

addToFacets

public void addToFacets(Facet elem)

getFacets

public List<Facet> getFacets()
A list of Facets to execute with the given query.


setFacets

public BlurQuery setFacets(List<Facet> facets)
A list of Facets to execute with the given query.


unsetFacets

public void unsetFacets()

isSetFacets

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


setFacetsIsSet

public void setFacetsIsSet(boolean value)

getSelector

public Selector getSelector()
Selector is used to fetch data in the search results, if null only location ids will be fetched.


setSelector

public BlurQuery setSelector(Selector selector)
Selector is used to fetch data in the search results, if null only location ids will be fetched.


unsetSelector

public void unsetSelector()

isSetSelector

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


setSelectorIsSet

public void setSelectorIsSet(boolean value)

isUseCacheIfPresent

public boolean isUseCacheIfPresent()
Enabled by default to use a cached result if the query matches a previous run query with the configured amount of time.


setUseCacheIfPresent

public BlurQuery setUseCacheIfPresent(boolean useCacheIfPresent)
Enabled by default to use a cached result if the query matches a previous run query with the configured amount of time.


unsetUseCacheIfPresent

public void unsetUseCacheIfPresent()

isSetUseCacheIfPresent

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


setUseCacheIfPresentIsSet

public void setUseCacheIfPresentIsSet(boolean value)

getStart

public long getStart()
The starting result position, 0 by default.


setStart

public BlurQuery setStart(long start)
The starting result position, 0 by default.


unsetStart

public void unsetStart()

isSetStart

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


setStartIsSet

public void setStartIsSet(boolean value)

getFetch

public int getFetch()
The number of fetched results, 10 by default.


setFetch

public BlurQuery setFetch(int fetch)
The number of fetched results, 10 by default.


unsetFetch

public void unsetFetch()

isSetFetch

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


setFetchIsSet

public void setFetchIsSet(boolean value)

getMinimumNumberOfResults

public long getMinimumNumberOfResults()
The minimum number of results to find before returning.


setMinimumNumberOfResults

public BlurQuery setMinimumNumberOfResults(long minimumNumberOfResults)
The minimum number of results to find before returning.


unsetMinimumNumberOfResults

public void unsetMinimumNumberOfResults()

isSetMinimumNumberOfResults

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


setMinimumNumberOfResultsIsSet

public void setMinimumNumberOfResultsIsSet(boolean value)

getMaxQueryTime

public long getMaxQueryTime()
The maximum amount of time the query should execute before timing out.


setMaxQueryTime

public BlurQuery setMaxQueryTime(long maxQueryTime)
The maximum amount of time the query should execute before timing out.


unsetMaxQueryTime

public void unsetMaxQueryTime()

isSetMaxQueryTime

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


setMaxQueryTimeIsSet

public void setMaxQueryTimeIsSet(boolean value)

getUuid

public String getUuid()
Sets the uuid of this query, this is normal set by the client so that the status of a running query can be found or the query can be canceled.


setUuid

public BlurQuery setUuid(String uuid)
Sets the uuid of this query, this is normal set by the client so that the status of a running query can be found or the query can be canceled.


unsetUuid

public void unsetUuid()

isSetUuid

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


setUuidIsSet

public void setUuidIsSet(boolean value)

getUserContext

public String getUserContext()
Sets a user context, only used for logging at this point.


setUserContext

public BlurQuery setUserContext(String userContext)
Sets a user context, only used for logging at this point.


unsetUserContext

public void unsetUserContext()

isSetUserContext

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


setUserContextIsSet

public void setUserContextIsSet(boolean value)

isCacheResult

public boolean isCacheResult()
Enabled by default to cache this result. False would not cache the result.


setCacheResult

public BlurQuery setCacheResult(boolean cacheResult)
Enabled by default to cache this result. False would not cache the result.


unsetCacheResult

public void unsetCacheResult()

isSetCacheResult

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


setCacheResultIsSet

public void setCacheResultIsSet(boolean value)

getStartTime

public long getStartTime()
Sets the start time, if 0 the controller sets the time.


setStartTime

public BlurQuery setStartTime(long startTime)
Sets the start time, if 0 the controller sets the time.


unsetStartTime

public void unsetStartTime()

isSetStartTime

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


setStartTimeIsSet

public void setStartTimeIsSet(boolean value)

getSortFieldsSize

public int getSortFieldsSize()

getSortFieldsIterator

public Iterator<SortField> getSortFieldsIterator()

addToSortFields

public void addToSortFields(SortField elem)

getSortFields

public List<SortField> getSortFields()
The sortfields are applied in order to sort the results.


setSortFields

public BlurQuery setSortFields(List<SortField> sortFields)
The sortfields are applied in order to sort the results.


unsetSortFields

public void unsetSortFields()

isSetSortFields

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


setSortFieldsIsSet

public void setSortFieldsIsSet(boolean value)

getRowId

public String getRowId()
Optional optimization for record queries to run against a single row. This will allow the query to be executed on one and only one shard in the cluster.


setRowId

public BlurQuery setRowId(String rowId)
Optional optimization for record queries to run against a single row. This will allow the query to be executed on one and only one shard in the cluster.


unsetRowId

public void unsetRowId()

isSetRowId

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


setRowIdIsSet

public void setRowIdIsSet(boolean value)

setFieldValue

public void setFieldValue(BlurQuery._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<BlurQuery,BlurQuery._Fields>

getFieldValue

public Object getFieldValue(BlurQuery._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<BlurQuery,BlurQuery._Fields>

isSet

public boolean isSet(BlurQuery._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<BlurQuery,BlurQuery._Fields>

equals

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

equals

public boolean equals(BlurQuery that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

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

fieldForId

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

Specified by:
fieldForId in interface TBase<BlurQuery,BlurQuery._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<BlurQuery,BlurQuery._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<BlurQuery,BlurQuery._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.