public class DataTypeUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
VARCHAR_DEFAULT_LENGTH
The default length
|
| Constructor and Description |
|---|
DataTypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Integer |
getDatabaseTypeByJavaType(Class clazz)
Gets the database type by java type.
|
static String |
getDatabaseTypeName(Integer type)
Gets the database type name.
|
static String |
getDatabaseTypeNameByJavaType(Class clazz)
Gets the database type name by java type.
|
static Class |
getJavaTypeByDatabaseType(Integer type)
Gets the java type by database type.
|
static Integer |
getSqlTypeByDataType(String type)
Gets the sql type by data type.
|
static boolean |
isBigint(String dataType)
Checks if is bigint.
|
static boolean |
isBit(String dataType)
Checks if is bit.
|
static boolean |
isBlob(String dataType)
Checks if is blob.
|
static boolean |
isBoolean(String dataType)
Checks if is boolean.
|
static boolean |
isChar(String dataType)
Checks if is char.
|
static boolean |
isDatabaseTypeSupported(Integer type)
Checks if is database type supported.
|
static boolean |
isDate(String dataType)
Checks if is date.
|
static boolean |
isDecimal(String dataType)
Checks if is decimal.
|
static boolean |
isDouble(String dataType)
Checks if is double.
|
static boolean |
isInteger(String dataType)
Checks if is integer.
|
static boolean |
isReal(String dataType)
Checks if is real.
|
static boolean |
isSmallint(String dataType)
Checks if is smallint.
|
static boolean |
isTime(String dataType)
Checks if is time.
|
static boolean |
isTimestamp(String dataType)
Checks if is timestamp.
|
static boolean |
isTinyint(String dataType)
Checks if is tinyint.
|
static boolean |
isVarchar(String dataType)
Checks if is varchar.
|
public static final int VARCHAR_DEFAULT_LENGTH
public static boolean isDatabaseTypeSupported(Integer type)
type - the typepublic static String getDatabaseTypeName(Integer type)
type - the typepublic static Integer getDatabaseTypeByJavaType(Class clazz)
clazz - the clazzpublic static Class getJavaTypeByDatabaseType(Integer type)
type - the typepublic static Integer getSqlTypeByDataType(String type)
type - the typepublic static String getDatabaseTypeNameByJavaType(Class clazz)
clazz - the clazzpublic static boolean isBlob(String dataType)
dataType - the data typepublic static boolean isBoolean(String dataType)
dataType - the data typepublic static boolean isDouble(String dataType)
dataType - the data typepublic static boolean isReal(String dataType)
dataType - the data typepublic static boolean isBigint(String dataType)
dataType - the data typepublic static boolean isSmallint(String dataType)
dataType - the data typepublic static boolean isInteger(String dataType)
dataType - the data typepublic static boolean isTinyint(String dataType)
dataType - the data typepublic static boolean isTimestamp(String dataType)
dataType - the data typepublic static boolean isTime(String dataType)
dataType - the data typepublic static boolean isDate(String dataType)
dataType - the data typepublic static boolean isChar(String dataType)
dataType - the data typepublic static boolean isVarchar(String dataType)
dataType - the data typepublic static boolean isDecimal(String dataType)
dataType - the data typepublic static boolean isBit(String dataType)
dataType - the data typeCopyright © 2010–2018 Eclipse Foundation. All rights reserved.