protected String doDeriveNonQuotedLiteralTypeFromTestValue(String testValue) { final String plainTypeName; if (Srl.contains(testValue, ".")) { BigDecimal decimalValue = null; try { decimalValue = DfTypeUtil.toBigDecimal(testValue); } catch (NumberFormatException ignored) { } if (decimalValue != null) { plainTypeName = "BigDecimal"; } else { // means unknown type plainTypeName = "String"; } } else { Long longValue = null; try { longValue = DfTypeUtil.toLong(testValue); } catch (NumberFormatException ignored) { } if (longValue != null) { if (longValue > Long.valueOf(Integer.MAX_VALUE)) { plainTypeName = "Long"; } else { plainTypeName = "Integer"; } } else { if (testValue.equalsIgnoreCase("true") || testValue.equalsIgnoreCase("false")) { plainTypeName = "Boolean"; } else { // means unknown type plainTypeName = "String"; } } } return plainTypeName; }
protected static Long ctl(Object value) { // convertToLong return DfTypeUtil.toLong(value); }