org.apache.gora.avro.query
Class AvroResult<K,T extends PersistentBase>

java.lang.Object
  extended by org.apache.gora.query.impl.ResultBase<K,T>
      extended by org.apache.gora.avro.query.AvroResult<K,T>
All Implemented Interfaces:
Result<K,T>

public class AvroResult<K,T extends PersistentBase>
extends ResultBase<K,T>

Adapter to convert DatumReader to Result.


Field Summary
 
Fields inherited from class org.apache.gora.query.impl.ResultBase
dataStore, key, limit, offset, persistent, query
 
Constructor Summary
AvroResult(AvroStore<K,T> dataStore, AvroQuery<K,T> query, org.apache.avro.io.DatumReader<T> reader, org.apache.avro.io.Decoder decoder)
           
 
Method Summary
 void close()
           
 float getProgress()
          Returns how far along the result has iterated, a value between 0 and 1.
 boolean nextInner()
          ResultBase.next() calls this function to read the actual results.
 
Methods inherited from class org.apache.gora.query.impl.ResultBase
clear, get, getDataStore, getKey, getKeyClass, getOffset, getOrCreatePersistent, getPersistentClass, getQuery, isLimitReached, next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AvroResult

public AvroResult(AvroStore<K,T> dataStore,
                  AvroQuery<K,T> query,
                  org.apache.avro.io.DatumReader<T> reader,
                  org.apache.avro.io.Decoder decoder)
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Result<K,T extends PersistentBase>
Overrides:
close in class ResultBase<K,T extends PersistentBase>
Throws:
IOException

getProgress

public float getProgress()
                  throws IOException
Description copied from interface: Result
Returns how far along the result has iterated, a value between 0 and 1.

Throws:
IOException

nextInner

public boolean nextInner()
                  throws IOException
Description copied from class: ResultBase
ResultBase.next() calls this function to read the actual results.

Specified by:
nextInner in class ResultBase<K,T extends PersistentBase>
Throws:
IOException


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.