Java SQL Type isPrecisionRequired(int jdbcType)

Here you can find the source of isPrecisionRequired(int jdbcType)

Description

is Precision Required

License

Open Source License

Declaration

public static boolean isPrecisionRequired(int jdbcType) 

Method Source Code


//package com.java2s;
import java.sql.Types;

public class Main {
    public static boolean isPrecisionRequired(int jdbcType) {
        switch (jdbcType) {
        case Types.BIT:
        case Types.BIGINT:
        case Types.BOOLEAN:
        case Types.INTEGER:
        case Types.SMALLINT:
        case Types.TINYINT:
        case Types.FLOAT:
        case Types.REAL:
        case Types.DOUBLE:
        case Types.DATE:
        case Types.TIMESTAMP:
        case Types.TIME:
        case Types.JAVA_OBJECT:
        case Types.LONGVARCHAR:
        case Types.LONGVARBINARY:
        case Types.BLOB:
        case Types.CLOB:
        case Types.ARRAY:
        case Types.STRUCT:
        case Types.DISTINCT:
        case Types.REF:
        case Types.DATALINK:
            return false;

        default://  w  ww .j  a  v  a 2  s. c o m
            return true;
        }
    }
}

Related

  1. isNumeric(int sqlType)
  2. isNumeric(int sqlType)
  3. isNumericType(int datatype)
  4. isNumericType(int type)
  5. isPlainJdbcType(int type)
  6. isPrimitive(Class type)
  7. isPrimitiveCollection(Method m)
  8. isScaleRequired(int type)
  9. isSerializationClass(Class clazz)