org.apache.blur.thrift.generated
Class BlurResults

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

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

BlurResults holds all information resulting from a query.

See Also:
Serialized Form

Nested Class Summary
static class BlurResults._Fields
          The set of fields this struct contains, along with convenience methods for finding and manipulating them.
 
Field Summary
 List<BlurException> exceptions
          Not currently used, a future feature could allow for partial results with errors.
 List<Long> facetCounts
          The faceted count.
static Map<BlurResults._Fields,FieldMetaData> metaDataMap
           
 BlurQuery query
          The original query.
 List<BlurResult> results
          The query results.
 Map<String,Long> shardInfo
          Hit counts from each shard in the table.
 long totalResults
          The total number of hits in the query.
 
Constructor Summary
BlurResults()
           
BlurResults(BlurResults other)
          Performs a deep copy on other.
BlurResults(long totalResults, Map<String,Long> shardInfo, List<BlurResult> results, List<Long> facetCounts, List<BlurException> exceptions, BlurQuery query)
           
 
Method Summary
 void addToExceptions(BlurException elem)
           
 void addToFacetCounts(long elem)
           
 void addToResults(BlurResult elem)
           
 void clear()
          Return to the state of having just been initialized, as though you had just called the default constructor.
 int compareTo(BlurResults other)
           
 BlurResults deepCopy()
           
 boolean equals(BlurResults that)
           
 boolean equals(Object that)
           
 BlurResults._Fields fieldForId(int fieldId)
          Get the F instance that corresponds to fieldId.
 List<BlurException> getExceptions()
          Not currently used, a future feature could allow for partial results with errors.
 Iterator<BlurException> getExceptionsIterator()
           
 int getExceptionsSize()
           
 List<Long> getFacetCounts()
          The faceted count.
 Iterator<Long> getFacetCountsIterator()
           
 int getFacetCountsSize()
           
 Object getFieldValue(BlurResults._Fields field)
          Get a field's value by field variable.
 BlurQuery getQuery()
          The original query.
 List<BlurResult> getResults()
          The query results.
 Iterator<BlurResult> getResultsIterator()
           
 int getResultsSize()
           
 Map<String,Long> getShardInfo()
          Hit counts from each shard in the table.
 int getShardInfoSize()
           
 long getTotalResults()
          The total number of hits in the query.
 int hashCode()
           
 boolean isSet(BlurResults._Fields field)
          Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
 boolean isSetExceptions()
          Returns true if field exceptions is set (has been assigned a value) and false otherwise
 boolean isSetFacetCounts()
          Returns true if field facetCounts 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 isSetResults()
          Returns true if field results is set (has been assigned a value) and false otherwise
 boolean isSetShardInfo()
          Returns true if field shardInfo is set (has been assigned a value) and false otherwise
 boolean isSetTotalResults()
          Returns true if field totalResults is set (has been assigned a value) and false otherwise
 void putToShardInfo(String key, long val)
           
 void read(TProtocol iprot)
          Reads the TObject from the given input protocol.
 BlurResults setExceptions(List<BlurException> exceptions)
          Not currently used, a future feature could allow for partial results with errors.
 void setExceptionsIsSet(boolean value)
           
 BlurResults setFacetCounts(List<Long> facetCounts)
          The faceted count.
 void setFacetCountsIsSet(boolean value)
           
 void setFieldValue(BlurResults._Fields field, Object value)
          Set a field's value by field variable.
 BlurResults setQuery(BlurQuery query)
          The original query.
 void setQueryIsSet(boolean value)
           
 BlurResults setResults(List<BlurResult> results)
          The query results.
 void setResultsIsSet(boolean value)
           
 BlurResults setShardInfo(Map<String,Long> shardInfo)
          Hit counts from each shard in the table.
 void setShardInfoIsSet(boolean value)
           
 BlurResults setTotalResults(long totalResults)
          The total number of hits in the query.
 void setTotalResultsIsSet(boolean value)
           
 String toString()
           
 void unsetExceptions()
           
 void unsetFacetCounts()
           
 void unsetQuery()
           
 void unsetResults()
           
 void unsetShardInfo()
           
 void unsetTotalResults()
           
 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

totalResults

public long totalResults
The total number of hits in the query.


shardInfo

public Map<String,Long> shardInfo
Hit counts from each shard in the table.


results

public List<BlurResult> results
The query results.


facetCounts

public List<Long> facetCounts
The faceted count.


exceptions

public List<BlurException> exceptions
Not currently used, a future feature could allow for partial results with errors.


query

public BlurQuery query
The original query.


metaDataMap

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

BlurResults

public BlurResults()

BlurResults

public BlurResults(long totalResults,
                   Map<String,Long> shardInfo,
                   List<BlurResult> results,
                   List<Long> facetCounts,
                   List<BlurException> exceptions,
                   BlurQuery query)

BlurResults

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

Method Detail

deepCopy

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

getTotalResults

public long getTotalResults()
The total number of hits in the query.


setTotalResults

public BlurResults setTotalResults(long totalResults)
The total number of hits in the query.


unsetTotalResults

public void unsetTotalResults()

isSetTotalResults

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


setTotalResultsIsSet

public void setTotalResultsIsSet(boolean value)

getShardInfoSize

public int getShardInfoSize()

putToShardInfo

public void putToShardInfo(String key,
                           long val)

getShardInfo

public Map<String,Long> getShardInfo()
Hit counts from each shard in the table.


setShardInfo

public BlurResults setShardInfo(Map<String,Long> shardInfo)
Hit counts from each shard in the table.


unsetShardInfo

public void unsetShardInfo()

isSetShardInfo

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


setShardInfoIsSet

public void setShardInfoIsSet(boolean value)

getResultsSize

public int getResultsSize()

getResultsIterator

public Iterator<BlurResult> getResultsIterator()

addToResults

public void addToResults(BlurResult elem)

getResults

public List<BlurResult> getResults()
The query results.


setResults

public BlurResults setResults(List<BlurResult> results)
The query results.


unsetResults

public void unsetResults()

isSetResults

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


setResultsIsSet

public void setResultsIsSet(boolean value)

getFacetCountsSize

public int getFacetCountsSize()

getFacetCountsIterator

public Iterator<Long> getFacetCountsIterator()

addToFacetCounts

public void addToFacetCounts(long elem)

getFacetCounts

public List<Long> getFacetCounts()
The faceted count.


setFacetCounts

public BlurResults setFacetCounts(List<Long> facetCounts)
The faceted count.


unsetFacetCounts

public void unsetFacetCounts()

isSetFacetCounts

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


setFacetCountsIsSet

public void setFacetCountsIsSet(boolean value)

getExceptionsSize

public int getExceptionsSize()

getExceptionsIterator

public Iterator<BlurException> getExceptionsIterator()

addToExceptions

public void addToExceptions(BlurException elem)

getExceptions

public List<BlurException> getExceptions()
Not currently used, a future feature could allow for partial results with errors.


setExceptions

public BlurResults setExceptions(List<BlurException> exceptions)
Not currently used, a future feature could allow for partial results with errors.


unsetExceptions

public void unsetExceptions()

isSetExceptions

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


setExceptionsIsSet

public void setExceptionsIsSet(boolean value)

getQuery

public BlurQuery getQuery()
The original query.


setQuery

public BlurResults setQuery(BlurQuery query)
The original 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)

setFieldValue

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

getFieldValue

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

isSet

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

equals

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

equals

public boolean equals(BlurResults that)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

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

fieldForId

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

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