text: Querying Maps with the Predicate API
  The Predicates API offers built-in methods for creating queries as well as an
  sql() method for SQL-like queries.
  Assume that you have a map called
  employee that contains values of
  Employee objects:
  public class Employee implements Serializable { private String name; private int age; private boolean active; private double salary; public Employee(String name, int age, boolean active, double salary) { this.name = name; this.age = age; this.active = active; this.salary = salary; } public Employee() { } public String getName() { return name; } public int getAge() { return age; } public double getSalary() { return salary; } public boolean isActive() { return active; } }
  Now let’s look for the employees who are active and have an age less than 30.
  IMap<String, Employee> map = hazelcastInstance.getMap( "employee" ); EntryObject e = Predicates.newPredicateBuilder().getEntryObject(); Predicate predicate = e.is( "active" ).and( e.get( "age" ).lessThan( 30 ) ); Collection.-like PredicatesValue objects both as keys and values where possible. Otherwise,
  number types are treated
  as
  double.
  It is possible to query nested attributes and arrays in JSON documents, using the Predicates API. that are added to maps. Adding an invalid JSON string in a map is
  permissible. However, in that case
  whether such an entry is going to be returned or not from a query is not defined.
  Metadata Creation for JSON Querying
  By default, for each
  HazelcastJsonValue object stored in a map, Hazelcast also stores a metadata object, which helps you to query these objects faster.
  This metadata object is created every time
  a
  HazelcastJsonValue is put into a map()method is called, the first page is fetched.
  Finally, the subsequent page is fetched by calling the =.
  Configuring the.
  Next Steps
  Keep an up-to-date record of query results, using a continuous query cache.
  Create more complex queries with custom attributes.