|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.opnworks.timesheet.domain.Timesheet
Instances of this class represent timesheets and are persistent objects.
| Field Summary | |
static java.lang.String |
STATE_APPROVED_STRING
Description of the Field |
static java.lang.String |
STATE_CLOSED_STRING
Description of the Field |
static java.lang.String |
STATE_OPENED_STRING
Description of the Field |
static java.lang.String |
STATE_REJECTED_STRING
Description of the Field |
| Constructor Summary | |
Timesheet()
|
|
| Method Summary | |
void |
addLineItem(TimesheetLineItem lineItem)
Adds a line item to the Timesheet |
static void |
addStateListener(ITimesheetStateListener listener)
|
void |
approve(Comment comment,
Person person)
Set the state to APPROVED |
void |
close(Comment comment,
IPerson person)
Set the state to CLOSED |
java.util.List |
getComments()
|
IOrganization |
getEmployer()
|
java.lang.Long |
getId()
Gets the Id attribute of the IPersistent object |
java.util.Set |
getLineItems()
|
IPerson |
getOwner()
|
int |
getState()
|
java.lang.String |
getStateAsString()
|
float |
getTotal()
|
int |
getVersion()
|
Week |
getWeek()
|
boolean |
isApproved()
|
boolean |
isClosed()
|
boolean |
isOpen()
|
boolean |
isRejected()
|
void |
reject(Comment comment,
Person person)
Reject the timesheet |
void |
removeLineItem(TimesheetLineItem lineItem)
Description of the Method |
static void |
removeStateListener(ITimesheetStateListener listener)
|
void |
reopen(Comment comment,
IPerson person)
Set the state to OPEN |
void |
setEmployer(IOrganization organization)
|
void |
setId(java.lang.Long long1)
Sets the Id attribute of the IPersistent object |
void |
setOwner(IPerson person)
|
void |
setVersion(int version)
|
void |
setWeek(Week week)
|
void |
updateLineItem(TimesheetLineItem lineItem)
Description of the Method |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String STATE_OPENED_STRING
public static final java.lang.String STATE_CLOSED_STRING
public static final java.lang.String STATE_REJECTED_STRING
public static final java.lang.String STATE_APPROVED_STRING
| Constructor Detail |
public Timesheet()
| Method Detail |
public void setWeek(Week week)
week - public void setEmployer(IOrganization organization)
organization - public void setOwner(IPerson person)
person - public void setId(java.lang.Long long1)
IPersistent
setId in interface IPersistentlong1 - public void setVersion(int version)
setVersion in interface IPersistentversion - The new Version valuepublic java.util.Set getLineItems()
public Week getWeek()
public IOrganization getEmployer()
public IPerson getOwner()
public boolean isClosed()
public boolean isOpen()
public boolean isApproved()
public java.util.List getComments()
throws TimesheetException
TimesheetException - Description of Exceptionpublic int getState()
public java.lang.String getStateAsString()
public java.lang.Long getId()
IPersistent
getId in interface IPersistentpublic float getTotal()
public boolean isRejected()
public int getVersion()
getVersion in interface IPersistent
public void close(Comment comment,
IPerson person)
throws TimesheetException
comment - Description of Parameterperson - Description of Parameter
TimesheetException - Description of Exception
public void reopen(Comment comment,
IPerson person)
throws TimesheetException
comment - Description of Parameterperson - Description of Parameter
TimesheetException - Description of Exception
public void approve(Comment comment,
Person person)
throws TimesheetException
comment - Description of Parameterperson - Description of Parameter
TimesheetException - Description of Exception
public void reject(Comment comment,
Person person)
throws TimesheetException
comment - Description of Parameterperson - Description of Parameter
TimesheetException - Description of Exception
public void addLineItem(TimesheetLineItem lineItem)
throws TimesheetException
lineItem - The LineItem to be added
TimesheetException - Description of Exception
public void removeLineItem(TimesheetLineItem lineItem)
throws TimesheetException
lineItem - Description of Parameter
TimesheetException - Description of Exception
public void updateLineItem(TimesheetLineItem lineItem)
throws TimesheetException
lineItem - Description of Parameter
TimesheetException - Description of Exceptionpublic static void addStateListener(ITimesheetStateListener listener)
listener - The feature to be added to the StateListener attributepublic static void removeStateListener(ITimesheetStateListener listener)
listener - Description of Parameter
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||