org.eobjects.metamodel.schema
Enum ColumnType

java.lang.Object
  extended by java.lang.Enum<ColumnType>
      extended by org.eobjects.metamodel.schema.ColumnType
All Implemented Interfaces:
Serializable, Comparable<ColumnType>

public enum ColumnType
extends Enum<ColumnType>

Represents the data-type of columns. Most of the elements in this enum are based on the JDBC Types class, but with a few additions.


Enum Constant Summary
ARRAY
           
BIGINT
           
BINARY
          Binary types
BIT
          Booleans
BLOB
           
BOOLEAN
           
CHAR
          Literal
CLOB
           
DATALINK
           
DATE
          Time based
DECIMAL
           
DISTINCT
           
DOUBLE
           
FLOAT
           
INTEGER
           
JAVA_OBJECT
           
LIST
          Additional types (added by MetaModel for non-JDBC datastores)
LONGNVARCHAR
           
LONGVARBINARY
           
LONGVARCHAR
           
MAP
           
NCHAR
           
NCLOB
           
NULL
          Other types (as defined in Types).
NUMERIC
           
NVARCHAR
           
OTHER
           
REAL
           
REF
           
ROWID
           
SMALLINT
           
SQLXML
           
STRUCT
           
TIME
           
TIMESTAMP
           
TINYINT
          Numbers
VARBINARY
           
VARCHAR
           
 
Method Summary
static ColumnType convertColumnType(Class<?> cls)
          Finds the ColumnType enum corresponding to the incoming Java class.
static ColumnType convertColumnType(int jdbcType)
          Finds the ColumnType enum corresponding to the incoming JDBC type-constant
 Comparator<Object> getComparator()
           
 Class<?> getJavaEquivalentClass()
           
 int getJdbcType()
          Gets the JDBC type as per the Types class.
 SuperColumnType getSuperType()
           
 boolean isBinary()
           
 boolean isBoolean()
           
 boolean isLargeObject()
           
 boolean isLiteral()
           
 boolean isNumber()
           
 boolean isTimeBased()
           
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

CHAR

public static final ColumnType CHAR
Literal


VARCHAR

public static final ColumnType VARCHAR

LONGVARCHAR

public static final ColumnType LONGVARCHAR

CLOB

public static final ColumnType CLOB

NCHAR

public static final ColumnType NCHAR

NVARCHAR

public static final ColumnType NVARCHAR

LONGNVARCHAR

public static final ColumnType LONGNVARCHAR

NCLOB

public static final ColumnType NCLOB

TINYINT

public static final ColumnType TINYINT
Numbers


SMALLINT

public static final ColumnType SMALLINT

INTEGER

public static final ColumnType INTEGER

BIGINT

public static final ColumnType BIGINT

FLOAT

public static final ColumnType FLOAT

REAL

public static final ColumnType REAL

DOUBLE

public static final ColumnType DOUBLE

NUMERIC

public static final ColumnType NUMERIC

DECIMAL

public static final ColumnType DECIMAL

DATE

public static final ColumnType DATE
Time based


TIME

public static final ColumnType TIME

TIMESTAMP

public static final ColumnType TIMESTAMP

BIT

public static final ColumnType BIT
Booleans


BOOLEAN

public static final ColumnType BOOLEAN

BINARY

public static final ColumnType BINARY
Binary types


VARBINARY

public static final ColumnType VARBINARY

LONGVARBINARY

public static final ColumnType LONGVARBINARY

BLOB

public static final ColumnType BLOB

NULL

public static final ColumnType NULL
Other types (as defined in Types).


OTHER

public static final ColumnType OTHER

JAVA_OBJECT

public static final ColumnType JAVA_OBJECT

DISTINCT

public static final ColumnType DISTINCT

STRUCT

public static final ColumnType STRUCT

ARRAY

public static final ColumnType ARRAY

REF

public static final ColumnType REF

DATALINK

public static final ColumnType DATALINK

ROWID

public static final ColumnType ROWID

SQLXML

public static final ColumnType SQLXML

LIST

public static final ColumnType LIST
Additional types (added by MetaModel for non-JDBC datastores)


MAP

public static final ColumnType MAP
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

getComparator

public Comparator<Object> getComparator()

isBoolean

public boolean isBoolean()

isBinary

public boolean isBinary()

isNumber

public boolean isNumber()

isTimeBased

public boolean isTimeBased()

isLiteral

public boolean isLiteral()

isLargeObject

public boolean isLargeObject()

getJavaEquivalentClass

public Class<?> getJavaEquivalentClass()
Returns:
a java class that is appropriate for handling column values of this column type

getSuperType

public SuperColumnType getSuperType()

convertColumnType

public static ColumnType convertColumnType(int jdbcType)
Finds the ColumnType enum corresponding to the incoming JDBC type-constant


getJdbcType

public int getJdbcType()
                throws IllegalStateException
Gets the JDBC type as per the Types class.

Returns:
an int representing one of the constants in the Types class.
Throws:
IllegalStateException - in case getting the JDBC type was unsuccesful.

convertColumnType

public static ColumnType convertColumnType(Class<?> cls)
Finds the ColumnType enum corresponding to the incoming Java class.

Parameters:
cls -
Returns:


Copyright © 2007-2013. All Rights Reserved.