java.lang.Object
ch.tocco.nice2.optional.timereport.impl.util.entities.TimereportDay

public class TimereportDay extends Object
  • Constructor Details

  • Method Details

    • getBalance

      public Duration getBalance()
    • setBalance

      public void setBalance(Duration balance)
    • setTargetTime

      public void setTargetTime(Duration targetTime)
    • getTargetTime

      public Duration getTargetTime()
    • getDate

      public org.joda.time.LocalDate getDate()
    • updateBalance

      public void updateBalance()
      Update the balance for the timereport day. The method also updates all the subsequent timereport days' balance.
    • updateVacation

      public void updateVacation(Duration oldValue, Duration newValue)
      update the vacation balance
      Parameters:
      oldValue - the old day_total_vacation value
      newValue - the new day_total_vacation value
    • updateDayTotals

      public void updateDayTotals()
      Update all the day totals for the Timereport_day. The method completely recomputes all the values and writes the results to the database
    • getDayTotal

      public Duration getDayTotal()
      The method returns the day total for the Timereport_day. It does however not recompute the day totals. Use updateDayTotals() if you're not sure that there are no changes on the db
      Returns:
      the day total for the Timereport_day, i.e. day_total_productive + day_total_unproductive
    • getDayTotalProductive

      public Duration getDayTotalProductive()
    • getDayTotalUnproductive

      public Duration getDayTotalUnproductive()
    • removeRecord

      public void removeRecord(TimereportRecord record)
      Remove a Timereport_record from the database. The removal causes day totals to recompute
      Parameters:
      record - the Timereport_record to be removed
    • getDayTotalVacation

      public Duration getDayTotalVacation()
    • getContract

      public Contract getContract()
    • getSummaryString

      public String getSummaryString(TextResources textResources)