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

java.lang.Object
  extended by org.squashtest.tm.service.internal.repository.hibernate.HibernateDao<ENTITY_TYPE>
      extended by org.squashtest.tm.service.internal.repository.hibernate.HibernateEntityDao<LIBRARY>
          extended by org.squashtest.tm.service.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 org.squashtest.tm.domain.library.Library<NODE>,NODE extends org.squashtest.tm.domain.library.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.tm.service.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.tm.service.internal.repository.hibernate.HibernateEntityDao
collectFromMapList, collectFromMapList, collectFromMapListToSet, collectFromMapListToSet, findAllByIds, findById, findDescendantIds, findSorted, findSorted, getIdPropertyName
 
Methods inherited from class org.squashtest.tm.service.internal.repository.hibernate.HibernateDao
clearFromCache, clearFromCache, currentSession, executeEntityNamedQuery, executeEntityNamedQuery, executeEntityNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, executeListNamedQuery, executeUpdateListQuery, flush, getEntity, persist, persist, persistEntity, remove, removeAll, 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.tm.service.internal.repository.LibraryDao
findById
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.GenericDao
clearFromCache, clearFromCache, flush, persist, persist, remove, removeAll
 

Constructor Detail

HibernateLibraryDao

public HibernateLibraryDao()
Method Detail

findAll

public List<LIBRARY> findAll()
Specified by:
findAll in interface EntityDao<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>>
Specified by:
findAll in interface LibraryDao<LIBRARY extends org.squashtest.tm.domain.library.Library<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>
Overrides:
findAll in class HibernateEntityDao<LIBRARY extends org.squashtest.tm.domain.library.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 org.squashtest.tm.domain.library.Library<NODE>,NODE extends org.squashtest.tm.domain.library.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 org.squashtest.tm.domain.library.Library<NODE>,NODE extends org.squashtest.tm.domain.library.LibraryNode>
Returns:


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