@@ -93,7 +93,7 @@ public void runTests() throws IOException {
93
93
94
94
Query query = cache .createQuery ();
95
95
query .includeKeys ();
96
- query .add (name .like ("Ari*" ).and (gender .eq (Gender .MALE )))
96
+ query .addCriteria (name .like ("Ari*" ).and (gender .eq (Gender .MALE )))
97
97
.addOrder (age , Direction .ASCENDING ).maxResults (10 );
98
98
99
99
long t = System .currentTimeMillis ();
@@ -142,7 +142,7 @@ public void runTests() throws IOException {
142
142
.println ("Find the average age of all people between 30 and 40" );
143
143
144
144
Query agesBetween = cache .createQuery ();
145
- agesBetween .add (age .between (30 , 40 ));
145
+ agesBetween .addCriteria (age .between (30 , 40 ));
146
146
agesBetween .includeAggregator (Aggregators .average (age ));
147
147
System .out .println ("Average age between 30 and 40: "
148
148
+ agesBetween .execute ().getAggregatorResults ());
@@ -151,7 +151,7 @@ public void runTests() throws IOException {
151
151
152
152
System .out .println ("Find the count of people from NJ" );
153
153
154
- Query newJerseyCountQuery = cache .createQuery ().add (state .eq ("NJ" ));
154
+ Query newJerseyCountQuery = cache .createQuery ().addCriteria (state .eq ("NJ" ));
155
155
newJerseyCountQuery .includeAggregator (Aggregators .count ());
156
156
System .out .println ("Count of people from NJ: "
157
157
+ newJerseyCountQuery .execute ().getAggregatorResults ());
0 commit comments