net.stff.ical.persistance.hibernate
Class HibernateICalDAO

java.lang.Object
  extended byorg.springframework.orm.hibernate.support.HibernateDaoSupport
      extended bynet.stff.ical.persistance.hibernate.HibernateICalDAO
All Implemented Interfaces:
ICalDAO, org.springframework.beans.factory.InitializingBean

public class HibernateICalDAO
extends org.springframework.orm.hibernate.support.HibernateDaoSupport
implements ICalDAO

Author:
buntekuh

Field Summary
 
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
logger
 
Fields inherited from interface net.stff.ical.persistance.ICalDAO
ALLDAYEVENTS, ALLEVENTS, TIMEDEVENTS
 
Constructor Summary
HibernateICalDAO()
           
 
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 s, java.util.Date e, 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
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
afterPropertiesSet, closeSessionIfNecessary, convertHibernateAccessException, getHibernateTemplate, getSession, getSession, getSessionFactory, initDao, setHibernateTemplate, setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateICalDAO

public HibernateICalDAO()
Method Detail

getCalendars

public java.util.List getCalendars(java.lang.String user)
Description copied from interface: ICalDAO
Returns a List of all calendars

Specified by:
getCalendars in interface ICalDAO
Returns:

getCalendarNames

public java.util.List getCalendarNames(java.lang.String user)
Description copied from interface: ICalDAO
Returns a List of all calendar keys

Specified by:
getCalendarNames in interface ICalDAO
Returns:

addCalendar

public java.lang.Long addCalendar(java.lang.String key,
                                  java.lang.String user)
Description copied from interface: ICalDAO
adds a new calendar

Specified by:
addCalendar in interface ICalDAO
Parameters:
key - The key name under which the calendar is to be registered
Returns:

addCalendar

public java.lang.Long addCalendar(ICal cal)
Description copied from interface: ICalDAO
Adds an existing calendar.

Specified by:
addCalendar in interface ICalDAO
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)
Description copied from interface: ICalDAO
Returns a calendar specified by the respective key.

Specified by:
getCalendar in interface ICalDAO
Parameters:
key -
Returns:

removeCalendar

public void removeCalendar(ICal cal)
Description copied from interface: ICalDAO
Removes the Calendar specified by the key

Specified by:
removeCalendar in interface ICalDAO
Returns:
The removed calendar or null if it was not found.

getEventsForPeriod

public java.util.List getEventsForPeriod(java.util.Date s,
                                         java.util.Date e,
                                         java.lang.String user,
                                         int which)
Description copied from interface: ICalDAO
Returns a List of those events that start during the specified timespan.

Specified by:
getEventsForPeriod in interface ICalDAO
Parameters:
s - the start Date
e - the end Date
which - Discerns between Any event, timed events and allday events
Returns:

updateEvent

public void updateEvent(IEvent event)
Description copied from interface: ICalDAO
Updates the event in the persistent store

Specified by:
updateEvent in interface ICalDAO

getEvent

public IEvent getEvent(java.lang.String id)
Description copied from interface: ICalDAO
Returns the event from an calendar

Specified by:
getEvent in interface ICalDAO
Parameters:
id -
Returns:

removeEvent

public void removeEvent(IEvent event)
Description copied from interface: ICalDAO
Removes the event from the persistent store.

Specified by:
removeEvent in interface ICalDAO
Parameters:
event - the Event to remove
Returns:

updateCalendar

public void updateCalendar(java.lang.String key,
                           java.lang.String user)
Description copied from interface: ICalDAO
Updates the Calendar specified by the key

Specified by:
updateCalendar in interface ICalDAO
Parameters:
key - The key name under which the calendar was registered

updateCalendar

public void updateCalendar(ICal cal)
Description copied from interface: ICalDAO
Updates the Calendar specified

Specified by:
updateCalendar in interface ICalDAO
Parameters:
cal - The Calendar to update


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