|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.tinygroup.dbrouter.value.DataType
public class DataType
This class contains meta data information about data types, and can convert between Java objects and Values.
| 字段摘要 | |
|---|---|
static int |
TYPE_RESULT_SET
This constant is used to represent the type of a ResultSet. |
| 构造方法摘要 | |
|---|---|
DataType()
|
|
| 方法摘要 | |
|---|---|
static int |
convertSQLTypeToValueType(int sqlType)
Convert a SQL type to a value type. |
static int |
getAddProofType(int type)
Get the data type that will not overflow when calling 'add' 2 billion times. |
static DataType |
getDataType(int type)
Get the data type object for the given value type. |
int |
getDefaultDisplaySize()
|
static Object |
getDefaultForPrimitiveType(Class<?> clazz)
Get the default value in the form of a Java object for the given Java class. |
long |
getDefaultPrecision()
|
int |
getDefaultScale()
|
String |
getJdbc()
|
long |
getMaxPrecision()
|
int |
getMaxScale()
|
int |
getMinScale()
|
String |
getName()
|
static Class<?> |
getNonPrimitiveClass(Class<?> clazz)
Convert primitive class names to java.lang.* class names. |
String |
getParams()
|
String |
getPrefix()
|
int |
getSqlType()
|
int |
getSqlTypePos()
|
String |
getSuffix()
|
int |
getType()
|
static DataType |
getTypeByName(String s)
Get a data type object from a type name. |
static String |
getTypeClassName(int type)
Get the name of the Java class for the given value type. |
static int |
getTypeFromClass(Class<?> x)
Get the value type for the given Java class. |
static List<DataType> |
getTypes()
Get the list of data types. |
boolean |
isAutoIncrement()
|
boolean |
isCaseSensitive()
|
boolean |
isDecimal()
|
boolean |
isHidden()
|
static boolean |
isLargeObject(int type)
Check if the given value type is a large object (BLOB or CLOB). |
static boolean |
isStringType(int type)
Check if the given value type is a String (VARCHAR,...). |
boolean |
isSupportsPrecision()
|
boolean |
isSupportsScale()
|
static boolean |
supportsAdd(int type)
Check if the given value type supports the add operation. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public static final int TYPE_RESULT_SET
| 构造方法详细信息 |
|---|
public DataType()
| 方法详细信息 |
|---|
public static List<DataType> getTypes()
public static String getTypeClassName(int type)
type - the value type
public static int convertSQLTypeToValueType(int sqlType)
sqlType - the SQL type
public static int getTypeFromClass(Class<?> x)
x - the Java class
public static Class<?> getNonPrimitiveClass(Class<?> clazz)
clazz - the class (for example: int)
public static boolean isLargeObject(int type)
type - the value type
public static boolean isStringType(int type)
type - the value type
public static boolean supportsAdd(int type)
type - the value type
public static int getAddProofType(int type)
type - the value type
public static Object getDefaultForPrimitiveType(Class<?> clazz)
clazz - the Java class
public static DataType getDataType(int type)
type - the value type
public static DataType getTypeByName(String s)
s - the type name
public int getType()
public String getName()
public int getSqlType()
public String getJdbc()
public int getSqlTypePos()
public long getMaxPrecision()
public int getMinScale()
public int getMaxScale()
public boolean isDecimal()
public String getPrefix()
public String getSuffix()
public String getParams()
public boolean isAutoIncrement()
public boolean isCaseSensitive()
public boolean isSupportsPrecision()
public boolean isSupportsScale()
public long getDefaultPrecision()
public int getDefaultScale()
public int getDefaultDisplaySize()
public boolean isHidden()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||