public class Lists
extends mvp.Model
There are couple design alternatives for this class. In Alternative 1, the way the class is currently designed, this Lists class supplies array-returning methods that trace to the operations in the abstract spec. These methods have been refined to return array values intstead of whole model objects. This refinement supports the companion view classes that are implemented as JTables, the rows of which are easily populated with array-valued data.
Alternative 2, not currently implemented, would be patterned after the current MontlyAgenda/MonthlyAgendaDisplay design. In this version of the design,, the Lists class would have data fields that point to instances of AppointmentLists, etc, and each such list class would provide iterator methods, a la MontlyAgenda. In this case, the traceable viewAppointmentsList method returns a (persistent) AppointmentList object that serves as the appointment list factory, a la MonthlyAgenda.
Alternative 1 is more directly traceable to the spec, and more functional in style, since the return values of the methods are not persistent objects. Alternative 2 can be considered more object-oriented in style, with its persistent object instances and iterator methods. I see no real qualitative difference between the two designs, only a stylistic difference.
| Constructor and Description |
|---|
Lists(CalendarDB caldb) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object[] |
generateSampleList()
Generate a sample appointments list for initial view testing.
|
java.lang.Object[] |
viewAppointmentsList()
List all appointments between the current list-start and list-end option
settings.
|
public Lists(CalendarDB caldb)
public java.lang.Object[] viewAppointmentsList()
protected java.lang.Object[] generateSampleList()