public final class DateSequenceValueGenerator extends java.lang.Object implements ValueGenerator<java.time.ZonedDateTime>
ValueGenerator that returns a sequence of dates, starting at a given zoned date time and incremented by a
given time, specified as an increment and a temporal unit.| Modifier and Type | Class and Description |
|---|---|
static class |
DateSequenceValueGenerator.CalendarField
Deprecated.
use ChronoField instead. This enum is only kept to maintain backward compatibility
|
| Modifier and Type | Method and Description |
|---|---|
DateSequenceValueGenerator |
incrementingBy(int increment,
DateSequenceValueGenerator.CalendarField unit)
Deprecated.
use the other
incrementingBy(int, TemporalUnit) method |
DateSequenceValueGenerator |
incrementingBy(int increment,
java.time.temporal.TemporalUnit unit)
Increments the date by the given increment of the given unit.
|
java.time.ZonedDateTime |
nextValue()
Called each time a new row is inserted, to get the value to insert in the column using this value generator.
|
DateSequenceValueGenerator |
startingAt(java.util.Calendar startDate)
Deprecated.
use one of the other
startingAt() methods taking java.time types as argument |
DateSequenceValueGenerator |
startingAt(java.util.Date startDate)
Deprecated.
use one of the other
startingAt() methods taking java.time types as argument |
DateSequenceValueGenerator |
startingAt(java.util.Date startDate,
java.util.TimeZone timeZone)
Deprecated.
use one of the other
startingAt() methods taking java.time types as argument |
DateSequenceValueGenerator |
startingAt(java.time.LocalDate startDate)
Restarts the sequence at the given local date, in the default time zone
|
DateSequenceValueGenerator |
startingAt(java.time.LocalDateTime startDate)
Restarts the sequence at the given local date time, in the default time zone
|
DateSequenceValueGenerator |
startingAt(java.lang.String startDate)
Restarts the sequence at the given date, in the default time zone
|
DateSequenceValueGenerator |
startingAt(java.time.ZonedDateTime startDate)
Restarts the sequence at the given zoned date time
|
java.lang.String |
toString() |
@Deprecated public DateSequenceValueGenerator startingAt(@Nonnull java.util.Date startDate, @Nonnull java.util.TimeZone timeZone)
startingAt() methods taking java.time types as argument@Deprecated public DateSequenceValueGenerator startingAt(@Nonnull java.util.Date startDate)
startingAt() methods taking java.time types as argument@Deprecated public DateSequenceValueGenerator startingAt(@Nonnull java.util.Calendar startDate)
startingAt() methods taking java.time types as argumentpublic DateSequenceValueGenerator startingAt(@Nonnull java.lang.String startDate)
startDate - the starting date, as a String. The supported formats are the same as the ones supported by
Binders.timestampBinder(), i.e. the formats supported by
java.sql.Timestamp.valueOf() and java.sql.Date.valueOf()public DateSequenceValueGenerator startingAt(@Nonnull java.time.LocalDate startDate)
public DateSequenceValueGenerator startingAt(@Nonnull java.time.LocalDateTime startDate)
public DateSequenceValueGenerator startingAt(@Nonnull java.time.ZonedDateTime startDate)
@Deprecated public DateSequenceValueGenerator incrementingBy(int increment, @Nonnull DateSequenceValueGenerator.CalendarField unit)
incrementingBy(int, TemporalUnit) methodpublic DateSequenceValueGenerator incrementingBy(int increment, @Nonnull java.time.temporal.TemporalUnit unit)
public java.time.ZonedDateTime nextValue()
ValueGeneratornextValue in interface ValueGenerator<java.time.ZonedDateTime>public java.lang.String toString()
toString in class java.lang.Object