public class Type extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
Type.Types |
| Constructor and Description |
|---|
Type(Type.Types type,
int... precision) |
| Modifier and Type | Method and Description |
|---|---|
Format |
getFormat() |
protected String |
getPrecision() |
int[] |
getPrecisionArray() |
Type.Types |
getType() |
static Type |
getTypeByJavaClass(Class clazz) |
String |
getTypeDefinition() |
boolean |
isAutoincrement() |
boolean |
isPrimaryKey() |
static Type |
parseType(String typeAsString,
int charMaxLength,
int numericPrecision,
int numericScale) |
void |
setAutoincrement(boolean autoincrement) |
void |
setFormat(Format format) |
void |
setPrecision(int... precision) |
void |
setPrimaryKey(boolean primaryKey) |
void |
setType(Type.Types type) |
Boolean |
toBoolean(Object o) |
Date |
toDate(Object o,
Format format) |
double |
toFloat(Object o) |
int |
toInteger(Object o) |
long |
toLong(Object o) |
float |
toReal(Object o) |
String |
toString(Object o) |
Time |
toTime(Object o,
Format format) |
Timestamp |
toTimestamp(Object o) |
public Type(Type.Types type, int... precision)
public int[] getPrecisionArray()
protected String getPrecision()
public String getTypeDefinition()
public Type.Types getType()
public static Type parseType(String typeAsString, int charMaxLength, int numericPrecision, int numericScale) throws TypeMappingException
TypeMappingExceptionpublic static Type getTypeByJavaClass(Class clazz) throws Exception
Exceptionpublic void setPrecision(int... precision)
public int toInteger(Object o) throws NumberFormatException
NumberFormatExceptionpublic long toLong(Object o) throws NumberFormatException
NumberFormatExceptionpublic float toReal(Object o) throws NumberFormatException
NumberFormatExceptionpublic double toFloat(Object o) throws NumberFormatException
NumberFormatExceptionpublic Date toDate(Object o, Format format) throws ParseException
ParseExceptionpublic Time toTime(Object o, Format format) throws ParseException
ParseExceptionpublic Timestamp toTimestamp(Object o) throws ParseException
ParseExceptionpublic Boolean toBoolean(Object o) throws ParseException
ParseExceptionpublic void setType(Type.Types type)
public Format getFormat()
public void setFormat(Format format)
public boolean isAutoincrement()
public boolean isPrimaryKey()
public void setPrimaryKey(boolean primaryKey)
public void setAutoincrement(boolean autoincrement)
Copyright © 2020. All Rights Reserved.