com.hazelcast.query.impl
Class QueryEntry

java.lang.Object
  extended by com.hazelcast.query.impl.QueryEntry
All Implemented Interfaces:
QueryableEntry, QueryResultEntry, Map.Entry

public class QueryEntry
extends Object
implements QueryableEntry

Entry of the Query.


Constructor Summary
QueryEntry()
           
QueryEntry(SerializationService serializationService, Data indexKey, Object key, Object value)
           
 
Method Summary
 boolean equals(Object o)
           
 Comparable getAttribute(String attributeName)
           
 AttributeType getAttributeType(String attributeName)
           
 Data getIndexKey()
           
 Object getKey()
           
 Data getKeyData()
           
 Object getValue()
           
 Data getValueData()
           
 int hashCode()
           
 void init(SerializationService serializationService, Data indexKey, Object key, Object value)
          It may be useful to use this init method in some cases that same instance of this class can be used instead of creating a new one for every iteration when scanning large data sets, for example:
 boolean isKey(String attributeName)
           
 Object setValue(Object value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryEntry

public QueryEntry()

QueryEntry

public QueryEntry(SerializationService serializationService,
                  Data indexKey,
                  Object key,
                  Object value)
Method Detail

init

public void init(SerializationService serializationService,
                 Data indexKey,
                 Object key,
                 Object value)
It may be useful to use this init method in some cases that same instance of this class can be used instead of creating a new one for every iteration when scanning large data sets, for example:
 Predicate predicate = ...
 QueryEntry entry = new QueryEntry()
 for(i == 0; i < HUGE_NUMBER; i++) {
       entry.init(...)
       boolean valid = predicate.apply(queryEntry);

       if(valid) {
          ....
       }
  }
 
 


getValue

public Object getValue()
Specified by:
getValue in interface QueryableEntry
Specified by:
getValue in interface Map.Entry

getKey

public Object getKey()
Specified by:
getKey in interface QueryableEntry
Specified by:
getKey in interface Map.Entry

getAttribute

public Comparable getAttribute(String attributeName)
                        throws QueryException
Specified by:
getAttribute in interface QueryableEntry
Throws:
QueryException

getAttributeType

public AttributeType getAttributeType(String attributeName)
Specified by:
getAttributeType in interface QueryableEntry

isKey

public boolean isKey(String attributeName)

getKeyData

public Data getKeyData()
Specified by:
getKeyData in interface QueryResultEntry

getValueData

public Data getValueData()
Specified by:
getValueData in interface QueryResultEntry

getIndexKey

public Data getIndexKey()
Specified by:
getIndexKey in interface QueryResultEntry

setValue

public Object setValue(Object value)
Specified by:
setValue in interface Map.Entry

equals

public boolean equals(Object o)
Specified by:
equals in interface Map.Entry
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map.Entry
Overrides:
hashCode in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.