Package io.ebeaninternal.server.type
Class ScalarTypeLocalTimeWithNanos
- java.lang.Object
-
- io.ebeaninternal.server.type.ScalarTypeBase<LocalTime>
-
- io.ebeaninternal.server.type.ScalarTypeLocalTime
-
- io.ebeaninternal.server.type.ScalarTypeLocalTimeWithNanos
-
- All Implemented Interfaces:
StringFormatter
,StringParser
,ScalarDataReader<LocalTime>
,ScalarType<LocalTime>
public class ScalarTypeLocalTimeWithNanos extends ScalarTypeLocalTime
ScalarType for java.time.LocalTime stored with Nanos as DB BIGINT type.
-
-
Constructor Summary
Constructors Constructor Description ScalarTypeLocalTimeWithNanos()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(DataBind bind, LocalTime value)
Convert (if necessary) and bind the value to the preparedStatement.LocalTime
read(DataReader dataReader)
Read the value from the resultSet and convert if necessary to the logical bean property value.LocalTime
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.ScalarTypeLocalTime
convertFromMillis, formatValue, getDocType, 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
-
-
-
-
Constructor Detail
-
ScalarTypeLocalTimeWithNanos
public ScalarTypeLocalTimeWithNanos()
-
-
Method Detail
-
bind
public void bind(DataBind bind, LocalTime 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.
- Specified by:
bind
in interfaceScalarType<LocalTime>
- Overrides:
bind
in classScalarTypeLocalTime
- Throws:
SQLException
-
read
public LocalTime 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.- Specified by:
read
in interfaceScalarDataReader<LocalTime>
- Specified by:
read
in interfaceScalarType<LocalTime>
- Overrides:
read
in classScalarTypeLocalTime
- Throws:
SQLException
-
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.
- Specified by:
toJdbcType
in interfaceScalarType<LocalTime>
- Overrides:
toJdbcType
in classScalarTypeLocalTime
-
toBeanType
public LocalTime 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).
- Specified by:
toBeanType
in interfaceScalarType<LocalTime>
- Overrides:
toBeanType
in classScalarTypeLocalTime
-
-