private static Class<?> getNumericClass(int total, int decimal) {
        if (decimal <= 0) {
            if (total > 18 || total == 0) {
                return BigInteger.class;
            } else if (total > 9) {
                return Long.class;
            } else if (total > 4) {
                return Integer.class;
            } else if (total > 2) {
                return Short.class;
            } else {
                return Byte.class;
            }
        } else {
            return BigDecimal.class;
        }
    }
{@code JDBCTypeMapping} defines a mapping from JDBC types to Java classes.

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/JDBCTypeMapping.java