Skip to content

Commit 8977001

Browse files
committed
cleaned up some printing
1 parent 5a7c358 commit 8977001

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/org/sharrissf/sample/EhcacheSearchPlaying.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ public void runTests() throws IOException {
108108

109109
read();
110110

111+
System.out.println("Find the average age of all people between 30 and 40");
112+
113+
Query agesBetween = cache.createQuery();
114+
agesBetween.add(age.between(30, 40));
115+
agesBetween.includeAggregator(new Average(), age);
116+
System.out.println("Average age between 30 and 40: " + agesBetween.execute().aggregateResult());
117+
118+
read();
119+
111120
System.out.println("Find the count of people from NJ");
112121

113122
Query newJerseyCountQuery = cache.createQuery().add(state.eq("NJ"));

0 commit comments

Comments
 (0)