public boolean hasNext() {
return iter.hasNext();
}
public Object next() {
QueryResultEntry entry = iter.next();
if (iterType == IterationType.VALUE) {
Data valueData = entry.getValueData();
return (data) ? valueData : serializationService.toObject(valueData);
} else if (iterType == IterationType.KEY) {
Data keyData = entry.getKeyData();
return (data) ? keyData : serializationService.toObject(keyData);
} else {
Data keyData = entry.getKeyData();
Data valueData = entry.getValueData();
if (data) {
return new AbstractMap.SimpleImmutableEntry(keyData, valueData);
} else {
Object key = serializationService.toObject(keyData);
Object value = serializationService.toObject(valueData);