## 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_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_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_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_NATIONAL_CHARACTER`
`static java.lang.String` `TYPENAME_NATIONAL_CHARACTER_LARGE_OBJECT`
`static java.lang.String` `TYPENAME_NATIONAL_CHARACTER_VARYING`
`static java.lang.String` `TYPENAME_NUMERIC`
`static java.lang.String` `TYPENAME_REAL`
`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_TYPE`

Constructor Summary
`DataTypeHelper()`

Method Summary
`static int` `getJDBCTypeForNamedType(java.lang.String aTypeName)` CHECK IMPLEMENTATION! CODE UNTESTED! Gets the JDBC datatype identifier corresponding to the given named datatype.
`static PredefinedDataType` `getPredefinedDataTypeForNamedType(java.lang.String aTypeName)` CHECK IMPLEMENTATION! CODE UNTESTED! Gets the `PredefinedDataType` PrimitiveType enum value corresponding to the given type name.
`static int` `getPrimitiveTypeForNamedType(java.lang.String aTypeName)` CHECK IMPLEMENTATION! CODE UNTESTED! 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_DOUBLE_PRECISION

    public static final java.lang.String TYPENAME_DOUBLE_PRECISION

See Also:
  Constant Field Values

### TYPENAME_BIGINT

    public static final java.lang.String TYPENAME_BIGINT

See Also:
  Constant Field Values

### TYPENAME_BLOB

    public static final java.lang.String TYPENAME_BLOB

See Also:
  Constant Field Values

### TYPENAME_CHAR

    public static final java.lang.String TYPENAME_CHAR

See Also:
  Constant Field Values

### TYPENAME_DBCLOB

    public static final java.lang.String TYPENAME_DBCLOB

See Also:
  Constant Field Values

### TYPENAME_CHARACTER

    public static final java.lang.String TYPENAME_CHARACTER

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_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_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_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_LONGVARCHAR

    public static final java.lang.String TYPENAME_LONGVARCHAR

See Also:
  Constant Field Values

### TYPENAME_LONG_VARGRAPHIC

    public static final java.lang.String TYPENAME_LONG_VARGRAPHIC

See Also:
  Constant Field Values

### TYPENAME_LONG_VARCHAR

    public static final java.lang.String TYPENAME_LONG_VARCHAR

See Also:
  Constant Field Values

### TYPENAME_REAL

    public static final java.lang.String TYPENAME_REAL

See Also:
  Constant Field Values

### TYPENAME_SMALLINT

    public static final java.lang.String TYPENAME_SMALLINT

See Also:
  Constant Field Values

### TYPENAME_TIMESTAMP

    public static final java.lang.String TYPENAME_TIMESTAMP

See Also:
  Constant Field Values

### TYPENAME_TIME

    public static final java.lang.String TYPENAME_TIME

See Also:
  Constant Field Values

### TYPENAME_NUMERIC

    public static final java.lang.String TYPENAME_NUMERIC

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_CHARACTER_LARGE_OBJECT

    public static final java.lang.String TYPENAME_CHARACTER_LARGE_OBJECT

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_VARYING

    public static final java.lang.String TYPENAME_NATIONAL_CHARACTER_VARYING

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_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_FLOAT

    public static final java.lang.String TYPENAME_FLOAT

See Also:
  Constant Field Values

### TYPENAME_BOOLEAN

    public static final java.lang.String TYPENAME_BOOLEAN

See Also:
  Constant Field Values

### TYPENAME_INTERVAL

    public static final java.lang.String TYPENAME_INTERVAL

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)

  CHECK IMPLEMENTATION! CODE UNTESTED! 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. Use type names in constants `TYPENAME_*` provided by `ValueExpressionHelper`.

  Parameters:
    `aTypeName` - a type name to use to lookup a JDBC datatype
  Returns:
    int a JDBC type identifier.
  See Also:
    `TYPENAME_BIGINT`, `TYPENAME_VARGRAPHIC`

### getPrimitiveTypeForNamedType

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

  CHECK IMPLEMENTATION! CODE UNTESTED! Gets the 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 lookup a PrimitiveType
  Returns:
    the PrimitiveType corresponding to the named type
  See Also:
    `TYPENAME_BIGINT`, `TYPENAME_VARGRAPHIC`

### getPredefinedDataTypeForNamedType

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

  CHECK IMPLEMENTATION! CODE UNTESTED! 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 lookup a PrimitiveType
  Returns:
    the PrimitiveType corresponding to the named type
  See Also:
    `TYPENAME_BIGINT`, `TYPENAME_VARGRAPHIC`

### getPrimitiveTypeName

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

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

  Parameters:
    `primitiveType` -
  Returns:
    the String representing the `PrimitiveType` one of the `TYPENAME_xxx` constants
  See Also:
    `PrimitiveType`

Copyright © 2006 -- 2008 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.