@Test public void generateQueryExpression() throws Exception { NotificationParameters parameters = new NotificationParameters(); parameters.user = USER_REFERENCE; parameters.format = NotificationFormat.ALERT; parameters.fromDate = startDate; parameters.preferences = Arrays.asList(pref1); parameters.filterPreferences = Arrays.asList(fakeFilterPreference); ExpressionNode node = this.queryGenerator.generateQueryExpression(parameters); assertEquals("((DATE >= \"" + this.startDate.toString() + "\" " + "AND (TYPE = \"create\" AND DATE >= \"" + this.pref1StartDate.toString() + "\")) AND HIDDEN <> true) " + "ORDER BY DATE DESC", node.toString()); this.queryGenerator.generateQuery(parameters); verify(this.queryManager).createQuery("where ((" + "event.date >= :" + this.startDateParamName + ") " + "AND ((event.type = :value_fa8847b0c33183273f5945508b31c3208a9e4ece58ca47233a05628d8dba3799) " + "AND (event.date >= :" + this.pref1StartDateParamName + "))) " + "AND (event.hidden <> true) " + "ORDER BY event.date DESC", Query.HQL); verify(this.query).bindValue(this.startDateParamName, this.startDate); verify(this.query).bindValue(this.pref1StartDateParamName, this.pref1StartDate); verify(this.query).bindValue(eq("value_fa8847b0c33183273f5945508b31c3208a9e4ece58ca47233a05628d8dba3799"), eq("create")); }
public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); } }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }  }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }  Query generateQuery(NotificationParameters parameters); ExpressionNode generateQueryExpression(NotificationParameters parameters); }
QueryGenerator { public ExpressionNode generateQueryExpression(NotificationParameters parameters) throws EventStreamException { return this.expressionGenerator.generateQueryExpression(parameters); }  Query generateQuery(NotificationParameters parameters); ExpressionNode generateQueryExpression(NotificationParameters parameters);  }