code: private static Object toDatabaseSupportedValue(Object value) {
          if (value instanceof java.lang.String ||
                  value instanceof byte[] ||
                  value instanceof Byte[] ||
                  value instanceof java.lang.Long ||
                  value instanceof java.lang.Integer ||
                  value instanceof java.lang.Boolean ||
                  value instanceof java.math.BigInteger ||
                  value instanceof java.lang.Float ||
                  value instanceof java.lang.Double ||
                  value instanceof java.math.BigDecimal ||
                  value instanceof java.sql.Date ||
                  value instanceof java.util.Date ||
                  /*
                  because java.sql.Time and java.sql.Timestamp is subclass of java.sql.Date so the checks always return true
                  value instanceof java.sql.Time || value instanceof java.sql.Timestamp ||
                  */
                  value instanceof java.util.Calendar
                  ) {
              return value;
          } else {
              return Reflection.toType(value, String.class);
          }
      }
docs: Convert Java value to database supported value.
  Please refer to "https://www.cnblogs.com/jerrylz/p/5814460.html" for detail.
  
  @param value java value, can be any type.
  @return database supported value