Package io.micronaut.data.runtime.date
Interface DateTimeProvider<T>
- Type Parameters:
T
- the return type of the time. When used with JPA the type that is returned should be the type that is defined in the entity. When used with JDBC, the type defined should always beDate
orDate
.
- All Known Implementing Classes:
CurrentDateTimeProvider
public interface DateTimeProvider<T>
Used by Micronaut Data to assign a time stamp to entity fields labeled with
DateCreated
or
DateUpdated
.-
Method Summary
-
Method Details
-
getNow
T getNow()Returns the time to be used for the timestamp.- Returns:
- The resulting time.
-