code: private Value createValue(Object obj, ValueFactory factory) throws ValueFormatException
     {
        if (obj instanceof String)
        {
           return factory.createValue((String)obj);
        }
        else if (obj instanceof Calendar)
        {
           return factory.createValue((Calendar)obj);
        }
        else if (obj instanceof Date)
        {
           Calendar cal = Calendar.getInstance();
           cal.setTime((Date)obj);
           return factory.createValue(cal);
        }
        else
        {
           throw new ValueFormatException("Unsupported value type " + obj.getClass());
        }
     }
docs: Creates {@link Value} instance. Supported only
  {@link String}, {@link Calendar} and {@link Data} types.