org.squashtest.csp.tm.internal.repository.hibernate
Class HibernateLibraryDao<LIBRARY extends Library<NODE>,NODE extends LibraryNode>

java.lang.Object
  extended by org.squashtest.csp.tm.internal.repository.hibernate.HibernateDao<ENTITY_TYPE>
      extended by org.squashtest.csp.tm.internal.repository.hibernate.HibernateEntityDao<LIBRARY>
          extended by org.squashtest.csp.tm.internal.repository.hibernate.HibernateLibraryDao<LIBRARY,NODE>
Type Parameters:
LIBRARY -
NODE -
All Implemented Interfaces:
EntityDao<LIBRARY>, GenericDao<LIBRARY>, LibraryDao<LIBRARY,NODE>
Direct Known Subclasses:
HibernateCampaignLibraryDao, HibernateRequirementLibraryDao, HibernateTestCaseLibraryDao

public abstract class HibernateLibraryDao<LIBRARY extends Library<NODE>,NODE extends LibraryNode>
extends HibernateEntityDao<LIBRARY>
implements LibraryDao<LIBRARY,NODE>

Superclass for DAOs of Library objects.

Author:
Gregory Fouquet

Field Summary
 
Fields inherited from class org.squashtest.csp.tm.internal.repository.hibernate.HibernateDao
entityType
 
Constructor Summary
HibernateLibraryDao()
           
 
Method Summary
 List<LIBRARY> findAll()
           
 List<NODE> findAllRootContentById(long libraryId)
          Finds the library root content.
 LIBRARY findByRootContent(NODE node)
          Finds the library which has the given node in its root content.
 
Methods inherited from class org.squashtest.csp.tm.internal.repository.hibernate.HibernateEntityDao
findAllByIds, findById, findDescendantIds, findSorted, findSorted, findSorted, getIdPropertyName
 
Methods inherited from class org.squashtest.csp.tm.internal.repository.hibernate.HibernateDao
clearFromCache, clearFromCache, currentSession, executeEntityNamedQuery, executeEntityNamedQuery, executeEntityNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, executeUpdateListQuery, flush, getEntity, persist, persist, persistEntity, remove, removeEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.squashtest.csp.tm.internal.repository.LibraryDao
findById
 
Methods inherited from interface org.squashtest.csp.tm.internal.repository.GenericDao
clearFromCache, clearFromCache, flush, persist, persist, remove
 

Constructor Detail

HibernateLibraryDao

public HibernateLibraryDao()
Method Detail

findAll

public List<LIBRARY> findAll()
Specified by:
findAll in interface EntityDao<LIBRARY extends Library<NODE>>
Specified by:
findAll in interface LibraryDao<LIBRARY extends Library<NODE>,NODE extends LibraryNode>
Overrides:
findAll in class HibernateEntityDao<LIBRARY extends Library<NODE>>
Returns:
a list of all entities found in the database with no restriction

findAllRootContentById

public final List<NODE> findAllRootContentById(long libraryId)
Finds the library root content. Template method which invokes a named query named "{libraryUnquilifiedClassName}.findAllRootContentById" with a parameter named "libraryId"

Specified by:
findAllRootContentById in interface LibraryDao<LIBRARY extends Library<NODE>,NODE extends LibraryNode>

findByRootContent

public LIBRARY findByRootContent(NODE node)
Description copied from interface: LibraryDao
Finds the library which has the given node in its root content.

Specified by:
findByRootContent in interface LibraryDao<LIBRARY extends Library<NODE>,NODE extends LibraryNode>
Returns:


Copyright © 2010-2012 Henix, henix.fr. All Rights Reserved.