ch.busyboxes.agoo.dao.impl
Class WatchedFolderDAOImpl

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

@Transactional
public class WatchedFolderDAOImpl
extends AbstractHibernateDAO
implements WatchedFolderDAO

This is the Hibernate implementation of the WatchedFolder DAO

Author:
julien@busyboxes.ch

Field Summary
 
Fields inherited from class ch.busyboxes.agoo.dao.impl.AbstractHibernateDAO
hibernateTemplate
 
Constructor Summary
WatchedFolderDAOImpl()
           
 
Method Summary
 java.util.List<WatchedFile> addWatchedFilesToFolder(WatchedFolder watchedFolder, java.util.List<java.lang.String> filePaths)
          Add the given paths to the given watched folder
 void addWatchedFileToFolder(WatchedFolder watchedFolder, java.lang.String filePath)
          Add the given path to the given watched folder
 void deleteWatchedFolder(java.lang.Long folderId)
          Delete the watched folder based on its id
 java.util.List<WatchedFolder> getAllWatchedFolders()
          Returns the list of all watched folders
 WatchedFolder getWatchedFolderById(java.lang.Long folderId)
          Gets a watched folder by ID
 void saveWatchedFolder(WatchedFolder watchedFolder)
          Saves the given WatchedFolder
 
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

WatchedFolderDAOImpl

public WatchedFolderDAOImpl()
Method Detail

getAllWatchedFolders

public java.util.List<WatchedFolder> getAllWatchedFolders()
Description copied from interface: WatchedFolderDAO
Returns the list of all watched folders

Specified by:
getAllWatchedFolders in interface WatchedFolderDAO
Returns:
a list of watched folders
See Also:
WatchedFolderDAO.getAllWatchedFolders()

saveWatchedFolder

public void saveWatchedFolder(WatchedFolder watchedFolder)
Description copied from interface: WatchedFolderDAO
Saves the given WatchedFolder

Specified by:
saveWatchedFolder in interface WatchedFolderDAO
Parameters:
watchedFolder - the watched folder to be saved
See Also:
WatchedFolderDAO.saveWatchedFolder(WatchedFolder)

getWatchedFolderById

public WatchedFolder getWatchedFolderById(java.lang.Long folderId)
Description copied from interface: WatchedFolderDAO
Gets a watched folder by ID

Specified by:
getWatchedFolderById in interface WatchedFolderDAO
Parameters:
folderId - the watched folder ID
Returns:
the watched folder
See Also:
WatchedFolderDAO.getWatchedFolderById(Long)

addWatchedFileToFolder

public void addWatchedFileToFolder(WatchedFolder watchedFolder,
                                   java.lang.String filePath)
Description copied from interface: WatchedFolderDAO
Add the given path to the given watched folder

Specified by:
addWatchedFileToFolder in interface WatchedFolderDAO
Parameters:
watchedFolder - the watched folder
filePath - the path to the watched file
See Also:
WatchedFolderDAO.addWatchedFileToFolder(WatchedFolder, String)

addWatchedFilesToFolder

public java.util.List<WatchedFile> addWatchedFilesToFolder(WatchedFolder watchedFolder,
                                                           java.util.List<java.lang.String> filePaths)
Description copied from interface: WatchedFolderDAO
Add the given paths to the given watched folder

Specified by:
addWatchedFilesToFolder in interface WatchedFolderDAO
Parameters:
watchedFolder - the watched folder
filePaths - the paths to the watched file
Returns:
new watched files created
See Also:
WatchedFolderDAO#addWatchedFilesToFolder(WatchedFolder, List)

deleteWatchedFolder

public void deleteWatchedFolder(java.lang.Long folderId)
Description copied from interface: WatchedFolderDAO
Delete the watched folder based on its id

Specified by:
deleteWatchedFolder in interface WatchedFolderDAO
Parameters:
folderId - the watched folder ID
See Also:
WatchedFolderDAO.deleteWatchedFolder(Long)


Copyright © 2009. All Rights Reserved.