public static class ScalarTypeBoolean.BitBoolean extends ScalarTypeBoolean.BooleanBase
Sometimes booleans may be mapped to the JDBC type BIT. To use the BitBoolean specify type.boolean.dbtype="bit" in the ebean configuration
jdbcNative, jdbcType, type| Constructor and Description |
|---|
ScalarTypeBoolean.BitBoolean()
Native Boolean database type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(DataBind b,
Boolean value)
Convert (if necessary) and bind the value to the preparedStatement.
|
Boolean |
read(DataReader dataReader)
Read the value from the resultSet and convert if necessary to the logical
bean property value.
|
Boolean |
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.
|
formatValue, isDateTimeCapable, parse, parseDateTime, readData, writeDataaccumulateScalarTypes, format, getDbNullValue, getJdbcType, getLength, getType, isDbNull, isJdbcNative, jsonFromString, jsonToString, jsonWrite, loadIgnorepublic ScalarTypeBoolean.BitBoolean()
public Boolean 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).
public 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.
public void bind(DataBind b, Boolean value) throws SQLException
ScalarTypevalue may need to be converted from the logical bean property type to the JDBC type.
SQLExceptionpublic Boolean read(DataReader dataReader) throws SQLException
ScalarTypeSQLExceptionCopyright © 2014. All Rights Reserved.