|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ninja_squad.dbsetup.generator.DateSequenceValueGenerator
public final class DateSequenceValueGenerator
A ValueGenerator
that returns a sequence of dates, starting at a given date and incremented by a given
time, specified as an increment and a calendar field.
Nested Class Summary | |
---|---|
static class |
DateSequenceValueGenerator.CalendarField
The available units for the increment of this sequence |
Method Summary | |
---|---|
DateSequenceValueGenerator |
incrementingBy(int increment,
DateSequenceValueGenerator.CalendarField unit)
Increments the date by the given increment of the given unit. |
java.util.Date |
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)
Restarts the sequence at the given date |
DateSequenceValueGenerator |
startingAt(java.util.Date startDate)
Restarts the sequence at the given date, in the default time zone |
DateSequenceValueGenerator |
startingAt(java.util.Date startDate,
java.util.TimeZone timeZone)
Restarts the sequence at the given date, in the given time zone |
DateSequenceValueGenerator |
startingAt(java.lang.String startDate)
Restarts the sequence at the given date, in the default time zone |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public DateSequenceValueGenerator startingAt(@Nonnull java.util.Date startDate, @Nonnull java.util.TimeZone timeZone)
public DateSequenceValueGenerator startingAt(@Nonnull java.util.Date startDate)
public DateSequenceValueGenerator startingAt(@Nonnull java.util.Calendar startDate)
public 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 incrementingBy(int increment, @Nonnull DateSequenceValueGenerator.CalendarField unit)
public java.util.Date nextValue()
ValueGenerator
nextValue
in interface ValueGenerator<java.util.Date>
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |