public class PredicateBuilderImpl extends Object implements PredicateBuilder, PredicateBuilder.EntryObject, IndexAwarePredicate, DataSerializable
PredicateBuilder.EntryObject
Constructor and Description |
---|
PredicateBuilderImpl() |
public String getAttribute()
getAttribute
in interface PredicateBuilder
public void setAttribute(String attribute)
setAttribute
in interface PredicateBuilder
public boolean apply(Map.Entry mapEntry)
Predicate
Implementations must be thread-safe, since this method may be called by multiple threads concurrently.
public PredicateBuilder.EntryObject getEntryObject()
getEntryObject
in interface PredicateBuilder
public PredicateBuilder and(Predicate predicate)
and
in interface PredicateBuilder
public PredicateBuilder or(Predicate predicate)
or
in interface PredicateBuilder
public Set<QueryableEntry> filter(QueryContext queryContext)
IndexAwarePredicate
The query engine assumes this method produces the result set faster than a simple evaluation of the predicate on every entry.
filter
in interface IndexAwarePredicate
queryContext
- the query context to access the indexes. The passed
query context is valid only for a duration of a single
call to the method.public boolean isIndexed(QueryContext queryContext)
IndexAwarePredicate
isIndexed
in interface IndexAwarePredicate
queryContext
- the query context to consult for the available
indexes.true
if this predicate is able to use the indexes to
speed up the processing, false
otherwise.public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public PredicateBuilder.EntryObject get(String attribute)
get
in interface PredicateBuilder.EntryObject
public PredicateBuilder.EntryObject key()
key
in interface PredicateBuilder.EntryObject
public PredicateBuilder is(String attribute)
is
in interface PredicateBuilder.EntryObject
public PredicateBuilder isNot(String attribute)
isNot
in interface PredicateBuilder.EntryObject
public PredicateBuilder equal(Comparable value)
equal
in interface PredicateBuilder.EntryObject
public PredicateBuilder notEqual(Comparable value)
notEqual
in interface PredicateBuilder.EntryObject
public PredicateBuilder isNull()
isNull
in interface PredicateBuilder.EntryObject
public PredicateBuilder isNotNull()
isNotNull
in interface PredicateBuilder.EntryObject
public PredicateBuilder greaterThan(Comparable value)
greaterThan
in interface PredicateBuilder.EntryObject
public PredicateBuilder greaterEqual(Comparable value)
greaterEqual
in interface PredicateBuilder.EntryObject
public PredicateBuilder lessThan(Comparable value)
lessThan
in interface PredicateBuilder.EntryObject
public PredicateBuilder lessEqual(Comparable value)
lessEqual
in interface PredicateBuilder.EntryObject
public PredicateBuilder between(Comparable from, Comparable to)
between
in interface PredicateBuilder.EntryObject
public PredicateBuilder in(Comparable... values)
in
in interface PredicateBuilder.EntryObject
Copyright © 2019 Hazelcast, Inc.. All rights reserved.