public class CSEvent extends CSItem
The CSEvent
class includes methods for the retrieval of a particular event's details.
All such methods require that certain database and key information (event ID, for example) be specified via the
set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSEvent
class.
CSEventContent
,
CSEventMultiple
,
Serialized FormACCESS_GRANTED, DOES_NOT_EXIST, EMPTY, EXISTS, SECURE_ACCESS_DENIED, SECURE_ACCESS_GRANTED, UPDATE_ACTION_INSERTED, UPDATE_ACTION_UPDATED
LEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSEvent()
Creates an empty
CSEvent object. |
CSEvent(java.lang.String strPropertyFile)
Creates a new
CSEvent , specifying a properties file that contains all of the database connection
details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSEvent . |
void |
get()
Retrieves the details of an event from the database.
|
java.lang.String |
getDescription()
Gets the description of the event.
|
int |
getDuration()
Gets the duration of the event.
|
java.lang.String |
getDurationUnit()
Gets the unit in which the event's duration is specified using the
setDuration method. |
java.util.Date |
getEndDate()
Gets the last date/time on which the event can occur.
|
int |
getEventID()
Gets the event ID of the event.
|
int |
getGroupID()
Gets the ID of the event group to which the event belongs.
|
java.lang.String |
getGroupName()
Gets the name of the event group to which the event belongs.
|
int |
getInterval()
Gets the interval of the event, specified in the units indicated by the
setIntervalUnit method. |
java.lang.String |
getIntervalUnit()
Gets the unit in which the event's interval is specified using the
setInterval method. |
java.util.ArrayList |
getMetaData()
Get the array of
CSMetaData objects associated with this event. |
java.lang.String |
getMetaDataOptionalIDs()
Gets the list of metadata value IDs specified via the
CSEventMultiple.setMetaDataOptionalIDs(String)
method that matched for this event. |
int |
getRecurrenceNo()
Gets the number of times the event is to occur, up to and including the end date/time.
|
java.util.Date |
getStartDate()
Gets the start date of the event.
|
void |
setDescription(java.lang.String strDescription)
Sets the description of the event.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setDuration(int nDuration)
Sets the event's duration, specified in the units indicated by the
setDurationUnit method. |
void |
setDurationUnit(java.lang.String strDurationUnit)
Sets the unit in which the event's duration is specified using the
setDuration method. |
void |
setEndDate(java.util.Date objEndDate)
Sets the last date/time on which the event can occur.
|
void |
setEventID(int nEventID)
Sets the event ID to be used as key information.
|
void |
setGroupID(int nGroupID)
Sets the ID of the event group to which the event belongs.
|
void |
setGroupName(java.lang.String strGroupName)
Sets the name of the event group to which the event belongs.
|
void |
setInterval(int nInterval)
Sets the event's interval, specified in the units indicated by the
setIntervalUnit method. |
void |
setIntervalUnit(java.lang.String strIntervalUnit)
Sets the unit in which the event's interval is specified using the
setInterval method. |
void |
setMetaDataArray(java.util.ArrayList MetaDataArray)
Set the array of
CSMetaData objects associated with this event. |
void |
setRecurrenceNo(int nRecurrenceNo)
Sets the number of times the event is to occur.
|
void |
setStartDate(java.util.Date objStartDate)
Sets the start date of the event.
|
void |
update()
Not currently implemented for
CSEvent . |
equals, exist, getID, getStatus, hashCode, jsonString, serialiseWithTypes, setID, setStatus, toString, unset
clearRecordedGatewayMessages, clone, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSEvent()
CSEvent
object.
Use the various set
methods provided to initialise the CSEvent
object prior to
invoking any of its query methods.
public CSEvent(java.lang.String strPropertyFile)
CSEvent
, specifying a properties file that contains all of the database connection
details.
Use the various set methods provided to initialise the CSEvent
object prior to invoking any of its
query manipulation methods.
strPropertyFile
- the property file that contains the connection details.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_DETAIL.
Valid detail levels for an event are :
LEVEL_ID
Retrieves the Event ID only.
LEVEL_SUMMARY
Retrieves Event ID, Description, Start Date, End Date, Group Name and Group ID
only.
LEVEL_DETAIL
Retrieves all article data, except for associated metadata.
LEVEL_ALL
Retrieves all event data, including associated metadata.
setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public void setEventID(int nEventID)
setEventID
followed by a call to get
will return details of the event with the
specified event ID.
nEventID
- the ID of the event to be retrieved.public int getEventID()
public void setGroupID(int nGroupID)
nGroupID
- the event group ID.public int getGroupID()
public void setGroupName(java.lang.String strGroupName)
strGroupName
- the event group name.public java.lang.String getGroupName()
public void setDuration(int nDuration)
setDurationUnit
method.
nDuration
- the duration of the event.public int getDuration()
setDurationUnit
method.public void setDurationUnit(java.lang.String strDurationUnit)
setDuration
method.
strDurationUnit
- the unit of measurement of the duration of the event.public java.lang.String getDurationUnit()
setDuration
method.
public void setInterval(int nInterval)
setIntervalUnit
method.
nInterval
- the interval of the event.public int getInterval()
setIntervalUnit
method.
public void setIntervalUnit(java.lang.String strIntervalUnit)
setInterval
method.
strIntervalUnit
- the unit of measurement of the interval of the event.public java.lang.String getIntervalUnit()
setInterval
method.
public void setRecurrenceNo(int nRecurrenceNo)
nRecurrenceNo
- the number of times the event is to occur, up to and including the end date/time.public int getRecurrenceNo()
public void setDescription(java.lang.String strDescription)
strDescription
- the event's description.public java.lang.String getDescription()
public void setStartDate(java.util.Date objStartDate)
objStartDate
- the event's start date.public java.util.Date getStartDate()
public void setEndDate(java.util.Date objEndDate)
objEndDate
- the event's end date.public java.util.Date getEndDate()
public void setMetaDataArray(java.util.ArrayList MetaDataArray)
CSMetaData
objects associated with this event.
MetaDataArray
- an ArrayList
populated with CSMetaData
objects each of which represents
a metadata item associated with this event.public java.util.ArrayList getMetaData()
CSMetaData
objects associated with this event.
ArrayList
populated with CSMetaData
objects which represent metadata associated
with this event.public java.lang.String getMetaDataOptionalIDs()
CSEventMultiple.setMetaDataOptionalIDs(String)
method that matched for this event. This list will only be populated when the setMetaDataOptionalIDs
method is specified as key information.
public void get() throws CSException
Use setEventID
followed by get
to populate this CSEvent
object with the details of the event identified by the specified ID.
get
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if the specified attribute cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSEvent
.
delete
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void update() throws CSException
CSEvent
.
update
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.