code: private void setField(Object result, Object key, Attribute attribute, Object fieldValue)
      {
          if (fieldValue != null)
          {
              if (((AbstractAttribute) attribute).getBindableJavaType().isAssignableFrom(Date.class)
                      || ((AbstractAttribute) attribute).getBindableJavaType().isAssignableFrom(java.sql.Date.class)
                      || ((AbstractAttribute) attribute).getBindableJavaType().isAssignableFrom(Timestamp.class)
                      || ((AbstractAttribute) attribute).getBindableJavaType().isAssignableFrom(Calendar.class))
              {
                  PropertyAccessorFactory.STRING.fromString(((AbstractAttribute) attribute).getBindableJavaType(),
                          fieldValue.toString());
              }
              else if (key == null || !key.equals(fieldValue))
              {
                  PropertyAccessorHelper.set(result, (Field) attribute.getJavaMember(), fieldValue);
              }
          }
      }
docs: Sets the field.
  
  @param result
  the result
  @param key
  the key
  @param attribute
  the attribute
  @param fieldValue
  the field value