isTraceEnabled()) {
log.trace("listAllProjects() - Exit");
}
return projectsList;
} // End listAllProjects().
The thing worth noting here is that after the query is done to get the list of projects, similar
to how listUsers() gets the list of users, the code then uses a TimesheetDAO (which is
coming up shortly) to calculate the number of hours booked for the project. It??™s interesting
that the number of booked hours isn??™t stored directly as part of the project itself; it??™s instead a
dynamically calculated value. This is done to abstract out the TimesheetItem objects from the
Project objects they are (loosely) attached to.
With users and projects out of the way, only a single piece is missing, and that??™s dealing
with timesheets and timesheet items. Here we go, closing in on the conclusion!
TimesheetItem.java
Like the Project and User VO classes we looked at a short while ago, the TimesheetItem class is
again a plain old VO. This time, it describes a single entry a user makes for a given project on a
given day stating the number of hours booked to that project. When you look at the timesheet
portion of the home page, each text box, or more precisely the value you enter in it, is represented
in Timekeeper by a TimesheetItem instance.
Pages:
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881