Show/Hide Toolbars

The following sample reads an appointment record and returns the specified property values.

Code Snippet

protected AppointmentRepository appointmentRepository;

private List<String> getPropertiesToRead() {

List<String> props = new List<String>();

//the list of all available properties displays below but to increase efficiency in your searches, you can omit unnecessary properties from your application and those values will not be returned

props.add("uniqueKey");

props.add("version");

props.add("subject");

props.add("categories");

props.add("createdOn");

props.add("createdBy");

props.add("modifiedBy");

props.add("modifiedOn");

props.add("location");

props.add("startOn");

props.add("endOn");

props.add("allDay");

props.add("project");

props.add("attendees");

props.add("resources");

props.add("categories");

return props;

}

private Appointment readAppointment() throws Exception {

Appointment readAppointment = appointmentRepository.readAppointment(uniqueKey, getPropertiesToRead());

return readAppointment;

}