|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Appointment
The basic building blocks of reservations.
Reservation
,
Repeating
Field Summary | |
---|---|
static Appointment[] |
EMPTY_ARRAY
|
static RaplaType |
TYPE
|
Fields inherited from interface org.rapla.entities.Entity |
---|
ENTITY_ARRAY |
Method Summary | |
---|---|
void |
createBlocks(Date start,
Date end,
AppointmentBlockArray blocks)
adds all Appointment-blocks in the given period to the appointmentBlockArray. |
void |
createBlocks(Date start,
Date end,
AppointmentBlockArray blocks,
boolean excludeExceptions)
adds all Appointment-blocks in the given period to the appointmentBlockArray. |
Date |
getEnd()
|
Date |
getFirstDifference(Appointment a2,
Date maxDate)
|
Date |
getLastDifference(Appointment a2,
Date maxDate)
|
Date |
getMaxEnd()
If no repeating is set this method will return the same as getEnd() . |
Repeating |
getRepeating()
|
Reservation |
getReservation()
returns the reservation that owns the appointment. |
Date |
getStart()
|
boolean |
isRepeatingEnabled()
returns if the appointment has a repeating |
boolean |
isWholeDaysSet()
this method will be used for future enhancements |
boolean |
matches(Appointment appointment)
Returns if the exceptions, repeatings, start and end dates of the Appoinemnts are the same. |
void |
move(Date newStart)
Moves the start-time of the appointment. |
void |
move(Date start,
Date end)
Changes the start- and end-time of the appointment. |
boolean |
overlaps(Appointment appointment)
Tests two appointments for overlap. |
boolean |
overlaps(Date start,
Date end)
Test for overlap with a period. |
boolean |
overlaps(Date start,
Date end,
boolean considerExceptions)
Test for overlap with a period. |
void |
setRepeatingEnabled(boolean enableRepeating)
Enables repeating for this appointment. |
void |
setWholeDays(boolean enable)
this method will be used for future enhancements |
Methods inherited from interface org.rapla.entities.Entity |
---|
isIdentical, isPersistant |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface org.rapla.entities.Ownable |
---|
getOwner, setOwner |
Field Detail |
---|
static final RaplaType TYPE
static final Appointment[] EMPTY_ARRAY
Method Detail |
---|
Date getStart()
Date getEnd()
Date getMaxEnd()
If no repeating is set this method will return the same
as getEnd()
.
If the repeating has no end the method will return Null. Oterwise the maximum of getEnd() and repeating.getEnd() will be returned.
getEnd()
,
Repeating
Reservation getReservation()
Repeating getRepeating()
void setRepeatingEnabled(boolean enableRepeating)
boolean isRepeatingEnabled()
void move(Date start, Date end)
void move(Date newStart)
boolean overlaps(Appointment appointment)
a1.overlaps(a2) == a2.overlaps(a1)
boolean overlaps(Date start, Date end)
boolean overlaps(Date start, Date end, boolean considerExceptions)
boolean matches(Appointment appointment)
Date getFirstDifference(Appointment a2, Date maxDate)
maxDate
- must not be null, specifies the last date that should be searched
returns the first date at which the two appointments differ (dates after maxDate will not be calculated)Date getLastDifference(Appointment a2, Date maxDate)
maxDate
- must not be null, specifies the last date that should be searched
returns the last date at which the two appointments differ. (dates after maxDate will not be calculated)boolean isWholeDaysSet()
void setWholeDays(boolean enable)
void createBlocks(Date start, Date end, AppointmentBlockArray blocks)
void createBlocks(Date start, Date end, AppointmentBlockArray blocks, boolean excludeExceptions)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |