Package io.ebeaninternal.server.type
Class ScalarTypeJodaLocalTimeUTC
- java.lang.Object
-
- io.ebeaninternal.server.type.ScalarTypeBase<org.joda.time.LocalTime>
-
- io.ebeaninternal.server.type.ScalarTypeJodaLocalTime
-
- io.ebeaninternal.server.type.ScalarTypeJodaLocalTimeUTC
-
- All Implemented Interfaces:
StringFormatter
,StringParser
,ScalarDataReader<org.joda.time.LocalTime>
,ScalarType<org.joda.time.LocalTime>
public class ScalarTypeJodaLocalTimeUTC extends ScalarTypeJodaLocalTime
ScalarType for Joda LocalTime. This maps to a JDBC Time.
-
-
Constructor Summary
Constructors Constructor Description ScalarTypeJodaLocalTimeUTC()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(DataBind b, org.joda.time.LocalTime value)
Convert (if necessary) and bind the value to the preparedStatement.org.joda.time.LocalTime
convertFromMillis(long systemTimeMillis)
Convert the systemTimeMillis into the appropriate java object.org.joda.time.LocalTime
read(DataReader dataReader)
Read the value from the resultSet and convert if necessary to the logical bean property value.org.joda.time.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.ScalarTypeJodaLocalTime
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
-
ScalarTypeJodaLocalTimeUTC
public ScalarTypeJodaLocalTimeUTC()
-
-
Method Detail
-
bind
public void bind(DataBind b, org.joda.time.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<org.joda.time.LocalTime>
- Overrides:
bind
in classScalarTypeJodaLocalTime
- Throws:
SQLException
-
read
public org.joda.time.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<org.joda.time.LocalTime>
- Specified by:
read
in interfaceScalarType<org.joda.time.LocalTime>
- Overrides:
read
in classScalarTypeJodaLocalTime
- 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<org.joda.time.LocalTime>
- Overrides:
toJdbcType
in classScalarTypeJodaLocalTime
-
toBeanType
public org.joda.time.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<org.joda.time.LocalTime>
- Overrides:
toBeanType
in classScalarTypeJodaLocalTime
-
convertFromMillis
public org.joda.time.LocalTime 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<org.joda.time.LocalTime>
- Overrides:
convertFromMillis
in classScalarTypeJodaLocalTime
-
-