public static Object asScalarValue(Object bean) { Class<?> type = bean.getClass(); if (isBigInteger(type)) { return ((BigInteger) bean).intValue(); } else if (isBigDecimal(type)) { return ((BigDecimal) bean).doubleValue(); } else if (isCalendar(type)) { return ((Calendar) bean).getTime(); } else if (isDate(type)) { return ((Date) bean).getTime(); } else if (isCurrency(type)) { return ((Currency) bean).toString(); } else { return bean; } }
public static Object asScalarValue(Object bean) { Class<?> type = bean.getClass(); if (isBigInteger(type)) { return ((BigInteger) bean).intValue(); } else if (isBigDecimal(type)) { return ((BigDecimal) bean).doubleValue(); } else if (isCalendar(type)) { return ((Calendar) bean).getTime(); } else if (isDate(type)) { return ((Date) bean).getTime(); } else if (isCurrency(type)) { return ((Currency) bean).toString(); } else { return bean; } }
} else if (isBigInteger(type)) { return new BigInteger(string); } else if (isBigDecimal(type)) { return new BigDecimal(string); } else if (isCalendar(type)) {
} else if (isBigInteger(type)) { return new BigInteger(string); } else if (isBigDecimal(type)) { return new BigDecimal(string); } else if (isCalendar(type)) {