Package io.ebeaninternal.server.type
Class ScalarTypeBoolean.BooleanBase
- java.lang.Object
-
- io.ebeaninternal.server.type.ScalarTypeBase<Boolean>
-
- io.ebeaninternal.server.type.ScalarTypeBoolean.BooleanBase
-
- All Implemented Interfaces:
StringFormatter
,StringParser
,ScalarDataReader<Boolean>
,ScalarType<Boolean>
,ScalarTypeBool
,ScalarTypeLogicalType
- Direct Known Subclasses:
ScalarTypeBoolean.Native
- Enclosing class:
- ScalarTypeBoolean
public abstract static class ScalarTypeBoolean.BooleanBase extends ScalarTypeBase<Boolean> implements ScalarTypeBool
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Boolean
convertFromMillis(long systemTimeMillis)
Convert the systemTimeMillis into the appropriate java object.String
formatValue(Boolean t)
Convert the type into a string representation.abstract String
getDbFalseLiteral()
Return the DB literal value for false.abstract String
getDbTrueLiteral()
Return the DB literal value for true.DocPropertyType
getDocType()
Return the type this maps to for JSON document stores.int
getLogicalType()
Return the DB agnostic logical type.boolean
isDateTimeCapable()
Return true if the type can accept long systemTimeMillis input.Boolean
jsonRead(com.fasterxml.jackson.core.JsonParser parser)
Read the value from JsonParser.void
jsonWrite(com.fasterxml.jackson.core.JsonGenerator writer, Boolean value)
Write the value to the JsonGenerator.Boolean
parse(String value)
Convert the string value to the appropriate java object.Boolean
readData(DataInput dataInput)
Read the value from binary input.void
writeData(DataOutput dataOutput, Boolean val)
Write the value to binary output.-
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, bind, format, getJdbcType, getLength, getType, isBinaryType, isDirty, isJdbcNative, isMutable, loadIgnore, read, toBeanType, toJdbcType
-
-
-
-
Method Detail
-
getLogicalType
public int getLogicalType()
Description copied from interface:ScalarTypeLogicalType
Return the DB agnostic logical type.- Specified by:
getLogicalType
in interfaceScalarTypeLogicalType
-
getDbFalseLiteral
public abstract String getDbFalseLiteral()
Return the DB literal value for false.- Specified by:
getDbFalseLiteral
in interfaceScalarTypeBool
-
getDbTrueLiteral
public abstract String getDbTrueLiteral()
Return the DB literal value for true.- Specified by:
getDbTrueLiteral
in interfaceScalarTypeBool
-
formatValue
public String formatValue(Boolean t)
Description copied from interface:ScalarType
Convert the type into a string representation.Reciprocal of parse().
- Specified by:
formatValue
in interfaceScalarType<Boolean>
-
parse
public Boolean parse(String value)
Description copied from interface:ScalarType
Convert the string value to the appropriate java object.Mostly used to support CSV, JSON and XML parsing.
Reciprocal of formatValue().
- Specified by:
parse
in interfaceScalarType<Boolean>
- Specified by:
parse
in interfaceStringParser
-
convertFromMillis
public Boolean convertFromMillis(long systemTimeMillis)
Description copied from interface:ScalarType
Convert the systemTimeMillis into the appropriate java object.For non dateTime types this will throw an exception.
- Specified by:
convertFromMillis
in interfaceScalarType<Boolean>
-
isDateTimeCapable
public boolean isDateTimeCapable()
Description copied from interface:ScalarType
Return true if the type can accept long systemTimeMillis input.This is used to determine if is is sensible to use the
ScalarType.convertFromMillis(long)
method.This includes the Date, Calendar, sql Date, Time, Timestamp, JODA types as well as Long, BigDecimal and String (although it generally is not expected to parse systemTimeMillis to a String or BigDecimal).
- Specified by:
isDateTimeCapable
in interfaceScalarType<Boolean>
-
readData
public Boolean readData(DataInput dataInput) throws IOException
Description copied from interface:ScalarType
Read the value from binary input.- Specified by:
readData
in interfaceScalarType<Boolean>
- Throws:
IOException
-
writeData
public void writeData(DataOutput dataOutput, Boolean val) throws IOException
Description copied from interface:ScalarType
Write the value to binary output.- Specified by:
writeData
in interfaceScalarType<Boolean>
- Throws:
IOException
-
jsonRead
public Boolean jsonRead(com.fasterxml.jackson.core.JsonParser parser)
Description copied from interface:ScalarType
Read the value from JsonParser.- Specified by:
jsonRead
in interfaceScalarType<Boolean>
-
jsonWrite
public void jsonWrite(com.fasterxml.jackson.core.JsonGenerator writer, Boolean value) throws IOException
Description copied from interface:ScalarType
Write the value to the JsonGenerator.- Specified by:
jsonWrite
in interfaceScalarType<Boolean>
- Throws:
IOException
-
getDocType
public DocPropertyType getDocType()
Description copied from interface:ScalarType
Return the type this maps to for JSON document stores.- Specified by:
getDocType
in interfaceScalarType<Boolean>
-
-