org.mariadb.jdbc.internal
Enum ColumnType

java.lang.Object
  extended by java.lang.Enum<ColumnType>
      extended by org.mariadb.jdbc.internal.ColumnType
All Implemented Interfaces:
Serializable, Comparable<ColumnType>

public enum ColumnType
extends Enum<ColumnType>


Enum Constant Summary
BIGINT
           
BIT
           
BLOB
           
DATE
           
DATETIME
           
DECIMAL
           
DOUBLE
           
ENUM
           
FLOAT
           
GEOMETRY
           
INTEGER
           
LONGBLOB
           
MEDIUMBLOB
           
MEDIUMINT
           
NEWDATE
           
NULL
           
OLDDECIMAL
           
SET
           
SMALLINT
           
STRING
           
TIME
           
TIMESTAMP
           
TINYBLOB
           
TINYINT
           
VARCHAR
           
VARSTRING
           
YEAR
           
 
Method Summary
static Class classFromJavaType(int type)
          Permit to know java result class according to java.sql.Types.
static ColumnType fromServer(int typeValue)
          Convert server Type to server type.
 String getClassName()
           
static String getClassName(ColumnType type, int len, boolean signed, boolean binary, int flags)
          Get class name.
static String getColumnTypeName(ColumnType type, long len, boolean signed, boolean binary)
          Get columnTypeName.
 String getJavaTypeName()
           
 int getSqlType()
           
 int getType()
           
 String getTypeName()
           
static boolean isNumeric(ColumnType type)
          Is type numeric.
static ColumnType toServer(int javaType)
          Convert javatype to ColumnType.
static ColumnType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ColumnType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

OLDDECIMAL

public static final ColumnType OLDDECIMAL

TINYINT

public static final ColumnType TINYINT

SMALLINT

public static final ColumnType SMALLINT

INTEGER

public static final ColumnType INTEGER

FLOAT

public static final ColumnType FLOAT

DOUBLE

public static final ColumnType DOUBLE

NULL

public static final ColumnType NULL

TIMESTAMP

public static final ColumnType TIMESTAMP

BIGINT

public static final ColumnType BIGINT

MEDIUMINT

public static final ColumnType MEDIUMINT

DATE

public static final ColumnType DATE

TIME

public static final ColumnType TIME

DATETIME

public static final ColumnType DATETIME

YEAR

public static final ColumnType YEAR

NEWDATE

public static final ColumnType NEWDATE

VARCHAR

public static final ColumnType VARCHAR

BIT

public static final ColumnType BIT

DECIMAL

public static final ColumnType DECIMAL

ENUM

public static final ColumnType ENUM

SET

public static final ColumnType SET

TINYBLOB

public static final ColumnType TINYBLOB

MEDIUMBLOB

public static final ColumnType MEDIUMBLOB

LONGBLOB

public static final ColumnType LONGBLOB

BLOB

public static final ColumnType BLOB

VARSTRING

public static final ColumnType VARSTRING

STRING

public static final ColumnType STRING

GEOMETRY

public static final ColumnType GEOMETRY
Method Detail

values

public static ColumnType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ColumnType c : ColumnType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ColumnType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

classFromJavaType

public static Class classFromJavaType(int type)
Permit to know java result class according to java.sql.Types.

Parameters:
type - java.sql.Type value
Returns:
Class name.

isNumeric

public static boolean isNumeric(ColumnType type)
Is type numeric.

Parameters:
type - mariadb type
Returns:
true if type is numeric

getColumnTypeName

public static String getColumnTypeName(ColumnType type,
                                       long len,
                                       boolean signed,
                                       boolean binary)
Get columnTypeName.

Parameters:
type - type
len - len
signed - signed
binary - binary
Returns:
type

fromServer

public static ColumnType fromServer(int typeValue)
Convert server Type to server type.

Parameters:
typeValue - type value
Returns:
MariaDb type

toServer

public static ColumnType toServer(int javaType)
Convert javatype to ColumnType.

Parameters:
javaType - javatype value
Returns:
mariaDb type value

getClassName

public static String getClassName(ColumnType type,
                                  int len,
                                  boolean signed,
                                  boolean binary,
                                  int flags)
Get class name.

Parameters:
type - type
len - len
signed - signed
binary - binary
flags - flags
Returns:
class name

getClassName

public String getClassName()

getSqlType

public int getSqlType()

getTypeName

public String getTypeName()

getType

public int getType()

getJavaTypeName

public String getJavaTypeName()


Copyright © 2017. All rights reserved.