CopaServer
Change of Plan Application
 All Classes Functions Pages
Public Member Functions | List of all members
unicopa.copa.base.event.SingleEventUpdate Class Reference

An update on a fixed date of an event (SingleEvent). More...

Collaboration diagram for unicopa.copa.base.event.SingleEventUpdate:
Collaboration graph

Public Member Functions

 SingleEventUpdate (SingleEvent updatedSingleEvent, int oldSingleEventID, Date updateDate, String creatorName, String comment)
 Create a new SingleEventUpdate. More...
 
 SingleEventUpdate (SingleEvent newSingleEvent, Date updateDate, String comment)
 Create a SingleEventUpdate that is a creation of a SingleEvent. More...
 
 SingleEventUpdate (int oldSingleEventID, Date updateDate, String comment)
 Create a SingleEventUpdate that is a cancellation of a SingleEvent. More...
 
SingleEvent getUpdatedSingleEvent ()
 Get the updated SingleEvent or null if the SingleEvent was cancelled. More...
 
int getOldSingleEventID ()
 Get the ID of the SingleEvent that was updated and replaced by the new one. More...
 
Date getUpdateDate ()
 Get the date of when the update was submitted. More...
 
String getCreatorName ()
 Get the name of the person who created the update. More...
 
String getComment ()
 Get the comment the creator of the update added to give further information. More...
 
boolean isSingleEventCreation ()
 Check whether this update stands for a creation of a SingleEvent. More...
 
boolean isCancellation ()
 Check Check whether this update stands for a cancellation of a SingleEvent. More...
 

Detailed Description

An update on a fixed date of an event (SingleEvent).

Author
Felix Wiemuth

Constructor & Destructor Documentation

unicopa.copa.base.event.SingleEventUpdate.SingleEventUpdate ( SingleEvent  updatedSingleEvent,
int  oldSingleEventID,
Date  updateDate,
String  creatorName,
String  comment 
)

Create a new SingleEventUpdate.

If the update should be a creation or cancellation of a SingleEvent, use the correspondent constructors.

Parameters
updatedSingleEventthe new version of the SingleEvent, or null if the update should be a cancellation of the former SingleEvent
oldSingleEventIDthe ID of the SingleEvent that should be updated, or 0 if this update should be a creation of a SingleEvent
updateDatethe date of the update
creatorNamethe name of the person who introduced the update
commenta text to describe the update
unicopa.copa.base.event.SingleEventUpdate.SingleEventUpdate ( SingleEvent  newSingleEvent,
Date  updateDate,
String  comment 
)

Create a SingleEventUpdate that is a creation of a SingleEvent.

Parameters
newSingleEventthe SingleEvent to be added to the event
updateDatethe date of the update
commenta text to describe the reason for the action or give further information
unicopa.copa.base.event.SingleEventUpdate.SingleEventUpdate ( int  oldSingleEventID,
Date  updateDate,
String  comment 
)

Create a SingleEventUpdate that is a cancellation of a SingleEvent.

Parameters
oldSingleEventIDthe ID of the SingleEvent to be cancelled
updateDatethe date of the update
commenta text to describe the reason for the action or give further information

Member Function Documentation

String unicopa.copa.base.event.SingleEventUpdate.getComment ( )

Get the comment the creator of the update added to give further information.

Returns
String unicopa.copa.base.event.SingleEventUpdate.getCreatorName ( )

Get the name of the person who created the update.

Returns
int unicopa.copa.base.event.SingleEventUpdate.getOldSingleEventID ( )

Get the ID of the SingleEvent that was updated and replaced by the new one.

Returns
the ID of the SingleEvent that was updated or 0 if this update indicates a creation of a new SingleEvent
Date unicopa.copa.base.event.SingleEventUpdate.getUpdateDate ( )

Get the date of when the update was submitted.

Returns
SingleEvent unicopa.copa.base.event.SingleEventUpdate.getUpdatedSingleEvent ( )

Get the updated SingleEvent or null if the SingleEvent was cancelled.

Compare attributes to the old object to see changes.

Returns
the new SingleEvent object, or null if the fixed date was cancelled and there is no new SingelEvent
boolean unicopa.copa.base.event.SingleEventUpdate.isCancellation ( )

Check Check whether this update stands for a cancellation of a SingleEvent.

Returns
true if this update stands for a cancellation of a SingleEvent.
boolean unicopa.copa.base.event.SingleEventUpdate.isSingleEventCreation ( )

Check whether this update stands for a creation of a SingleEvent.

Returns
true if the update stands for a creation of a SingleEvent

The documentation for this class was generated from the following file: