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<LIBRARY>
      extended by org.squashtest.csp.tm.internal.repository.hibernate.HibernateLibraryDao<LIBRARY,NODE>
Type Parameters:
LIBRARY -
NODE -
All Implemented Interfaces:
LibraryDao<LIBRARY,NODE>
Direct Known Subclasses:
HibernateCampaignLibraryDao, HibernateRequirementLibraryDao, HibernateTestCaseLibraryDao

public abstract class HibernateLibraryDao<LIBRARY extends Library<NODE>,NODE extends LibraryNode>
extends HibernateDao<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()
          Finds all libraries.
 List<NODE> findAllRootContentById(long libraryId)
          Finds the library root content.
 LIBRARY findById(long id)
           
 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.HibernateDao
currentSession, executeEntityNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, getEntity, persistEntity, removeEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateLibraryDao

public HibernateLibraryDao()
Method Detail

findById

public final LIBRARY findById(long id)
Specified by:
findById in interface LibraryDao<LIBRARY extends Library<NODE>,NODE extends LibraryNode>

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>

findAll

public final List<LIBRARY> findAll()
Finds all libraries. Template method which invokes a named query named "{libraryUnquilifiedClassName}.findAll" with a parameter named "libraryId"

Specified by:
findAll 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 Squashtest TM, Squashtest.org. All Rights Reserved.