ch.busyboxes.agoo.dao.impl
Class WatchedFileDAOImpl

java.lang.Object
  extended by ch.busyboxes.agoo.dao.impl.AbstractHibernateDAO
      extended by ch.busyboxes.agoo.dao.impl.WatchedFileDAOImpl
All Implemented Interfaces:
WatchedFileDAO

@Transactional
public class WatchedFileDAOImpl
extends AbstractHibernateDAO
implements WatchedFileDAO

This is the Hibernate implementation of the WatchedFile DAO

Author:
julien@busyboxes.ch

Field Summary
 
Fields inherited from class ch.busyboxes.agoo.dao.impl.AbstractHibernateDAO
hibernateTemplate
 
Constructor Summary
WatchedFileDAOImpl()
           
 
Method Summary
 long getTotalFilesWatched()
          Returns the total number of files watched
 WatchedFile getWatchedFileById(java.lang.Long fileId)
          Gets a watched file by ID
 java.util.List<WatchedFile> getWatchedFilesByFolderPaged(java.lang.Long folderId, int filesPerPage, int page)
          Returns the files associated with the given folder using paging
 void saveWatchedFile(WatchedFile file)
          Saves the given watched file
 
Methods inherited from class ch.busyboxes.agoo.dao.impl.AbstractHibernateDAO
setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WatchedFileDAOImpl

public WatchedFileDAOImpl()
Method Detail

saveWatchedFile

public void saveWatchedFile(WatchedFile file)
Description copied from interface: WatchedFileDAO
Saves the given watched file

Specified by:
saveWatchedFile in interface WatchedFileDAO
Parameters:
file - the watched file to be saved
See Also:
WatchedFileDAO.saveWatchedFile(WatchedFile)

getTotalFilesWatched

public long getTotalFilesWatched()
Description copied from interface: WatchedFileDAO
Returns the total number of files watched

Specified by:
getTotalFilesWatched in interface WatchedFileDAO
Returns:
total number of files watched
See Also:
WatchedFileDAO.getTotalFilesWatched()

getWatchedFileById

public WatchedFile getWatchedFileById(java.lang.Long fileId)
Description copied from interface: WatchedFileDAO
Gets a watched file by ID

Specified by:
getWatchedFileById in interface WatchedFileDAO
Parameters:
fileId - the watched file ID
Returns:
the watched file
See Also:
WatchedFileDAO.getWatchedFileById(Long)

getWatchedFilesByFolderPaged

public java.util.List<WatchedFile> getWatchedFilesByFolderPaged(java.lang.Long folderId,
                                                                int filesPerPage,
                                                                int page)
Description copied from interface: WatchedFileDAO
Returns the files associated with the given folder using paging

Specified by:
getWatchedFilesByFolderPaged in interface WatchedFileDAO
Parameters:
folderId - the folder's id
filesPerPage - the number of files per page
page - the page number
Returns:
the list of watched files
See Also:
WatchedFileDAO#getWatchedFilesByFolderPaged(Long, int, Integer)


Copyright © 2009. All Rights Reserved.