Improve documentation of new methods in PersonalTimesheetsPeriodicityEnum
Also documented method to generate a string representing a personal timesheet in MonthlyTimesheetDTO. FEA: ItEr77S07PersonalTimesheetsPeriodictyConfiguration
This commit is contained in:
parent
425a16d093
commit
dfe1184c8b
2 changed files with 27 additions and 0 deletions
|
|
@ -162,17 +162,40 @@ public enum PersonalTimesheetsPeriodicityEnum {
|
|||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the start date of the personal timesheet which includes the
|
||||
* specified <code>date</code>.
|
||||
*/
|
||||
public abstract LocalDate getStart(LocalDate date);
|
||||
|
||||
/**
|
||||
* Returns the end date of the personal timesheet which includes the
|
||||
* specified <code>date</code>.
|
||||
*/
|
||||
public abstract LocalDate getEnd(LocalDate date);
|
||||
|
||||
/**
|
||||
* Returns the number of personal timesheets between the specified dates.
|
||||
*/
|
||||
public abstract int getItemsBetween(LocalDate start, LocalDate end);
|
||||
|
||||
/**
|
||||
* Returns the date of the personal timesheet in the position specified by
|
||||
* <code>item</code> taking into account the <code>fromDate</code>.
|
||||
*/
|
||||
public abstract LocalDate getDateForItemFromDate(int item,
|
||||
LocalDate fromDate);
|
||||
|
||||
/**
|
||||
* Returns the date of the previous personal timesheet to the one which
|
||||
* includes the specified <code>date</code>.
|
||||
*/
|
||||
public abstract LocalDate previous(LocalDate date);
|
||||
|
||||
/**
|
||||
* Returns the date of the next personal timesheet to the one which includes
|
||||
* the specified <code>date</code>.
|
||||
*/
|
||||
public abstract LocalDate next(LocalDate date);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,10 @@ public class MonthlyTimesheetDTO {
|
|||
return toString(periodicity, date);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representing the personal timehseet in a given
|
||||
* <code>date</code> depending on the <code>periodicity</code>.
|
||||
*/
|
||||
public static String toString(PersonalTimesheetsPeriodicityEnum periodicity, LocalDate date) {
|
||||
switch (periodicity) {
|
||||
case WEEKLY:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue