A newer version of this page is available.

Object Interaction

  • 2 minutes to read

This topic extends the previous Logical Layers article and provides information on objects interactions at different layers.

The interactions of the various objects defined in the Scheduler are illustrated in the following picture:

Object Interaction

Storage Layer objects - Control Layer objects

A single PersistentObject can produce several views, for example, when an appointment occupies more than one day and is displayed split apart, or when an appointment does not belong to a specific resource, and is displayed for each resource individually.

Every AppointmentViewInfo object belongs to a single appointment, which is accessible via the AppointmentViewInfo.Appointment property. You should use this property whenever it is necessary to get the related appointment for the visual object. This usually happens within CustomDraw event handlers, such as when you process mouse clicks to determine which object was clicked (hit testing) and so on.

Data Layer objects - Storage Layer objects

PersistentObjects at the storage layer are created from information provided by data objects in the data layer. The storage loads data according to the specified requirements.

A PersistentObject is created for each data object obtained from the data source. Not every PersistentObject so constructed is included into the storage collection, however: recurrence exceptions are created along with other persistent objects and not stored in the AppointmentBaseCollection, but are accessible via the Appointment.GetExceptions method of the Appointment.RecurrencePattern appointment.

If a PersistentObject is created from a data object, it contains a link to its data source record (the row). The corresponding object at the Data layer can be obtained via the IPersistentObject.GetSourceObject method. The scope of this method is limited to persistent objects originating from data objects and not for the appointment occurrences and newly created appointments.

There are certain scenarios in which persistent objects are created by replicating existing instances. It may be by the end-user interactively editing the PersistentObject's visual representation, or by them dragging and dropping an appointment to create a new one. These objects are not linked to any data layer item and the IPersistentObject.GetSourceObject method is inapplicable.

The following storage layer methods are useful for direct manipulation with linked objects at the Data layer: