A single dated event on a Calendar, holding its timing, location and description as well as the registration settings that decide whether people may sign themselves up and how many can attend. An event always belongs to exactly one Calendar and is identified within it by name, which is the file name CalDAV clients see. Attendance is not stored on the event itself: every invitation, registration and guest is a separate AttendeeRequest row pointing back at this event as its organiser event, which is why numAttendees runs a query rather than reading a field. Reminder rows attached to the event drive the reminder emails sent before it starts.
Group: Database Entities
Implements: Serializable, PortableId
Properties
| Property | Returns | Description |
|---|---|---|
| allowGuests | Boolean | Whether an attendee may bring guests as well as registering themselves. Null means the setting has never been chosen, which is treated as allowed; call allowGuests for the resolved value. |
| allowRegistration | Boolean | Whether people may register themselves to attend. Null means the setting has never been chosen, which is treated as allowed; call allowRegistration for the resolved value. |
| attendeeRequest | AttendeeRequest | The attendee request this event was copied from, set when the event is an attendee's own copy rather than the organiser's original. Null on an organiser's event. |
| calendar | Calendar | The calendar this event belongs to, which in turn determines the organisation or website that owns it. Required, and lazily loaded. |
| createdDate | Date | When this event record was first created. This is the audit timestamp, not the date the event takes place; see getStartDate for that. Required. |
| description | String | Long form description of the event, up to 100000 characters and usually HTML entered in the event editor. May be null. |
| emailConfirm | Boolean | Whether an email is sent to an attendee when they register. Null means the setting has never been chosen, which is treated as true; call emailConfirm for the resolved value. |
| emailConfirmSubject | String | Subject line used for the confirmation email sent when someone registers for this event. |
| emailConfirmTemplate | String | MVEL template used to build the body of the confirmation email, up to 4000 characters. Only used when confirmation emails are switched on. |
| endDate | Date | When the event finishes. Required, and nothing here checks that it falls after the start date. |
| externalUrl | String | Link to the original item when this event mirrors something held in an external system. Null for events that were created in Kademi. |
| id | Long | The database-assigned unique identifier for this event. |
| location | String | Free text location for the event, up to 2000 characters. It is not geocoded or validated in any way. |
| maxAttendees | Integer | The largest number of accepted attendees the event will take. Null means no limit has been set. |
| modifiedDate | Date | When this event record was last changed. Set by whatever code updates the event rather than by Hibernate, so it only moves when the caller maintains it. Required. |
| name | String | The file name of this event within its calendar. This is the portable, path-safe identifier used by CalDAV clients and matched by Calendar.event, not a display label; use the summary for that. Never null for a persisted event. |
| organisor | Profile | The profile that owns and manages this event. Note the spelling of the property: it is organisor here, while the attendee request's link to the event is spelled organiserEvent. May be null. |
| reminders | List<Reminder> | The reminders configured on this event, each of which sends an email a set period before the event starts. Empty or null when no reminders have been added. Deleting the event deletes them. |
| shortPath | String | Short, URL-friendly path segment used to address this event on a website. It is looked up together with the website the calendar belongs to, so it only has to be unique within that site. May be null. |
| startDate | Date | When the event begins. Reminders count backwards from this value and calendar queries filter and sort on it, so it drives most of the event's behaviour. Required. |
| summary | String | Short title line for the event, up to 5000 characters, used as its label in calendar views and emails. Unlike the name this is free text with no uniqueness or path-safety guarantee. |
| suppressGuestEmails | Boolean | Whether emails should never be sent to guests of attendees. Null means the setting has never been chosen, which is treated as false; call suppressGuestEmails for the resolved value. |
| timezone | String | Name of the timezone the start and end dates were entered in, for example Pacific/Auckland. The dates themselves are stored as plain timestamps, so this records the author's intent rather than shifting them. May be null. |
Methods
getId() · getExternalUrl() · getName() · getCalendar() · getCreatedDate() · getModifiedDate() · getStartDate() · getEndDate() · getTimezone() · getSummary() · getDescription() · getAttendeeRequest() · getOrganisor() · getLocation() · isAllowRegistration() · isAllowGuests() · isSuppressGuestEmails() · getMaxAttendees() · isEmailConfirm() · getEmailConfirmSubject() · getEmailConfirmTemplate() · getReminders() · getShortPath() · allowGuests() · allowRegistration() · emailConfirm() · suppressGuestEmails() · numAttendees()
getId()
Returns: Long
The database-assigned unique identifier for this event.
getExternalUrl()
Returns: String
Link to the original item when this event mirrors something held in an external system. Null for events that were created in Kademi.
getName()
Returns: String
The file name of this event within its calendar. This is the portable, path-safe identifier used by CalDAV clients and matched by Calendar.event, not a display label; use the summary for that. Never null for a persisted event.
getCalendar()
Returns: Calendar
The calendar this event belongs to, which in turn determines the organisation or website that owns it. Required, and lazily loaded.
getCreatedDate()
Returns: Date
When this event record was first created. This is the audit timestamp, not the date the event takes place; see getStartDate for that. Required.
getModifiedDate()
Returns: Date
When this event record was last changed. Set by whatever code updates the event rather than by Hibernate, so it only moves when the caller maintains it. Required.
getStartDate()
Returns: Date
When the event begins. Reminders count backwards from this value and calendar queries filter and sort on it, so it drives most of the event's behaviour. Required.
getEndDate()
Returns: Date
When the event finishes. Required, and nothing here checks that it falls after the start date.
getTimezone()
Returns: String
Name of the timezone the start and end dates were entered in, for example Pacific/Auckland. The dates themselves are stored as plain timestamps, so this records the author's intent rather than shifting them. May be null.
getSummary()
Returns: String
Short title line for the event, up to 5000 characters, used as its label in calendar views and emails. Unlike the name this is free text with no uniqueness or path-safety guarantee.
getDescription()
Returns: String
Long form description of the event, up to 100000 characters and usually HTML entered in the event editor. May be null.
getAttendeeRequest()
Returns: AttendeeRequest
The attendee request this event was copied from, set when the event is an attendee's own copy rather than the organiser's original. Null on an organiser's event.
getOrganisor()
Returns: Profile
The profile that owns and manages this event. Note the spelling of the property: it is organisor here, while the attendee request's link to the event is spelled organiserEvent. May be null.
getLocation()
Returns: String
Free text location for the event, up to 2000 characters. It is not geocoded or validated in any way.
isAllowRegistration()
Returns: Boolean
Whether people may register themselves to attend. Null means the setting has never been chosen, which is treated as allowed; call allowRegistration for the resolved value.
isAllowGuests()
Returns: Boolean
Whether an attendee may bring guests as well as registering themselves. Null means the setting has never been chosen, which is treated as allowed; call allowGuests for the resolved value.
isSuppressGuestEmails()
Returns: Boolean
Whether emails should never be sent to guests of attendees. Null means the setting has never been chosen, which is treated as false; call suppressGuestEmails for the resolved value.
getMaxAttendees()
Returns: Integer
The largest number of accepted attendees the event will take. Null means no limit has been set.
isEmailConfirm()
Returns: Boolean
Whether an email is sent to an attendee when they register. Null means the setting has never been chosen, which is treated as true; call emailConfirm for the resolved value.
getEmailConfirmSubject()
Returns: String
Subject line used for the confirmation email sent when someone registers for this event.
getEmailConfirmTemplate()
Returns: String
MVEL template used to build the body of the confirmation email, up to 4000 characters. Only used when confirmation emails are switched on.
getReminders()
Returns: List<Reminder>
The reminders configured on this event, each of which sends an email a set period before the event starts. Empty or null when no reminders have been added. Deleting the event deletes them.
getShortPath()
Returns: String
Short, URL-friendly path segment used to address this event on a website. It is looked up together with the website the calendar belongs to, so it only has to be unique within that site. May be null.
allowGuests()
Returns: boolean
The allow guests setting resolved to a plain boolean, treating an unset value as true. Use this rather than isAllowGuests when you just want to know whether guests are permitted.
allowRegistration()
Returns: boolean
The allow registration setting resolved to a plain boolean, treating an unset value as true. Use this rather than isAllowRegistration when you just want to know whether self-registration is open.
emailConfirm()
Returns: boolean
The confirmation email setting resolved to a plain boolean, treating an unset value as true, so a confirmation is sent unless it has been explicitly turned off.
suppressGuestEmails()
Returns: boolean
The suppress guest emails setting resolved to a plain boolean, treating an unset value as false, so guests are emailed unless this has been explicitly turned on.
numAttendees()
Returns: long
Counts the attendee requests on this event whose participation status is ACCEPTED, which is the number that counts against the maximum attendees limit. This runs a database query against the current session every time it is called, so keep the result rather than calling it inside a loop.