class QueryChangeConfig implements ConditionConfig {

   @Override
   public Condition generate(Map<String, Object> values) {
      Preconditions.checkState(condition != null, "Must specify a condition");

      Predicate<Model> query;
      Predicate<Model> condition;
      
      if(this.query == null) {
         query = Predicates.alwaysTrue();
      }
      else {
         query = FunctionFactory.toModelPredicate(this.query.toTemplate(), values);
      }
      condition = FunctionFactory.toModelPredicate(this.condition.toTemplate(), values);
      
      
      return new QueryChangeTrigger(query, condition);
   }

}