class ValueChangeConfig implements ConditionConfig {

   @Override
   public Condition generate(Map<String, Object> values) {
      Preconditions.checkState(attribute != null, "must specify an attribute name");
      
      String attributeName;
      Object oldValue = null;
      Object newValue = null;
      Predicate<Model> query = Predicates.alwaysTrue();
      
      
      attributeName = FunctionFactory.toString(this.attribute.toTemplate(), values);
      if(this.oldValue != null) {
         oldValue = this.oldValue.toTemplate().apply(values);
      }
      if(this.newValue != null) {
         newValue = this.newValue.toTemplate().apply(values);
      }
      if(this.query != null) {
         query = FunctionFactory.toModelPredicate(this.query.toTemplate(), values);
      }
      return new ValueChangeTrigger(attributeName, oldValue, newValue, query);
   }

}