本文整理了Java中org.apache.openjpa.kernel.Filters.allowNumericConversion()
方法的一些代码示例,展示了Filters.allowNumericConversion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filters.allowNumericConversion()
方法的具体详情如下:
包路径:org.apache.openjpa.kernel.Filters
类名称:Filters
方法名:allowNumericConversion
暂无
代码示例来源:origin: org.apache.openjpa/openjpa-all
o.getClass(), type).getMessage());
if (type == Integer.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).intValue();
} else if (type == Float.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Float.valueOf(((Number) o).floatValue());
} else if (type == Double.class) {
return Double.valueOf(((Number) o).doubleValue());
} else if (type == Long.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).longValue();
} else if (type == BigDecimal.class) {
} else if (type == BigInteger.class) {
return new BigInteger(o.toString());
} else if (type == Short.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Short.valueOf(((Number) o).shortValue());
} else if (type == Byte.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Byte.valueOf(((Number) o).byteValue());
} else if (type == Character.class) {
代码示例来源:origin: org.apache.openjpa/openjpa-kernel
o.getClass(), type).getMessage());
if (type == Integer.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).intValue();
} else if (type == Float.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Float.valueOf(((Number) o).floatValue());
} else if (type == Double.class) {
return Double.valueOf(((Number) o).doubleValue());
} else if (type == Long.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).longValue();
} else if (type == BigDecimal.class) {
} else if (type == BigInteger.class) {
return new BigInteger(o.toString());
} else if (type == Short.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Short.valueOf(((Number) o).shortValue());
} else if (type == Byte.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Byte.valueOf(((Number) o).byteValue());
} else if (type == Character.class) {
代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel
o.getClass(), type).getMessage());
if (type == Integer.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).intValue();
} else if (type == Float.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Float.valueOf(((Number) o).floatValue());
} else if (type == Double.class) {
return Double.valueOf(((Number) o).doubleValue());
} else if (type == Long.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).longValue();
} else if (type == BigDecimal.class) {
} else if (type == BigInteger.class) {
return new BigInteger(o.toString());
} else if (type == Short.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Short.valueOf(((Number) o).shortValue());
} else if (type == Byte.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Byte.valueOf(((Number) o).byteValue());
} else if (type == Character.class) {
代码示例来源:origin: org.apache.openejb.patch/openjpa
o.getClass(), type).getMessage());
if (type == Integer.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).intValue();
} else if (type == Float.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Float.valueOf(((Number) o).floatValue());
} else if (type == Double.class) {
return Double.valueOf(((Number) o).doubleValue());
} else if (type == Long.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return ((Number) o).longValue();
} else if (type == BigDecimal.class) {
} else if (type == BigInteger.class) {
return new BigInteger(o.toString());
} else if (type == Short.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Short.valueOf(((Number) o).shortValue());
} else if (type == Byte.class && allowNumericConversion(o.getClass(), type, strictNumericConversion)) {
return Byte.valueOf(((Number) o).byteValue());
} else if (type == Character.class) {
内容来源于网络,如有侵权,请联系作者删除!