## org.eclipse.datatools.modelbase.sql.query.helper
Class DataTypeHelper

    java.lang.Object
      org.eclipse.datatools.modelbase.sql.query.helper.DataTypeHelper

    public class DataTypeHelper

extends java.lang.Object

This helper class provides convenience methods related to `PredefinedDataType`.

Author:
  ckadner

Field Summary
`static java.lang.String` `TYPENAME_ARRAY`
`static java.lang.String` `TYPENAME_BIGINT`
`static java.lang.String` `TYPENAME_BINARY`
`static java.lang.String` `TYPENAME_BINARY_LARGE_OBJECT`
`static java.lang.String` `TYPENAME_BINARY_VARYING`
`static java.lang.String` `TYPENAME_BLOB`
`static java.lang.String` `TYPENAME_BOOLEAN`
`static java.lang.String` `TYPENAME_CHAR`
`static java.lang.String` `TYPENAME_CHAR_LARGE_OBJECT`
`static java.lang.String` `TYPENAME_CHAR_VARYING`
`static java.lang.String` `TYPENAME_CHARACTER`
`static java.lang.String` `TYPENAME_CHARACTER_LARGE_OBJECT`
`static java.lang.String` `TYPENAME_CHARACTER_VARYING`
`static java.lang.String` `TYPENAME_CLOB`
`static java.lang.String` `TYPENAME_DATALINK`
`static java.lang.String` `TYPENAME_DATE`
`static java.lang.String` `TYPENAME_DBCLOB`
`static java.lang.String` `TYPENAME_DEC`
`static java.lang.String` `TYPENAME_DECFLOAT`
`static java.lang.String` `TYPENAME_DECIMAL`
`static java.lang.String` `TYPENAME_DOUBLE`
`static java.lang.String` `TYPENAME_DOUBLE_PRECISION`
`static java.lang.String` `TYPENAME_FLOAT`
`static java.lang.String` `TYPENAME_GRAPHIC`
`static java.lang.String` `TYPENAME_INT`
`static java.lang.String` `TYPENAME_INTEGER`
`static java.lang.String` `TYPENAME_INTERVAL`
`static java.lang.String` `TYPENAME_LONG_VARCHAR`
`static java.lang.String` `TYPENAME_LONG_VARGRAPHIC`
`static java.lang.String` `TYPENAME_LONGVARCHAR`
`static java.lang.String` `TYPENAME_LONGVARG`
`static java.lang.String` `TYPENAME_LONGVARN`
`static java.lang.String` `TYPENAME_MULTISET`
`static java.lang.String` `TYPENAME_NATIONAL_CHAR`
`static java.lang.String` `TYPENAME_NATIONAL_CHAR_LARGE_OBJECT`
`static java.lang.String` `TYPENAME_NATIONAL_CHAR_VARYING`
`static java.lang.String` `TYPENAME_NATIONAL_CHARACTER`
`static java.lang.String` `TYPENAME_NATIONAL_CHARACTER_LARGE_OBJECT`
`static java.lang.String` `TYPENAME_NATIONAL_CHARACTER_VARYING`
`static java.lang.String` `TYPENAME_NCHAR`
`static java.lang.String` `TYPENAME_NCHAR_LARGE_OBJECT`
`static java.lang.String` `TYPENAME_NCHAR_VARYING`
`static java.lang.String` `TYPENAME_NCLOB`
`static java.lang.String` `TYPENAME_NUM`
`static java.lang.String` `TYPENAME_NUMERIC`
`static java.lang.String` `TYPENAME_REAL`
`static java.lang.String` `TYPENAME_REF`
`static java.lang.String` `TYPENAME_ROW`
`static java.lang.String` `TYPENAME_ROWID`
`static java.lang.String` `TYPENAME_SMALLINT`
`static java.lang.String` `TYPENAME_TIME`
`static java.lang.String` `TYPENAME_TIMESTAMP`
`static java.lang.String` `TYPENAME_VARBINARY`
`static java.lang.String` `TYPENAME_VARCHAR`
`static java.lang.String` `TYPENAME_VARGRAPHIC`
`static java.lang.String` `TYPENAME_XML`
`static java.lang.String` `TYPENAME_XML_TYPE`

Constructor Summary
`DataTypeHelper()`

Method Summary
`static int` `getJDBCTypeForNamedType(java.lang.String aTypeName)` Gets the JDBC datatype identifier corresponding to the given named datatype.
`static PredefinedDataType` `getPredefinedDataTypeForNamedType(java.lang.String aTypeName)` Gets the `PredefinedDataType` PrimitiveType enum value corresponding to the given type name.
`static int` `getPrimitiveTypeForNamedType(java.lang.String aTypeName)` Gets the PrimitiveType enum value corresponding to the given type name.
`static java.lang.String` `getPrimitiveTypeName(PrimitiveType primitiveType)` Returns the name of the given 'Primitive Type' literal.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TYPENAME_ARRAY

    public static final java.lang.String TYPENAME_ARRAY

See Also:
  Constant Field Values

### TYPENAME_BIGINT

    public static final java.lang.String TYPENAME_BIGINT

See Also:
  Constant Field Values

### TYPENAME_BINARY

    public static final java.lang.String TYPENAME_BINARY

See Also:
  Constant Field Values

### TYPENAME_BINARY_VARYING

    public static final java.lang.String TYPENAME_BINARY_VARYING

See Also:
  Constant Field Values

### TYPENAME_BINARY_LARGE_OBJECT

    public static final java.lang.String TYPENAME_BINARY_LARGE_OBJECT

See Also:
  Constant Field Values

### TYPENAME_BLOB

    public static final java.lang.String TYPENAME_BLOB

See Also:
  Constant Field Values

### TYPENAME_BOOLEAN

    public static final java.lang.String TYPENAME_BOOLEAN

See Also:
  Constant Field Values

### TYPENAME_CHAR

    public static final java.lang.String TYPENAME_CHAR

See Also:
  Constant Field Values

### TYPENAME_CHAR_LARGE_OBJECT

    public static final java.lang.String TYPENAME_CHAR_LARGE_OBJECT

See Also:
  Constant Field Values

### TYPENAME_CHAR_VARYING

    public static final java.lang.String TYPENAME_CHAR_VARYING

See Also:
  Constant Field Values

### TYPENAME_CHARACTER

    public static final java.lang.String TYPENAME_CHARACTER

See Also:
  Constant Field Values

### TYPENAME_CHARACTER_LARGE_OBJECT

    public static final java.lang.String TYPENAME_CHARACTER_LARGE_OBJECT

See Also:
  Constant Field Values

### TYPENAME_CHARACTER_VARYING

    public static final java.lang.String TYPENAME_CHARACTER_VARYING

See Also:
  Constant Field Values

### TYPENAME_CLOB

    public static final java.lang.String TYPENAME_CLOB

See Also:
  Constant Field Values

### TYPENAME_DATALINK

    public static final java.lang.String TYPENAME_DATALINK

See Also:
  Constant Field Values

### TYPENAME_DATE

    public static final java.lang.String TYPENAME_DATE

See Also:
  Constant Field Values

### TYPENAME_DBCLOB

    public static final java.lang.String TYPENAME_DBCLOB

See Also:
  Constant Field Values

### TYPENAME_DEC

    public static final java.lang.String TYPENAME_DEC

See Also:
  Constant Field Values

### TYPENAME_DECFLOAT

    public static final java.lang.String TYPENAME_DECFLOAT

See Also:
  Constant Field Values

### TYPENAME_DECIMAL

    public static final java.lang.String TYPENAME_DECIMAL

See Also:
  Constant Field Values

### TYPENAME_DOUBLE

    public static final java.lang.String TYPENAME_DOUBLE

See Also:
  Constant Field Values

### TYPENAME_DOUBLE_PRECISION

    public static final java.lang.String TYPENAME_DOUBLE_PRECISION

See Also:
  Constant Field Values

### TYPENAME_FLOAT

    public static final java.lang.String TYPENAME_FLOAT

See Also:
  Constant Field Values

### TYPENAME_GRAPHIC

    public static final java.lang.String TYPENAME_GRAPHIC

See Also:
  Constant Field Values

### TYPENAME_INT

    public static final java.lang.String TYPENAME_INT

See Also:
  Constant Field Values

### TYPENAME_INTEGER

    public static final java.lang.String TYPENAME_INTEGER

See Also:
  Constant Field Values

### TYPENAME_INTERVAL

    public static final java.lang.String TYPENAME_INTERVAL

See Also:
  Constant Field Values

### TYPENAME_LONGVARCHAR

    public static final java.lang.String TYPENAME_LONGVARCHAR

See Also:
  Constant Field Values

### TYPENAME_LONGVARG

    public static final java.lang.String TYPENAME_LONGVARG

See Also:
  Constant Field Values

### TYPENAME_LONGVARN

    public static final java.lang.String TYPENAME_LONGVARN

See Also:
  Constant Field Values

### TYPENAME_LONG_VARCHAR

    public static final java.lang.String TYPENAME_LONG_VARCHAR

See Also:
  Constant Field Values

### TYPENAME_LONG_VARGRAPHIC

    public static final java.lang.String TYPENAME_LONG_VARGRAPHIC

See Also:
  Constant Field Values

### TYPENAME_MULTISET

    public static final java.lang.String TYPENAME_MULTISET

See Also:
  Constant Field Values

### TYPENAME_NATIONAL_CHAR

    public static final java.lang.String TYPENAME_NATIONAL_CHAR

See Also:
  Constant Field Values

### TYPENAME_NATIONAL_CHAR_LARGE_OBJECT

    public static final java.lang.String TYPENAME_NATIONAL_CHAR_LARGE_OBJECT

See Also:
  Constant Field Values

### TYPENAME_NATIONAL_CHAR_VARYING

    public static final java.lang.String TYPENAME_NATIONAL_CHAR_VARYING

See Also:
  Constant Field Values

### TYPENAME_NATIONAL_CHARACTER

    public static final java.lang.String TYPENAME_NATIONAL_CHARACTER

See Also:
  Constant Field Values

### TYPENAME_NATIONAL_CHARACTER_LARGE_OBJECT

    public static final java.lang.String TYPENAME_NATIONAL_CHARACTER_LARGE_OBJECT

See Also:
  Constant Field Values

### TYPENAME_NATIONAL_CHARACTER_VARYING

    public static final java.lang.String TYPENAME_NATIONAL_CHARACTER_VARYING

See Also:
  Constant Field Values

### TYPENAME_NCHAR

    public static final java.lang.String TYPENAME_NCHAR

See Also:
  Constant Field Values

### TYPENAME_NCHAR_LARGE_OBJECT

    public static final java.lang.String TYPENAME_NCHAR_LARGE_OBJECT

See Also:
  Constant Field Values

### TYPENAME_NCHAR_VARYING

    public static final java.lang.String TYPENAME_NCHAR_VARYING

See Also:
  Constant Field Values

### TYPENAME_NCLOB

    public static final java.lang.String TYPENAME_NCLOB

See Also:
  Constant Field Values

### TYPENAME_NUM

    public static final java.lang.String TYPENAME_NUM

See Also:
  Constant Field Values

### TYPENAME_NUMERIC

    public static final java.lang.String TYPENAME_NUMERIC

See Also:
  Constant Field Values

### TYPENAME_REAL

    public static final java.lang.String TYPENAME_REAL

See Also:
  Constant Field Values

### TYPENAME_REF

    public static final java.lang.String TYPENAME_REF

See Also:
  Constant Field Values

### TYPENAME_ROW

    public static final java.lang.String TYPENAME_ROW

See Also:
  Constant Field Values

### TYPENAME_ROWID

    public static final java.lang.String TYPENAME_ROWID

See Also:
  Constant Field Values

### TYPENAME_SMALLINT

    public static final java.lang.String TYPENAME_SMALLINT

See Also:
  Constant Field Values

### TYPENAME_TIME

    public static final java.lang.String TYPENAME_TIME

See Also:
  Constant Field Values

### TYPENAME_TIMESTAMP

    public static final java.lang.String TYPENAME_TIMESTAMP

See Also:
  Constant Field Values

### TYPENAME_VARBINARY

    public static final java.lang.String TYPENAME_VARBINARY

See Also:
  Constant Field Values

### TYPENAME_VARCHAR

    public static final java.lang.String TYPENAME_VARCHAR

See Also:
  Constant Field Values

### TYPENAME_VARGRAPHIC

    public static final java.lang.String TYPENAME_VARGRAPHIC

See Also:
  Constant Field Values

### TYPENAME_XML

    public static final java.lang.String TYPENAME_XML

See Also:
  Constant Field Values

### TYPENAME_XML_TYPE

    public static final java.lang.String TYPENAME_XML_TYPE

See Also:
  Constant Field Values

Constructor Detail

### DataTypeHelper

    public DataTypeHelper()

Method Detail

### getJDBCTypeForNamedType

    public static int getJDBCTypeForNamedType(java.lang.String aTypeName)

  Gets the JDBC datatype identifier corresponding to the given named datatype. This is for use with the datatype names returned from the FunctionHelper. Note: there is probably a utility somewhere else that does this. If so, we can get rid of this method.

  Parameters:
    `aTypeName` - a type name to use to lookup a JDBC datatype
  Returns:
    int a JDBC type identifier.

### getPrimitiveTypeForNamedType

    public static int getPrimitiveTypeForNamedType(java.lang.String aTypeName)

  Gets the PrimitiveType enum value corresponding to the given type name.

  Parameters:
    `aTypeName` - a type name to use to lookup a PrimitiveType
  Returns:
    the PrimitiveType corresponding to the named type

### getPredefinedDataTypeForNamedType

    public static PredefinedDataType getPredefinedDataTypeForNamedType(java.lang.String aTypeName)

  Gets the `PredefinedDataType` PrimitiveType enum value corresponding to the given type name. Use type names in constants `TYPENAME_*` provided by `ValueExpressionHelper`.

  Parameters:
    `aTypeName` - a type name to use to look up a PrimitiveType
  Returns:
    the PrimitiveType corresponding to the named type

### getPrimitiveTypeName

    public static java.lang.String getPrimitiveTypeName(PrimitiveType primitiveType)

  Returns the name of the given 'Primitive Type' literal.

  Parameters:
    `primitiveType` - the primitive type for which the name is needed
  Returns:
    the String representing the `PrimitiveType`, one of the `TYPENAME_xxx` constants
  See Also:
    `PrimitiveType`