com.std.model.appointment
Class Appointment

java.lang.Object
extended by com.std.model.appointment.Appointment
All Implemented Interfaces:
java.io.Serializable

public class Appointment
extends java.lang.Object
implements java.io.Serializable

data profile for a single appointment

Author:
xxx
See Also:
Serialized Form

Field Summary
static java.util.Comparator<Appointment> COMPARATOR_APPOINTMENT_END
          compares two Appointments by their end dates
static java.util.Comparator<Appointment> COMPARATOR_APPOINTMENT_START
          compares two Appointments by their start dates
(package private) static long serialVersionUID
           
 
Constructor Summary
Appointment()
          instantiates an appointment to default values.
title is initialized to "New Appointment".
start and end dates are initialized to the current date and time.
Appointment(java.lang.String title, java.lang.String description, DateRange dateRange)
          instantiates an appointment to the given values.
 
Method Summary
 DateRange getDateRange()
           
 java.lang.String getDescription()
           
 java.util.Date getEndDate()
           
 java.util.Date getStartDate()
           
 java.lang.String getTitle()
           
 int hashCode()
           
 ObservableEvent onChanged()
           
 void setDateRange(DateRange dateRange)
          changes the appointment start and end dates
 void setDescription(java.lang.String description)
          changes the appointment description
 void setEndDate(java.util.Date endDate)
          changes the appointment end date
 void setStartDate(java.util.Date startDate)
          changes the appointment start date
 void setTitle(java.lang.String title)
          changes the appointment title
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

COMPARATOR_APPOINTMENT_START

public static final java.util.Comparator<Appointment> COMPARATOR_APPOINTMENT_START
compares two Appointments by their start dates


COMPARATOR_APPOINTMENT_END

public static final java.util.Comparator<Appointment> COMPARATOR_APPOINTMENT_END
compares two Appointments by their end dates

Constructor Detail

Appointment

public Appointment()
instantiates an appointment to default values.
title is initialized to "New Appointment".
start and end dates are initialized to the current date and time.


Appointment

public Appointment(java.lang.String title,
java.lang.String description,
DateRange dateRange)
instantiates an appointment to the given values.

Parameters:
title - appointment title
description - appointment description
dateRange - appointment date range
Method Detail

getDateRange

public DateRange getDateRange()
Returns:
the appointment start and end dates

getDescription

public java.lang.String getDescription()
Returns:
the appointment description

getEndDate

public java.util.Date getEndDate()
Returns:
the appointment end date

getStartDate

public java.util.Date getStartDate()
Returns:
the appointment start date

getTitle

public java.lang.String getTitle()
Returns:
the appointment title

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

onChanged

public ObservableEvent onChanged()
Returns:
event invoked whenever one of the parameters has been changed

setDateRange

public void setDateRange(DateRange dateRange)
changes the appointment start and end dates

Parameters:
dateRange - the appointment start and end dates

setDescription

public void setDescription(java.lang.String description)
changes the appointment description

Parameters:
description - the appointment description

setEndDate

public void setEndDate(java.util.Date endDate)
changes the appointment end date

Parameters:
endDate - the appointment end date

setStartDate

public void setStartDate(java.util.Date startDate)
changes the appointment start date

Parameters:
startDate - the appointment start date

setTitle

public void setTitle(java.lang.String title)
changes the appointment title

Parameters:
title - the appointment title

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object