public class ScalarTypeChar extends ScalarTypeBaseVarchar<Character>
jdbcNative, jdbcType, type| Constructor and Description |
|---|
ScalarTypeChar() |
| Modifier and Type | Method and Description |
|---|---|
void |
bind(DataBind b,
Character value)
Convert (if necessary) and bind the value to the preparedStatement.
|
Character |
convertFromDbString(String dbValue) |
String |
convertToDbString(Character beanValue) |
String |
formatValue(Character t)
Convert the type into a string representation.
|
Character |
jsonFromString(String value,
JsonValueAdapter ctx) |
String |
jsonToString(Character value,
JsonValueAdapter ctx) |
Character |
parse(String value)
Convert the string value to the appropriate java object.
|
Character |
read(DataReader dataReader)
Read the value from the resultSet and convert if necessary to the logical
bean property value.
|
Character |
toBeanType(Object value)
Convert the value as necessary to the logical Bean type.
|
Object |
toJdbcType(Object value)
Convert the value as necessary to the JDBC type.
|
format, isDateTimeCapable, jsonWrite, parseDateTime, readData, toJsonString, writeDataaccumulateScalarTypes, getDbNullValue, getJdbcType, getLength, getType, isDbNull, isJdbcNative, loadIgnorepublic Character convertFromDbString(String dbValue)
convertFromDbString in class ScalarTypeBaseVarchar<Character>public String convertToDbString(Character beanValue)
convertToDbString in class ScalarTypeBaseVarchar<Character>public void bind(DataBind b, Character value) throws SQLException
ScalarTypevalue may need to be converted from the logical bean property type to the JDBC type.
bind in interface ScalarDataReader<Character>bind in interface ScalarType<Character>bind in class ScalarTypeBaseVarchar<Character>SQLExceptionpublic Character read(DataReader dataReader) throws SQLException
ScalarTyperead in interface ScalarDataReader<Character>read in interface ScalarType<Character>read in class ScalarTypeBaseVarchar<Character>SQLExceptionpublic Object toJdbcType(Object value)
ScalarTypeNote that this should also match the type as per the getJdbcType() method.
This is typically used when the matching type is used in a where clause and we use this to ensure it is an appropriate jdbc type.
toJdbcType in interface ScalarType<Character>toJdbcType in class ScalarTypeBaseVarchar<Character>public Character toBeanType(Object value)
ScalarTypeThe type as per the bean property.
This is used to automatically convert id values (typically from a string to a int, long or UUID).
toBeanType in interface ScalarType<Character>toBeanType in class ScalarTypeBaseVarchar<Character>public String formatValue(Character t)
ScalarTypeReciprocal of parse().
formatValue in interface ScalarType<Character>formatValue in class ScalarTypeBaseVarchar<Character>public Character parse(String value)
ScalarTypeMostly used to support CSV, JSON and XML parsing.
Reciprocal of formatValue().
parse in interface StringParserparse in interface ScalarType<Character>parse in class ScalarTypeBaseVarchar<Character>public Character jsonFromString(String value, JsonValueAdapter ctx)
jsonFromString in interface ScalarType<Character>jsonFromString in class ScalarTypeBaseVarchar<Character>public String jsonToString(Character value, JsonValueAdapter ctx)
jsonToString in interface ScalarType<Character>jsonToString in class ScalarTypeBase<Character>Copyright © 2014. All Rights Reserved.