private String toString(V value) {
    if (value == null) {
      return null;
    }
    if (value instanceof String) {
      return (String) value;
    }
    if (value instanceof Boolean) {
      return ((Boolean) value).booleanValue() ? "1" : "0";
    }
    if (value instanceof Date) {
      return new SimpleDateFormat("yyyy-MM-dd").format((Date) value);
    }
    if (value instanceof PermissionType) {
      return ((PermissionType) value).getValue();
    }
    if (value instanceof String[]) {
      return join((String[]) value);
    }
    return value.toString();
  }