net.stff.ical.persistance
Interface ICalDAO

All Known Implementing Classes:
HibernateICalDAO

public interface ICalDAO

Author:
buntekuh

Field Summary
static int ALLDAYEVENTS
           
static int ALLEVENTS
           
static int TIMEDEVENTS
           
 
Method Summary
 java.lang.Long addCalendar(ICal cal)
          Adds an existing calendar.
 java.lang.Long addCalendar(java.lang.String key, java.lang.String user)
          adds a new calendar
 ICal getCalendar(java.lang.String key, java.lang.String user)
          Returns a calendar specified by the respective key.
 java.util.List getCalendarNames(java.lang.String user)
          Returns a List of all calendar keys
 java.util.List getCalendars(java.lang.String user)
          Returns a List of all calendars
 IEvent getEvent(java.lang.String id)
          Returns the event from an calendar
 java.util.List getEventsForPeriod(java.util.Date start, java.util.Date end, java.lang.String user, int which)
          Returns a List of those events that start during the specified timespan.
 void removeCalendar(ICal cal)
          Removes the Calendar specified by the key
 void removeEvent(IEvent event)
          Removes the event from the persistent store.
 void updateCalendar(ICal cal)
          Updates the Calendar specified
 void updateCalendar(java.lang.String key, java.lang.String user)
          Updates the Calendar specified by the key
 void updateEvent(IEvent event)
          Updates the event in the persistent store
 

Field Detail

ALLEVENTS

public static final int ALLEVENTS
See Also:
Constant Field Values

TIMEDEVENTS

public static final int TIMEDEVENTS
See Also:
Constant Field Values

ALLDAYEVENTS

public static final int ALLDAYEVENTS
See Also:
Constant Field Values
Method Detail

getCalendars

public java.util.List getCalendars(java.lang.String user)
Returns a List of all calendars

Returns:

getCalendarNames

public java.util.List getCalendarNames(java.lang.String user)
Returns a List of all calendar keys

Returns:

addCalendar

public java.lang.Long addCalendar(java.lang.String key,
                                  java.lang.String user)
adds a new calendar

Parameters:
key - The key name under which the calendar is to be registered
Returns:

addCalendar

public java.lang.Long addCalendar(ICal cal)
Adds an existing calendar.

Parameters:
cal - the calendar to add
Returns:
returns the ID under which the calendar was persisted, if it is persisted.

getCalendar

public ICal getCalendar(java.lang.String key,
                        java.lang.String user)
Returns a calendar specified by the respective key.

Parameters:
key -
Returns:

removeCalendar

public void removeCalendar(ICal cal)
Removes the Calendar specified by the key

Returns:
The removed calendar or null if it was not found.

updateCalendar

public void updateCalendar(java.lang.String key,
                           java.lang.String user)
Updates the Calendar specified by the key

Parameters:
key - The key name under which the calendar was registered

updateCalendar

public void updateCalendar(ICal cal)
Updates the Calendar specified

Parameters:
cal - The Calendar to update

getEventsForPeriod

public java.util.List getEventsForPeriod(java.util.Date start,
                                         java.util.Date end,
                                         java.lang.String user,
                                         int which)
Returns a List of those events that start during the specified timespan.

Parameters:
start - the start Date
end - the end Date
which - Discerns between Any event, timed events and allday events
Returns:

getEvent

public IEvent getEvent(java.lang.String id)
Returns the event from an calendar

Parameters:
id -
Returns:

removeEvent

public void removeEvent(IEvent event)
Removes the event from the persistent store.

Parameters:
event - the Event to remove
Returns:

updateEvent

public void updateEvent(IEvent event)
Updates the event in the persistent store

Throws:
org.springframework.dao.DataAccessException


Copyright © 2004-2005 stoffwechsel development GbR. All Rights Reserved.