com.webmethods.sc.calendar
Class PeriodEvent

java.lang.Object
  extended by com.webmethods.sc.calendar.Event
      extended by com.webmethods.sc.calendar.PeriodEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Holiday

public class PeriodEvent
extends Event

Base class for period events, such as having start and end datetimes

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.webmethods.sc.calendar.Event
EVENT_TYPE_BUSY, EVENT_TYPE_BUSY_TENTATIVE, EVENT_TYPE_HOLIDAY, EVENT_TYPE_OUT_OF_THE_OFFICE, EVENT_TYPE_TIMEOFF, EVENT_TYPE_WORKDAY
 
Constructor Summary
PeriodEvent()
          Default constructor
PeriodEvent(Date dateStart, Date dateEnd)
          Creates unnamed PeriodEvent for given start and end dates
PeriodEvent(String type, String name, Date dateStart, Date dateEnd)
          Creates named PeriodEvent of certain type for given start and end dates
 
Method Summary
 boolean equals(Object obj)
           
 Date getEndDate()
          Returns end datetime for this PeriodEvent
 Date getStartDate()
          Returns start datetime for this PeriodEvent
 boolean includes(Date date)
          Checks if some date is in-between the start and end of this Period Event If the date is equal to either start or end then it is considered inside
 void setEndDate(Date dateEnd)
          Sets end datetime for this PeriodEvent
 void setStartDate(Date dateStart)
          Sets start datetime for this PeriodEvent
 
Methods inherited from class com.webmethods.sc.calendar.Event
getName, getType, setName, setType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PeriodEvent

public PeriodEvent(Date dateStart,
                   Date dateEnd)
Creates unnamed PeriodEvent for given start and end dates

Parameters:
dateStart -
dateEnd -

PeriodEvent

public PeriodEvent()
Default constructor


PeriodEvent

public PeriodEvent(String type,
                   String name,
                   Date dateStart,
                   Date dateEnd)
Creates named PeriodEvent of certain type for given start and end dates

Parameters:
type -
name -
dateStart -
dateEnd -
Method Detail

getEndDate

public Date getEndDate()
Returns end datetime for this PeriodEvent


setEndDate

public void setEndDate(Date dateEnd)
Sets end datetime for this PeriodEvent


getStartDate

public Date getStartDate()
Returns start datetime for this PeriodEvent


setStartDate

public void setStartDate(Date dateStart)
Sets start datetime for this PeriodEvent

Parameters:
dateStart -

equals

public boolean equals(Object obj)
Overrides:
equals in class Event

includes

public boolean includes(Date date)
Checks if some date is in-between the start and end of this Period Event If the date is equal to either start or end then it is considered inside

Parameters:
date -
Returns: