edu.nrao.sss.dao.project
Class HibernateProjectDao
java.lang.Object
edu.nrao.sss.dao.HibernateDao
edu.nrao.sss.dao.project.HibernateProjectDao
- All Implemented Interfaces:
- ProjectProvider
public class HibernateProjectDao
- extends HibernateDao
- implements ProjectProvider
A Hibernate
data access object for Project
s.
- Since:
- 2006-02-24
- Version:
- 1.1
Methods inherited from class edu.nrao.sss.dao.HibernateDao |
addDaoListener, beginTransaction, closeSession, commitTransaction, destroyAllFactories, destroyFactory, fireRollbackEvent, getConfigurationFileName, getInterceptor, getSession, getSessionFactory, removeDaoListeners, rollbackTransaction, setConfigurationFileName, setInterceptor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateProjectDao
public HibernateProjectDao()
- empty no-arg constructor
- See Also:
HibernateDao
HibernateProjectDao
public HibernateProjectDao(String cfg,
org.hibernate.Interceptor i)
- See Also:
HibernateDao
findById
public Project findById(long id)
throws RepositoryException
- Specified by:
findById
in interface ProjectProvider
- Returns:
- null if a Project with the provided id doesn't exist.
- Throws:
RepositoryException
findByCode
public Project findByCode(String code)
throws RepositoryException
- Specified by:
findByCode
in interface ProjectProvider
- Returns:
- null if a Project with the provided code doesn't exist.
- Throws:
RepositoryException
- See Also:
ProjectProvider.findByCode(String)
findByUserId
public List<Project> findByUserId(long uid)
throws RepositoryException
- Specified by:
findByUserId
in interface ProjectProvider
- Returns:
- a List (possibly empty) of Projects that uid is an editor of.
This method does not return null.
- Throws:
RepositoryException
findProjects
public List<Project> findProjects(Long userId,
String proposalCode)
throws RepositoryException
- Returns a (possibly empty, but non-null) List of Projects that are editable
by
userId
and have a proposal code of proposalCode
- Specified by:
findProjects
in interface ProjectProvider
- Throws:
RepositoryException
findTestProjects
public List<Project> findTestProjects(Long userId)
throws RepositoryException
- Specified by:
findTestProjects
in interface ProjectProvider
- Throws:
RepositoryException
findProjects
public List<Project> findProjects(EventSetStatus status)
throws RepositoryException
- Specified by:
findProjects
in interface ProjectProvider
- Throws:
RepositoryException
findProjects
public List<Project> findProjects(Long userId,
EventSetStatus status)
throws RepositoryException
- Specified by:
findProjects
in interface ProjectProvider
- Throws:
RepositoryException
removeOrphanedScans
public void removeOrphanedScans()
throws RepositoryException
- Throws:
RepositoryException
getAllProjects
public List<Project> getAllProjects()
throws RepositoryException
- Specified by:
getAllProjects
in interface ProjectProvider
- Throws:
RepositoryException
save
public void save(Project project)
throws RepositoryException
- Throws:
RepositoryException
deleteById
public void deleteById(long id)
throws RepositoryException
- Throws:
RepositoryException
delete
public void delete(Project project)
throws RepositoryException
- Silently ignores being passed null and transient objects.
- Throws:
RepositoryException
cancelChanges
public void cancelChanges(Project p)
throws RepositoryException
- This method actually closes the whole HibernateSession! ALL changes not saved using
the active session object are lost, whether they pertain to this one project or not!
- Throws:
RepositoryException
Copyright © 2009. All Rights Reserved.