@Test public void convertFromTimestamp() { Date date = converter.toDate(new Timestamp(System.nanoTime())); assertNotNull(date); }
@AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) public Date toDate(Timestamp timestamp) { return timestamp != null ? Date.from(timestamp.toInstant()) : null; }
SqlTimestampConverter implements AtlasConverter<Timestamp> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) public Date toDate(Timestamp timestamp) { return timestamp != null ? Date.from(timestamp.toInstant()) : null; } }
SqlTimestampConverter implements AtlasConverter<Timestamp> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) public Date toDate(Timestamp timestamp) { return timestamp != null ? Date.from(timestamp.toInstant()) : null; }  }
SqlTimestampConverter implements AtlasConverter<Timestamp> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) public Date toDate(Timestamp timestamp) { return timestamp != null ? Date.from(timestamp.toInstant()) : null; }  @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) Calendar toCalendar(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) Date toDate(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) GregorianCalendar toGregorianCalendar(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) LocalDate toLocalDate(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) LocalTime toLocalTime(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) java.sql.Date toSqlDate(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) java.sql.Time toSqlTime(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(Timestamp timestamp); }
SqlTimestampConverter implements AtlasConverter<Timestamp> { @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) public Date toDate(Timestamp timestamp) { return timestamp != null ? Date.from(timestamp.toInstant()) : null; }  @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) Calendar toCalendar(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) Date toDate(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) GregorianCalendar toGregorianCalendar(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) LocalDate toLocalDate(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME) LocalDateTime toLocalDateTime(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) LocalTime toLocalTime(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE) java.sql.Date toSqlDate(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.TIME) java.sql.Time toSqlTime(Timestamp timestamp); @AtlasConversionInfo(sourceType = FieldType.DATE_TIME, targetType = FieldType.DATE_TIME_TZ) ZonedDateTime toZonedDateTime(Timestamp timestamp);  }