Groups the TimesheetEntry rows a member worked over a period into a single unit that is submitted and approved together. A batch covers the half-open period from its start date up to, but not including, its finish date, and holds the total hours claimed for that period. It carries a workflow status of S for submitted or A for approved, along with who last changed the status and when; a batch with any status set counts as closed and should no longer be edited. The find method returns the batches whose period contains a given worked date, which is how an entry is matched to the batch it belongs in.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
closedbooleanWhether the batch has been closed, meaning it has any non-blank status and should no longer be edited. Derived from the status, not a stored column.
finishDateDateThe moment the batch period ends. Exclusive, so an entry on exactly this date belongs to the next batch rather than this one. Never null.
hoursdoubleTotal hours claimed for this batch, as a decimal number of hours. Held on the batch rather than recalculated from the entries each time.
idlongThe database identifier of this batch.
notesStringFree-text notes about the batch, for example an explanation for the approver. Up to 10000 characters, and null when nothing was recorded.
startDateDateFirst moment of the period this batch covers. The period is half-open, so an entry on exactly this date belongs to this batch. Never null.
statusStringWorkflow state of the batch: S for submitted, A for approved. Null or blank while the batch is still open for editing.
statusChangedByProfileThe member who last changed the status, for example the approver. Set to the member who did the work when the batch is first created. Never null for a persisted batch.
statusDateDateWhen the status was last changed. Null while the status has never been set.
submittedDateDateWhen the batch was submitted for approval. Never null: it is stamped when the batch is created.
timesheetEntrysList<TimesheetEntry>The timesheet entries grouped into this batch. Note that this includes soft deleted entries, so filter them out yourself if you sum over the list.
workedByProfileThe member whose work this batch covers. Never null for a persisted batch.

Methods

getWorkedBy() · setWorkedBy(Profile workedBy) · getSubmittedDate() · setSubmittedDate(Date submittedDate) · getStartDate() · setStartDate(Date startDate) · getFinishDate() · setFinishDate(Date finishDate) · getHours() · setHours(double hours) · getStatus() · setStatus(String status) · getStatusDate() · setStatusDate(Date statusDate) · getStatusChangedBy() · setStatusChangedBy(Profile statusChangedBy) · getId() · setOrganisation(Organisation organisation) · getNotes() · setNotes(String notes) · getTimesheetEntrys() · setTimesheetEntrys(List<TimesheetEntry> timesheetEntrys) · isClosed() · rowId()

getWorkedBy()

Returns: Profile

The member whose work this batch covers. Never null for a persisted batch.

setWorkedBy(Profile workedBy)

Returns: void

Sets the member whose work this batch covers.

ParameterDescription
workedBythe member who did the work

getSubmittedDate()

Returns: Date

When the batch was submitted for approval. Never null: it is stamped when the batch is created.

setSubmittedDate(Date submittedDate)

Returns: void

Sets the date the batch was submitted for approval.

ParameterDescription
submittedDatethe date the batch was submitted

getStartDate()

Returns: Date

First moment of the period this batch covers. The period is half-open, so an entry on exactly this date belongs to this batch. Never null.

setStartDate(Date startDate)

Returns: void

Sets the first moment of the period this batch covers.

ParameterDescription
startDatethe inclusive start of the batch period

getFinishDate()

Returns: Date

The moment the batch period ends. Exclusive, so an entry on exactly this date belongs to the next batch rather than this one. Never null.

setFinishDate(Date finishDate)

Returns: void

Sets the moment the batch period ends.

ParameterDescription
finishDatethe exclusive end of the batch period

getHours()

Returns: double

Total hours claimed for this batch, as a decimal number of hours. Held on the batch rather than recalculated from the entries each time.

setHours(double hours)

Returns: void

Sets the total hours claimed for this batch.

ParameterDescription
hoursthe total hours claimed, as a decimal number of hours

getStatus()

Returns: String

Workflow state of the batch: S for submitted, A for approved. Null or blank while the batch is still open for editing.

setStatus(String status)

Returns: void

Sets the workflow state of the batch. Setting any non-blank value closes the batch.

ParameterDescription
statusthe status code, S for submitted or A for approved

getStatusDate()

Returns: Date

When the status was last changed. Null while the status has never been set.

setStatusDate(Date statusDate)

Returns: void

Sets the date the status was last changed.

ParameterDescription
statusDatethe date the status changed

getStatusChangedBy()

Returns: Profile

The member who last changed the status, for example the approver. Set to the member who did the work when the batch is first created. Never null for a persisted batch.

setStatusChangedBy(Profile statusChangedBy)

Returns: void

Sets the member who last changed the status.

ParameterDescription
statusChangedBythe member who last changed the status

getId()

Returns: long

The database identifier of this batch.

setOrganisation(Organisation organisation)

Returns: void

Sets the organisation the batch belongs to.

ParameterDescription
organisationthe owning organisation

getNotes()

Returns: String

Free-text notes about the batch, for example an explanation for the approver. Up to 10000 characters, and null when nothing was recorded.

setNotes(String notes)

Returns: void

Sets the free-text notes about the batch.

ParameterDescription
notesthe batch notes, up to 10000 characters

getTimesheetEntrys()

Returns: List<TimesheetEntry>

The timesheet entries grouped into this batch. Note that this includes soft deleted entries, so filter them out yourself if you sum over the list.

setTimesheetEntrys(List<TimesheetEntry> timesheetEntrys)

Returns: void

Sets the timesheet entries grouped into this batch.

ParameterDescription
timesheetEntrysthe entries belonging to this batch

isClosed()

Returns: boolean

Whether the batch has been closed, meaning it has any non-blank status and should no longer be edited. Derived from the status, not a stored column.

rowId()

Returns: Long

The database identifier of this batch, as required by the Relational interface.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.