org.kuali.hr.time.timeblock
Class TimeBlock

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.hr.time.timeblock.TimeBlock
All Implemented Interfaces:
Serializable, Comparable, org.apache.ojb.broker.PersistenceBrokerAware, org.kuali.rice.core.api.mo.common.GloballyUnique, org.kuali.rice.core.api.mo.common.Versioned, org.kuali.rice.core.api.mo.ModelObjectBasic, org.kuali.rice.krad.bo.BusinessObject, org.kuali.rice.krad.bo.PersistableBusinessObject
Direct Known Subclasses:
TimeBlockHistory

public class TimeBlock
extends org.kuali.rice.krad.bo.PersistableBusinessObjectBase
implements Comparable

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, versionNumber
 
Constructor Summary
  TimeBlock()
           
protected TimeBlock(TimeBlock b)
          Word on the street is that Object.clone() is a POS.
 
Method Summary
 void addTimeHourDetail(TimeHourDetail timeHourDetail)
           
 int compareTo(Object o)
          This is for distribute time block page to sort it by begin date/time
 int compareTo(TimeBlock tb)
           
 TimeBlock copy()
           
 boolean equals(Object obj)
           
 String getActualBeginTimeString()
           
 String getActualEndTimeString()
           
 BigDecimal getAmount()
           
 String getAssignmentDescription()
           
 String getAssignmentKey()
           
 Date getBeginDate()
           
 Time getBeginTime()
           
 org.joda.time.DateTime getBeginTimeDisplay()
          Use this call for all GUI/Display related rendering of the BEGIN timestamp of the given time block.
 Date getBeginTimeDisplayDate()
          Helper to call DateTime.toDate().
 String getBeginTimeDisplayDateOnlyString()
           
 String getBeginTimeDisplayTimeOnlyString()
           
 Timestamp getBeginTimestamp()
           
 String getBeginTimestampTimezone()
           
 String getClockLogBeginId()
           
 Boolean getClockLogCreated()
           
 String getClockLogEndId()
           
 Boolean getDeleteable()
           
 String getDocumentId()
           
 String getEarnCode()
           
 String getEarnCodeType()
           
 Boolean getEditable()
           
 Date getEndDate()
           
 Time getEndTime()
           
 org.joda.time.DateTime getEndTimeDisplay()
          Use this call for all GUI/Display related rendering of the END timestamp of the given time block.
 Date getEndTimeDisplayDate()
          Helper to call DateTime.toDate().
 String getEndTimeDisplayDateOnlyString()
           
 String getEndTimeDisplayTimeOnlyString()
           
 Timestamp getEndTimestamp()
           
 String getEndTimestampTimezone()
           
 BigDecimal getHours()
           
 Long getJobNumber()
           
 Boolean getOvertimeEditable()
           
 String getOvertimePref()
           
 String getPrincipalId()
           
 Boolean getRegEarnCodeEditable()
           
 Long getTask()
           
 Boolean getTimeBlockEditable()
           
 List<TimeBlockHistory> getTimeBlockHistories()
           
 List<TimeHourDetail> getTimeHourDetails()
           
 TimesheetDocumentHeader getTimesheetDocumentHeader()
           
 Timestamp getTimestamp()
           
 String getTkTimeBlockId()
           
 org.kuali.rice.kim.api.identity.Person getUser()
           
 String getUserPrincipalId()
           
 Long getWorkArea()
           
 int hashCode()
           
 boolean isLunchDeleted()
           
 Boolean isPushBackward()
           
 void removeTimeHourDetail(TimeHourDetail timeHourDetail)
           
 void setAmount(BigDecimal amount)
           
 void setAssignmentKey(String assignmentDescription)
           
 void setBeginDate(Date beginDate)
           
 void setBeginTime(Time beginTime)
           
 void setBeginTimeDisplay(org.joda.time.DateTime beginTimeDisplay)
          Set this value with a DateTime that is in the current users Timezone.
 void setBeginTimestamp(Timestamp beginTimestamp)
           
 void setBeginTimestampTimezone(String beginTimestampTimezone)
           
 void setClockLogBeginId(String clockLogBeginId)
           
 void setClockLogCreated(Boolean clockLogCreated)
           
 void setClockLogEndId(String clockLogEndId)
           
 void setDocumentId(String documentId)
           
 void setEarnCode(String earnCode)
           
 void setEarnCodeType(String earnCodeType)
           
 void setEndDate(Date endDate)
           
 void setEndTime(Time endTime)
           
 void setEndTimeDisplay(org.joda.time.DateTime endTimeDisplay)
          Set this value with a DateTime that is in the current users Timezone.
 void setEndTimestamp(Timestamp endTimestamp)
           
 void setEndTimestampTimezone(String endTimestampTimezone)
           
 void setHours(BigDecimal hours)
           
 void setJobNumber(Long jobNumber)
           
 void setLunchDeleted(boolean lunchDeleted)
           
 void setOvertimePref(String overtimePref)
           
 void setPrincipalId(String principalId)
           
 void setPushBackward(Boolean pushBackward)
           
 void setTask(Long task)
           
 void setTimeBlockHistories(List<TimeBlockHistory> timeBlockHistories)
           
 void setTimeHourDetails(List<TimeHourDetail> timeHourDetails)
           
 void setTimesheetDocumentHeader(TimesheetDocumentHeader timesheetDocumentHeader)
           
 void setTimestamp(Timestamp timestamp)
           
 void setTkTimeBlockId(String tkTimeBlockId)
           
 void setUser(org.kuali.rice.kim.api.identity.Person user)
           
 void setUserPrincipalId(String userPrincipalId)
           
 void setWorkArea(Long workArea)
           
 String toCSVString()
           
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getObjectId, getPersistenceService, getPersistenceStructureService, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class org.kuali.rice.krad.bo.BusinessObjectBase
toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.core.api.mo.ModelObjectBasic
toString
 

Constructor Detail

TimeBlock

public TimeBlock()

TimeBlock

protected TimeBlock(TimeBlock b)
Word on the street is that Object.clone() is a POS. We only need some basics for comparison, so we'll implement a simple copy constructor instead.

TODO: Check whether or not it matters if the History is copied, this operation needs to be as inexpensive as possible.

Parameters:
b - The TimeBlock to copy values from when creating this instance.
Method Detail

getDocumentId

public String getDocumentId()

setDocumentId

public void setDocumentId(String documentId)

getJobNumber

public Long getJobNumber()

setJobNumber

public void setJobNumber(Long jobNumber)

getEarnCode

public String getEarnCode()

setEarnCode

public void setEarnCode(String earnCode)

getBeginTimestamp

public Timestamp getBeginTimestamp()

setBeginTimestamp

public void setBeginTimestamp(Timestamp beginTimestamp)

getEndTimestamp

public Timestamp getEndTimestamp()

setEndTimestamp

public void setEndTimestamp(Timestamp endTimestamp)

getBeginDate

public Date getBeginDate()

setBeginDate

public void setBeginDate(Date beginDate)

getEndDate

public Date getEndDate()

setEndDate

public void setEndDate(Date endDate)

getBeginTime

public Time getBeginTime()

setBeginTime

public void setBeginTime(Time beginTime)

getEndTime

public Time getEndTime()

setEndTime

public void setEndTime(Time endTime)

getClockLogCreated

public Boolean getClockLogCreated()

setClockLogCreated

public void setClockLogCreated(Boolean clockLogCreated)

getHours

public BigDecimal getHours()

setHours

public void setHours(BigDecimal hours)

getAmount

public BigDecimal getAmount()

setAmount

public void setAmount(BigDecimal amount)

getUserPrincipalId

public String getUserPrincipalId()

setUserPrincipalId

public void setUserPrincipalId(String userPrincipalId)

getTimestamp

public Timestamp getTimestamp()

setTimestamp

public void setTimestamp(Timestamp timestamp)

getBeginTimestampTimezone

public String getBeginTimestampTimezone()

setBeginTimestampTimezone

public void setBeginTimestampTimezone(String beginTimestampTimezone)

getEndTimestampTimezone

public String getEndTimestampTimezone()

setEndTimestampTimezone

public void setEndTimestampTimezone(String endTimestampTimezone)

toCSVString

public String toCSVString()

getTkTimeBlockId

public String getTkTimeBlockId()

setTkTimeBlockId

public void setTkTimeBlockId(String tkTimeBlockId)

getWorkArea

public Long getWorkArea()

setWorkArea

public void setWorkArea(Long workArea)

getTask

public Long getTask()

setTask

public void setTask(Long task)

getTimeHourDetails

public List<TimeHourDetail> getTimeHourDetails()

addTimeHourDetail

public void addTimeHourDetail(TimeHourDetail timeHourDetail)

removeTimeHourDetail

public void removeTimeHourDetail(TimeHourDetail timeHourDetail)

setTimeHourDetails

public void setTimeHourDetails(List<TimeHourDetail> timeHourDetails)

isPushBackward

public Boolean isPushBackward()

setPushBackward

public void setPushBackward(Boolean pushBackward)

getBeginTimeDisplay

public org.joda.time.DateTime getBeginTimeDisplay()
Use this call for all GUI/Display related rendering of the BEGIN timestamp of the given time block. Timeblocks require pre-processing before there will be a non-null return value here.

Returns:
The Timeblock Begin time to display, with the Users Timezone taken into account and applied to this DateTime object.

getBeginTimeDisplayDate

public Date getBeginTimeDisplayDate()
Helper to call DateTime.toDate().

Returns:
a java.util.Date representing the getBeginTimeDisplay() DateTime.

getBeginTimeDisplayDateOnlyString

public String getBeginTimeDisplayDateOnlyString()

getBeginTimeDisplayTimeOnlyString

public String getBeginTimeDisplayTimeOnlyString()

getEndTimeDisplayDateOnlyString

public String getEndTimeDisplayDateOnlyString()

getEndTimeDisplayTimeOnlyString

public String getEndTimeDisplayTimeOnlyString()

setBeginTimeDisplay

public void setBeginTimeDisplay(org.joda.time.DateTime beginTimeDisplay)
Set this value with a DateTime that is in the current users Timezone. This should happen as a pre processing step for display purposes. Do not use these values for server-side computation.

Parameters:
beginTimeDisplay -

getEndTimeDisplay

public org.joda.time.DateTime getEndTimeDisplay()
Use this call for all GUI/Display related rendering of the END timestamp of the given time block. Timeblocks require pre-processing before there will be a non-null return value here.

Returns:
The Timeblock end time to display, with the Users Timezone taken into account and applied to this DateTime object.

getEndTimeDisplayDate

public Date getEndTimeDisplayDate()
Helper to call DateTime.toDate().

Returns:
a java.util.Date representing the getEndTimeDisplay() DateTime.

setEndTimeDisplay

public void setEndTimeDisplay(org.joda.time.DateTime endTimeDisplay)
Set this value with a DateTime that is in the current users Timezone. This should happen as a pre processing step for display purposes. Do not use these values for server-side computation.

Parameters:
endTimeDisplay -

getTimesheetDocumentHeader

public TimesheetDocumentHeader getTimesheetDocumentHeader()

setTimesheetDocumentHeader

public void setTimesheetDocumentHeader(TimesheetDocumentHeader timesheetDocumentHeader)

getTimeBlockHistories

public List<TimeBlockHistory> getTimeBlockHistories()

setTimeBlockHistories

public void setTimeBlockHistories(List<TimeBlockHistory> timeBlockHistories)

getClockLogBeginId

public String getClockLogBeginId()

setClockLogBeginId

public void setClockLogBeginId(String clockLogBeginId)

getClockLogEndId

public String getClockLogEndId()

setClockLogEndId

public void setClockLogEndId(String clockLogEndId)

getAssignmentKey

public String getAssignmentKey()

setAssignmentKey

public void setAssignmentKey(String assignmentDescription)

getAssignmentDescription

public String getAssignmentDescription()

copy

public TimeBlock copy()
Returns:
A new copy of this TimeBlock.

getEarnCodeType

public String getEarnCodeType()

setEarnCodeType

public void setEarnCodeType(String earnCodeType)

compareTo

public int compareTo(Object o)
This is for distribute time block page to sort it by begin date/time

Specified by:
compareTo in interface Comparable
See Also:
Comparable.compareTo(java.lang.Object)

compareTo

public int compareTo(TimeBlock tb)

getEditable

public Boolean getEditable()

getPrincipalId

public String getPrincipalId()

setPrincipalId

public void setPrincipalId(String principalId)

getOvertimePref

public String getOvertimePref()

setOvertimePref

public void setOvertimePref(String overtimePref)

getActualBeginTimeString

public String getActualBeginTimeString()

getActualEndTimeString

public String getActualEndTimeString()

getDeleteable

public Boolean getDeleteable()

getOvertimeEditable

public Boolean getOvertimeEditable()

getRegEarnCodeEditable

public Boolean getRegEarnCodeEditable()

getTimeBlockEditable

public Boolean getTimeBlockEditable()

isLunchDeleted

public boolean isLunchDeleted()

setLunchDeleted

public void setLunchDeleted(boolean lunchDeleted)

getUser

public org.kuali.rice.kim.api.identity.Person getUser()

setUser

public void setUser(org.kuali.rice.kim.api.identity.Person user)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.