|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.db.AbstractDBEntry
com.antelmann.calendar.CalendarEntry
public class CalendarEntry
represents a generic entry in a calendar
| Field Summary | |
|---|---|
static DataFlavor |
calendarEntryFlavor
|
protected HashSet<String> |
categories
|
protected Properties |
properties
|
protected Recurrence |
recurrence
|
static Comparator<CalendarEntry> |
standardComparator
compares first on time and then on title |
| Fields inherited from interface com.antelmann.db.DBEntry |
|---|
ENTRY_FLAVOR, ENTRY_LIST_FLAVOR |
| Constructor Summary | |
|---|---|
CalendarEntry(Object id,
CalendarEntry entry)
creates a duplicate from entry where only the id is different from the original |
|
CalendarEntry(Object id,
Date begin,
Date end,
String title)
begin and title must not be null |
|
CalendarEntry(Object id,
Date begin,
Date end,
String title,
String location,
String description)
begin and title must not be null |
|
CalendarEntry(Object id,
Date begin,
long duration,
String title)
begin and title must not be null |
|
CalendarEntry(Object id,
Date begin,
long durationMillis,
String title,
String location,
String description)
begin and title must not be null |
|
| Method Summary | |
|---|---|
boolean |
addCategory(String category)
|
long |
creationTime()
|
boolean |
deepCompare(CalendarEntry entry)
checks whether all: title, begin date and location are equal. |
Date |
getBeginTime()
|
String[] |
getCategories()
|
String |
getDescription()
|
long |
getDuration()
time in milliseconds |
Date |
getEndTime()
|
String |
getLocation()
|
Object |
getProperty(Object key)
|
Object |
getProperty(Object key,
Object defaultValue)
|
Set<Object> |
getPropertyKeys()
|
Recurrence |
getRecurrence()
|
Date[] |
getRecurrences(Date after,
Date before)
may return null if no recurrence is set. |
String |
getTitle()
|
boolean |
hasCategory(String category)
|
boolean |
isCanceled()
|
boolean |
isConfirmed()
|
long |
lastUpdated()
|
boolean |
overlapsWith(CalendarEntry entry)
|
boolean |
removeCategory(String category)
|
Object |
removeProperty(Object key)
|
boolean |
sameDay(Date date)
returns true if the given date is on the same day as the begin time of this entry |
void |
setBeginTime(Date begin)
setting the begin also alters the end, as the duration remains |
void |
setCanceled(boolean flag)
|
void |
setConfirmed(boolean flag)
|
void |
setDescription(String desc)
|
void |
setDuration(long millis)
|
void |
setLocation(String location)
|
Object |
setProperty(Object property,
Object value)
|
void |
setRecurrence(Recurrence r)
|
void |
setTitle(String title)
|
String |
toString()
|
| Methods inherited from class com.antelmann.db.AbstractDBEntry |
|---|
equals, getID, hashCode, hashEntry, sameEntry |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final DataFlavor calendarEntryFlavor
public static final Comparator<CalendarEntry> standardComparator
protected HashSet<String> categories
protected Properties properties
protected Recurrence recurrence
| Constructor Detail |
|---|
public CalendarEntry(Object id,
Date begin,
Date end,
String title)
public CalendarEntry(Object id,
Date begin,
long duration,
String title)
public CalendarEntry(Object id,
Date begin,
Date end,
String title,
String location,
String description)
public CalendarEntry(Object id,
Date begin,
long durationMillis,
String title,
String location,
String description)
public CalendarEntry(Object id,
CalendarEntry entry)
| Method Detail |
|---|
public long creationTime()
public long lastUpdated()
public Date getBeginTime()
getBeginTime in interface LifeCycleObjectpublic void setBeginTime(Date begin)
public Date getEndTime()
getEndTime in interface LifeCycleObjectpublic long getDuration()
public void setDuration(long millis)
public String getTitle()
public void setTitle(String title)
public String getLocation()
public void setLocation(String location)
public String getDescription()
public boolean isConfirmed()
public boolean isCanceled()
public void setDescription(String desc)
public void setConfirmed(boolean flag)
public void setCanceled(boolean flag)
public boolean addCategory(String category)
public boolean removeCategory(String category)
public boolean hasCategory(String category)
public String[] getCategories()
public Object setProperty(Object property,
Object value)
public Object getProperty(Object key)
public Object removeProperty(Object key)
public Object getProperty(Object key,
Object defaultValue)
public Set<Object> getPropertyKeys()
public Recurrence getRecurrence()
public void setRecurrence(Recurrence r)
public Date[] getRecurrences(Date after,
Date before)
throws IllegalArgumentException
after - must come before the second parameterbefore - must come after the first parameter
IllegalArgumentExceptionpublic boolean deepCompare(CalendarEntry entry)
public String toString()
toString in class AbstractDBEntrypublic boolean overlapsWith(CalendarEntry entry)
public boolean sameDay(Date date)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||