Package org.eclipse.birt.report.model.api.util

# Class DataTypeConvertUtil

java.lang.Object
org.eclipse.birt.report.model.api.util.DataTypeConvertUtil

public class DataTypeConvertUtil extends Object
The utility class to convert values between parameter type choices and column data type choices.

## Constructor Summary

Constructors
Constructor
Description
`DataTypeConvertUtil()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`converToColumnDataType(String paramType)`
Returns the corresponding column data type choice with the given parameter type.
`static String`
`converToParamType(String columnType)`
Returns the corresponding parameter type choice with the given column data type.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DataTypeConvertUtil

public DataTypeConvertUtil()

## Method Details

### converToParamType

public static String converToParamType(String columnType)
Returns the corresponding parameter type choice with the given column data type. The column data type values are defined in `DesignChoiceConstants` can be one of the followings:

- `COLUMN_DATA_TYPE_BOOLEAN`
- `COLUMN_DATA_TYPE_DATETIME`
- `COLUMN_DATA_TYPE_DATE`
- `COLUMN_DATA_TYPE_TIME`
- `COLUMN_DATA_TYPE_DECIMAL`
- `COLUMN_DATA_TYPE_FLOAT`
- `COLUMN_DATA_TYPE_INTEGER`
- `COLUMN_DATA_TYPE_STRING`

Parameters:
  `columnType` - the column data type
Returns:
  the parameter type

### converToColumnDataType

public static String converToColumnDataType(String paramType)
Returns the corresponding column data type choice with the given parameter type. The column data type values are defined in `DesignChoiceConstants` can be one of the followings:

- `PARAM_TYPE_BOOLEAN`
- `PARAM_TYPE_DATETIME`
- `PARAM_TYPE_DATE`
- `PARAM_TYPE_TIME`
- `PARAM_TYPE_DECIMAL`
- `PARAM_TYPE_FLOAT`
- `PARAM_TYPE_INTEGER`
- `PARAM_TYPE_STRING`

Parameters:
  `paramType` - the parameter type
Returns:
  the column data type