org.promotego.dao.hibernate
Class HibernateScheduledGameDao
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.promotego.dao.hibernate.HibernateDaoSupport<T>
org.promotego.dao.hibernate.HibernateRadiusSearchDaoSupport<ScheduledGame>
org.promotego.dao.hibernate.HibernateScheduledGameDao
- All Implemented Interfaces:
- Dao<ScheduledGame>, RadiusSearchDao<ScheduledGame>, ScheduledGameDao, org.springframework.beans.factory.InitializingBean
public class HibernateScheduledGameDao
- extends HibernateRadiusSearchDaoSupport<ScheduledGame>
- implements ScheduledGameDao
Fields inherited from class org.springframework.dao.support.DaoSupport |
logger |
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport |
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory |
Methods inherited from class org.springframework.dao.support.DaoSupport |
afterPropertiesSet, initDao |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateScheduledGameDao
public HibernateScheduledGameDao()
getFindAllQuery
protected java.lang.String getFindAllQuery()
- Specified by:
getFindAllQuery
in class HibernateDaoSupport<ScheduledGame>
getIdQuery
protected java.lang.String getIdQuery()
- Specified by:
getIdQuery
in class HibernateDaoSupport<ScheduledGame>
getCountQuery
public java.lang.String getCountQuery()
- Specified by:
getCountQuery
in class HibernateDaoSupport<ScheduledGame>
getByUser
public java.util.List<ScheduledGame> getByUser(User theUser)
- Specified by:
getByUser
in interface ScheduledGameDao
getGamesNeedingReminder
public java.util.List<ScheduledGame> getGamesNeedingReminder(java.util.Date currentReminderTime,
long reminderWindow)
- Retrieve a list of scheduled games from the database which are within
the time period specified by the reminder window. It is recommended
that the reminder window compensate for the time between runs. ie, if
you want to notify of games coming up in an hour, and runs happen every
5 minutes, then you should use an hour and 5 minutes as the reminder
window. Otherwise, reminders will be sent when there is less than an
hour before the game.
- Specified by:
getGamesNeedingReminder
in interface ScheduledGameDao
- Parameters:
currentReminderTime
- The current time.reminderWindow
- The amount of time in milliseconds to scan for upcoming games.
- Returns:
- A
List
of ScheduledGame
objects which need reminders for the specified window.
Copyright © 2007. All Rights Reserved.