Package io.ebeaninternal.server.type
Class ScalarTypeBoolean.Native
- java.lang.Object
-
- io.ebeaninternal.server.type.ScalarTypeBase<Boolean>
-
- io.ebeaninternal.server.type.ScalarTypeBoolean.BooleanBase
-
- io.ebeaninternal.server.type.ScalarTypeBoolean.Native
-
- All Implemented Interfaces:
StringFormatter
,StringParser
,ScalarDataReader<Boolean>
,ScalarType<Boolean>
,ScalarTypeBool
,ScalarTypeLogicalType
- Enclosing class:
- ScalarTypeBoolean
public static class ScalarTypeBoolean.Native extends ScalarTypeBoolean.BooleanBase
-
-
Constructor Summary
Constructors Constructor Description Native()
Native Boolean database type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(DataBind b, Boolean value)
Convert (if necessary) and bind the value to the preparedStatement.String
getDbFalseLiteral()
Return the DB literal value for false.String
getDbTrueLiteral()
Return the DB literal value for true.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.-
Methods inherited from class io.ebeaninternal.server.type.ScalarTypeBoolean.BooleanBase
convertFromMillis, formatValue, getDocType, getLogicalType, isDateTimeCapable, jsonRead, jsonWrite, parse, readData, writeData
-
Methods inherited from class io.ebeaninternal.server.type.ScalarTypeBase
asVersion, format, getJdbcType, getLength, getType, isBinaryType, isDirty, isJdbcNative, isMutable, loadIgnore
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.ebeaninternal.server.type.ScalarType
asVersion, format, getJdbcType, getLength, getType, isBinaryType, isDirty, isJdbcNative, isMutable, loadIgnore
-
-
-
-
Constructor Detail
-
Native
public Native()
Native Boolean database type.
-
-
Method Detail
-
getDbFalseLiteral
public String getDbFalseLiteral()
Description copied from class:ScalarTypeBoolean.BooleanBase
Return the DB literal value for false.- Specified by:
getDbFalseLiteral
in interfaceScalarTypeBool
- Specified by:
getDbFalseLiteral
in classScalarTypeBoolean.BooleanBase
-
getDbTrueLiteral
public String getDbTrueLiteral()
Description copied from class:ScalarTypeBoolean.BooleanBase
Return the DB literal value for true.- Specified by:
getDbTrueLiteral
in interfaceScalarTypeBool
- Specified by:
getDbTrueLiteral
in classScalarTypeBoolean.BooleanBase
-
toBeanType
public Boolean toBeanType(Object value)
Description copied from interface:ScalarType
Convert the value as necessary to the logical Bean type.The type as per the bean property.
This is used to automatically convert id values (typically from a string to a int, long or UUID).
-
toJdbcType
public Object toJdbcType(Object value)
Description copied from interface:ScalarType
Convert the value as necessary to the JDBC type.Note 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.
-
bind
public void bind(DataBind b, Boolean value) throws SQLException
Description copied from interface:ScalarType
Convert (if necessary) and bind the value to the preparedStatement.value may need to be converted from the logical bean property type to the JDBC type.
- Throws:
SQLException
-
read
public Boolean read(DataReader dataReader) throws SQLException
Description copied from interface:ScalarType
Read the value from the resultSet and convert if necessary to the logical bean property value.- Throws:
SQLException
-
-