|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.calendar.Appointments
This class represents a collection of appointments. The appointments collection may be used to iterate through appointments. By default, the appointments are sorted by start date in ascending order.
The appointments collection may also be used for searching. The following code segment shows how to reduce the appointments that are returned in the collection to ones with after a particular start date and implies sorting:
CalendarSession s = CalendarSession.getSession(user); Appointments apts = s.getAppointments(); Date startDate = ...some start date... Date endDate = ...some end date... AppointmentFilter filter = new AppointmentFilter(); filter.setDates(startDate, endDate); // filter by a range apts.setFilter(filter); apts.sort(SortOrder.ASCENDING, AppointmentProperty.START_DATE); Iterator it = apts.appointments().iterator(); while(it.hasNext()) { Appointment apt = (Appointment)it.next(); ... }
Field Summary | |
protected CalendarSession |
m_session
|
Method Summary | |
Appointment |
add()
Adds an appointment to the collection. |
AppointmentList |
appointments()
Gets the list of all appointments the authenticated user has READ access to. |
void |
clearFilter()
Clears the appointment filter for this collection of appointments. |
void |
clearSort()
Clears the appointment sorting for this collection of appointments. |
Appointment |
getAppointment(long lAptID)
Gets a appointment with the given appointment id. |
Appointment |
getAppointment(long lAptID,
java.util.Date instanceDate)
Gets a appointment with the given appointment id. |
int |
getCount()
Gets the number of appointments in the collection. |
AppointmentFilter |
getFilter()
Gets the appointment filter. |
SortOrder |
getSort()
Gets the sort order. |
AppointmentProperty[] |
getSortProperties()
Gets the sort properties. |
AppointmentProperty |
getSortProperty()
Gets the sort property. |
void |
setFilter(AppointmentFilter filter)
Sets the appointment filter. |
void |
sort(SortOrder order,
AppointmentProperty property)
Sorts the appointments in the collection. |
void |
sort(SortOrder order,
AppointmentProperty[] props)
Sorts the appointments in the collection by multiple properties. |
java.lang.String |
toString()
Returns the string representation of this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected CalendarSession m_session
Method Detail |
public Appointment add()
null
if create failspublic void setFilter(AppointmentFilter filter)
clearFilter()
.null
)public AppointmentFilter getFilter()
null
if no filter is setpublic void clearFilter()
public AppointmentList appointments()
READ
access to.Appointment
objectspublic int getCount()
public Appointment getAppointment(long lAptID) throws java.security.AccessControlException
lAptID
- the appointment idnull
if not foundgetAppointment(long,Date)
public Appointment getAppointment(long lAptID, java.util.Date instanceDate) throws java.security.AccessControlException
lAptID
- the appointment idinstanceDate
- the instance date (ignored if not recuring appointment)null
if not foundpublic void sort(SortOrder order, AppointmentProperty property)
sortOrder
- the sort orderproperty
- the property to sort bypublic void sort(SortOrder order, AppointmentProperty[] props)
sortOrder
- the sort orderprops
- the properties to sort bypublic void clearSort()
public SortOrder getSort()
null
if not sorting is imposedpublic AppointmentProperty getSortProperty()
null
if no property setgetSortProperties()
public AppointmentProperty[] getSortProperties()
null
if no property setpublic java.lang.String toString()
toString
in class java.lang.Object
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |