| Modifier | Constructor and Description |
|---|---|
protected |
BaseType(Class<T> type,
int sqlType)
Instantiates a new type instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Integer |
getDefaultLength() |
abstract Object |
getIdentifier() |
String |
getIdentifierSuffix() |
int |
getSqlType() |
int |
hashCode() |
boolean |
hasLength() |
T |
read(ResultSet results,
int column)
Read the type from a JDBC
ResultSet. |
String |
toString() |
void |
write(PreparedStatement statement,
int index,
T value)
Write the value into a JDBC
PreparedStatement. |
public T read(ResultSet results, int column) throws SQLException
FieldTypeResultSet.read in interface FieldType<T>results - result setcolumn - column indexSQLException - when failing to read a value from the resultspublic void write(PreparedStatement statement, int index, T value) throws SQLException
FieldTypePreparedStatement.write in interface FieldType<T>statement - statement to useindex - parameter indexvalue - object valueSQLException - when failing to set the value in the statementpublic int getSqlType()
getSqlType in interface FieldType<T>Types constants indicating the JDBC typepublic boolean hasLength()
public Integer getDefaultLength()
getDefaultLength in interface FieldType<T>public abstract Object getIdentifier()
getIdentifier in interface FieldType<T>String or Keywordpublic String getIdentifierSuffix()
getIdentifierSuffix in interface FieldType<T>