@Test public void checkConvertToEntityAttributeReturnConvertedOnNonNull() { final OffsetDateTime time = OffsetDateTime.of( LocalDateTime.of(2020, 10, 20, 6, 23), ZoneOffset.ofHours(3)); final ZonedDateTime act = cut.convertToEntityAttribute(time); assertEquals(time, act.toOffsetDateTime()); }
@Override public ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset) { return dateTimeWithOffset == null ? null : dateTimeWithOffset.toZonedDateTime(); }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset) { return dateTimeWithOffset == null ? null : dateTimeWithOffset.toZonedDateTime(); } }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset) { return dateTimeWithOffset == null ? null : dateTimeWithOffset.toZonedDateTime(); }  }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset) { return dateTimeWithOffset == null ? null : dateTimeWithOffset.toZonedDateTime(); }  @Override OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime); @Override ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset); }
OffsetDateTimeConverter implements AttributeConverter<ZonedDateTime, OffsetDateTime> { @Override public ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset) { return dateTimeWithOffset == null ? null : dateTimeWithOffset.toZonedDateTime(); }  @Override OffsetDateTime convertToDatabaseColumn(final ZonedDateTime zonedDateTime); @Override ZonedDateTime convertToEntityAttribute(final OffsetDateTime dateTimeWithOffset);  }