@Test public void generateQueryWithUntilDateAndBlackList() throws Exception { Date untilDate = new Date(1000000000000L); NotificationParameters parameters = new NotificationParameters(); parameters.user = USER_REFERENCE; parameters.format = NotificationFormat.ALERT; parameters.endDate = untilDate; parameters.blackList = Arrays.asList("event1", "event2"); parameters.preferences = Arrays.asList(pref1); parameters.filterPreferences = Arrays.asList(fakeFilterPreference); SimpleEventQuery query = this.generator.generateQuery(parameters); Iterator<QueryCondition> conditions = query.getConditions().iterator(); assertEquals(new CompareQueryCondition(Event.FIELD_TYPE, "create", CompareType.EQUALS, false), conditions.next()); assertEquals( new CompareQueryCondition(Event.FIELD_DATE, this.pref1StartDate, CompareType.GREATER_OR_EQUALS, false), conditions.next()); assertEquals(new InQueryCondition(true, Event.FIELD_ID, Arrays.asList("event1", "event2")), conditions.next()); assertEquals(new CompareQueryCondition(Event.FIELD_DATE, untilDate, CompareType.LESS_OR_EQUALS, false), conditions.next()); assertEquals(new CompareQueryCondition(Event.FIELD_HIDDEN, true, CompareType.EQUALS, true), conditions.next()); List<SortClause> sortClause = query.getSorts(); assertEquals(new SortClause(Event.FIELD_DATE, Order.DESC), sortClause.get(0)); }
public SimpleEventQuery generateQuery(NotificationParameters parameters) throws EventStreamException { return this.eventQueryConverter.parse(this.expressionGenerator.generateQueryExpression(parameters)); }
EventQueryGenerator { public SimpleEventQuery generateQuery(NotificationParameters parameters) throws EventStreamException { return this.eventQueryConverter.parse(this.expressionGenerator.generateQueryExpression(parameters)); } }
EventQueryGenerator { public SimpleEventQuery generateQuery(NotificationParameters parameters) throws EventStreamException { return this.eventQueryConverter.parse(this.expressionGenerator.generateQueryExpression(parameters)); }  }
EventQueryGenerator { public SimpleEventQuery generateQuery(NotificationParameters parameters) throws EventStreamException { return this.eventQueryConverter.parse(this.expressionGenerator.generateQueryExpression(parameters)); }  SimpleEventQuery generateQuery(NotificationParameters parameters); }
EventQueryGenerator { public SimpleEventQuery generateQuery(NotificationParameters parameters) throws EventStreamException { return this.eventQueryConverter.parse(this.expressionGenerator.generateQueryExpression(parameters)); }  SimpleEventQuery generateQuery(NotificationParameters parameters);  }