private static void setValue(PreparedStatement ps, int paramIndex, Object inValue) throws SQLException {
		if (ClassHelper.isTypeString(inValue.getClass())) {
			ps.setString(paramIndex, inValue.toString());
		} else if (ClassHelper.isTypeDate(inValue.getClass())) {
			ps.setTimestamp(paramIndex, new Timestamp(((java.util.Date) inValue).getTime()));
		} else if (inValue instanceof Calendar) {
			Calendar cal = (Calendar) inValue;
			ps.setTimestamp(paramIndex, new Timestamp(cal.getTime().getTime()), cal);
		} else {
			// Fall back to generic setObject call without SQL type specified.
			ps.setObject(paramIndex, inValue);
		}
	}