|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mycompany.expense.Report
This class represents a report in the ReportRegistry.
Field Summary | |
private int |
currentEntryId
|
private java.util.Map |
entries
|
private int |
id
|
private java.lang.String |
owner
|
private int |
status
|
static int |
STATUS_ACCEPTED
|
static int |
STATUS_NEW
|
static int |
STATUS_OPEN
|
static int |
STATUS_REJECTED
|
static int |
STATUS_SUBMITTED
|
private java.lang.String |
title
|
Constructor Summary | |
Report()
Creates a new, empty instance. |
|
Report(Report src)
Creates an instance that is a copy of the provided instance. |
Method Summary | |
void |
addEntry(ReportEntry entry)
Sets the "id" property of the provided ReportEntry and saves a copy of the ReportEntry (so that changes to the provided instance doesn't change the content of the report). |
private java.util.Map |
copyEntries()
Returns a Map with copies of all entries. |
private int |
getCurrentEntryId()
Returns the current ID value. |
java.util.Date |
getEndDate()
Returns the report end date. |
java.util.List |
getEntries()
Returns a List with copies of all entries. |
private java.util.List |
getEntriesSortedByDate()
Returns all entries sorted by date. |
ReportEntry |
getEntry(int id)
Returns a copy of the entry with the specified ID. |
int |
getId()
Returns the report ID. |
java.lang.String |
getOwner()
Returns the report owner. |
java.util.Date |
getStartDate()
Returns the report start date. |
int |
getStatus()
Returns the report status. |
java.lang.String |
getTitle()
Returns the report title. |
double |
getTotal()
Returns the total of all entry amounts. |
void |
removeEntry(int id)
Removes the entry with the specified ID. |
private void |
setCurrentEntryId(int currentEntryId)
Sets the current ID value. |
private void |
setEntries(java.util.Map entries)
Sets the entries. |
void |
setId(int id)
Sets the report ID. |
void |
setOwner(java.lang.String owner)
Sets the report owner. |
void |
setStatus(int status)
Sets the report status. |
void |
setTitle(java.lang.String title)
Sets the report title. |
java.lang.String |
toString()
Returns a String with all report properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int STATUS_NEW
public static final int STATUS_OPEN
public static final int STATUS_SUBMITTED
public static final int STATUS_ACCEPTED
public static final int STATUS_REJECTED
private int currentEntryId
private int id
private java.lang.String title
private java.lang.String owner
private int status
private java.util.Map entries
Constructor Detail |
public Report()
public Report(Report src)
Method Detail |
public int getId()
public void setId(int id)
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
public java.lang.String getOwner()
public void setOwner(java.lang.String owner)
public int getStatus()
public void setStatus(int status)
public void addEntry(ReportEntry entry)
public void removeEntry(int id)
public ReportEntry getEntry(int id)
public java.util.List getEntries()
public java.util.Date getStartDate()
public java.util.Date getEndDate()
public double getTotal()
public java.lang.String toString()
private java.util.List getEntriesSortedByDate()
private int getCurrentEntryId()
private void setCurrentEntryId(int currentEntryId)
private java.util.Map copyEntries()
private void setEntries(java.util.Map entries)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |