/** * Constructs a LocalTime from the specified millis of day using the * ISO chronology. * <p> * The millisOfDay value may exceed the number of millis in one day, * but additional days will be ignored. * This method uses the UTC time zone internally. * * @param millisOfDay the number of milliseconds into a day to convert */ public static LocalTime fromMillisOfDay(long millisOfDay) { return fromMillisOfDay(millisOfDay, null); }
/** * Constructs a LocalTime from the specified millis of day using the * ISO chronology. * <p> * The millisOfDay value may exceed the number of millis in one day, * but additional days will be ignored. * This method uses the UTC time zone internally. * * @param millisOfDay the number of milliseconds into a day to convert */ public static LocalTime fromMillisOfDay(long millisOfDay) { return fromMillisOfDay(millisOfDay, null); }
@Override public LocalTime fromLong(Long microsFromMidnight, Schema schema, LogicalType type) { return LocalTime.fromMillisOfDay(microsFromMidnight / 1000); } }
@Override public LocalTime fromInt(Integer millisFromMidnight, Schema schema, LogicalType type) { return LocalTime.fromMillisOfDay(millisFromMidnight); }
@Override public LocalTime fromInt(Integer millisFromMidnight, Schema schema, LogicalType type) { return LocalTime.fromMillisOfDay(millisFromMidnight); }
@Override public LocalTime fromLong(Long microsFromMidnight, Schema schema, LogicalType type) { return LocalTime.fromMillisOfDay(microsFromMidnight / 1000); }
/** * Constructs a LocalTime from the specified millis of day using the * ISO chronology. * <p> * The millisOfDay value may exceed the number of millis in one day, * but additional days will be ignored. * This method uses the UTC time zone internally. * * @param millisOfDay the number of milliseconds into a day to convert */ public static LocalTime fromMillisOfDay(long millisOfDay) { return fromMillisOfDay(millisOfDay, null); }
LocalTime lT = LocalTime.fromMillisOfDay(t); this.value = KeyValueBuilder.initFrom(new OTime(lT.getHourOfDay(), lT.getMinuteOfHour(), lT.getSecondOfMinute(), lT.getMillisOfSecond())); this.path = path;
@Override public LocalTime convert(Long source) { return LocalTime.fromMillisOfDay(source); } }
/** * Constructs a LocalTime from the specified millis of day using the * ISO chronology. * <p> * The millisOfDay value may exceed the number of millis in one day, * but additional days will be ignored. * This method uses the UTC time zone internally. * * @param millisOfDay the number of milliseconds into a day to convert */ public static LocalTime fromMillisOfDay(long millisOfDay) { return fromMillisOfDay(millisOfDay, null); }
@Override public LocalTime fromLong(Long microsFromMidnight, Schema schema, LogicalType type) { return LocalTime.fromMillisOfDay(microsFromMidnight / 1000); } }
/** * Constructs a LocalTime from the specified millis of day using the * ISO chronology. * <p> * The millisOfDay value may exceed the number of millis in one day, * but additional days will be ignored. * This method uses the UTC time zone internally. * * @param millisOfDay the number of milliseconds into a day to convert */ public static LocalTime fromMillisOfDay(long millisOfDay) { return fromMillisOfDay(millisOfDay, null); }
@Override public LocalTime fromNonNullValue(Integer value) { return LocalTime.fromMillisOfDay(value); }
/** * Constructs a LocalTime from the specified millis of day using the * ISO chronology. * <p> * The millisOfDay value may exceed the number of millis in one day, * but additional days will be ignored. * This method uses the UTC time zone internally. * * @param millisOfDay the number of milliseconds into a day to convert */ public static LocalTime fromMillisOfDay(long millisOfDay) { return fromMillisOfDay(millisOfDay, null); }
@Override public LocalTime fromNonNullValue(Long value) { return LocalTime.fromMillisOfDay(value / 1000000L); }
/** * Constructs a LocalTime from the specified millis of day using the * ISO chronology. * <p> * The millisOfDay value may exceed the number of millis in one day, * but additional days will be ignored. * This method uses the UTC time zone internally. * * @param millisOfDay the number of milliseconds into a day to convert */ public static LocalTime fromMillisOfDay(long millisOfDay) { return fromMillisOfDay(millisOfDay, null); }
public Object nullSafeGet(ResultSet resultSet, String string) throws SQLException { Object timestamp = StandardBasicTypes.INTEGER.nullSafeGet(resultSet, string); if (timestamp == null) { return null; } return LocalTime.fromMillisOfDay(((Number) timestamp).intValue()); }
@Override public LocalTime deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) throws InvalidTypeException { if (bytes == null || bytes.remaining() == 0) return null; long nanosOfDay = bigint().deserializeNoBoxing(bytes, protocolVersion); return LocalTime.fromMillisOfDay(NANOSECONDS.toMillis(nanosOfDay)); }
@Override public Time deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) throws InvalidTypeException { if (bytes == null || bytes.remaining() == 0) return null; long nanosOfDay = bigint().deserializeNoBoxing(bytes, protocolVersion); return new Time(LocalTime.fromMillisOfDay(nanosOfDay / 1000000L).toDateTimeToday().getMillis()); }
@Override public String deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) throws InvalidTypeException { if (bytes == null || bytes.remaining() == 0) return null; long nanosOfDay = bigint().deserializeNoBoxing(bytes, protocolVersion); return LocalTime.fromMillisOfDay(nanosOfDay / 1000000).toString(); }