org.squashtest.tm.service.internal.repository
Interface TeamDao

All Superinterfaces:
CustomTeamDao, EntityDao<org.squashtest.tm.domain.users.Team>, GenericDao<org.squashtest.tm.domain.users.Team>

public interface TeamDao
extends CustomTeamDao

Data access methods for Teams. Methods are all dynamically generated: see DynamicDaoFactoryBean.

Author:
mpagnon

Method Summary
 long count()
          Simply count all Teams
 long countAssociatedTeams(long userId)
          Will count the number of Teams where the concerned user is member.
 void delete(org.squashtest.tm.domain.users.Team team)
          Simply delete the given Team
 List<org.squashtest.tm.domain.users.Team> findAllByIds(List<Long> teamIds)
          Find all teams matching the given ids
 List<org.squashtest.tm.domain.users.Team> findAllByName(String name)
          Find all teams with name equals to the given name param.
 List<org.squashtest.tm.domain.users.Team> findAllNonAssociatedTeams(long userId)
          Will return all Teams that don't have the concerned user as a member.
 org.squashtest.tm.domain.users.Team findById(long teamId)
          Simply retrieve the Team of the given id
 void persist(org.squashtest.tm.domain.users.Team team)
          Will persist a new team.
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.CustomTeamDao
findSortedAssociatedTeams, findSortedTeams
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.EntityDao
findAll, findAllByIds
 
Methods inherited from interface org.squashtest.tm.service.internal.repository.GenericDao
clearFromCache, clearFromCache, flush, persist, remove, removeAll
 

Method Detail

persist

void persist(org.squashtest.tm.domain.users.Team team)
Will persist a new team.

Specified by:
persist in interface GenericDao<org.squashtest.tm.domain.users.Team>
Parameters:
team - : the new team to persist

findById

org.squashtest.tm.domain.users.Team findById(long teamId)
Simply retrieve the Team of the given id

Specified by:
findById in interface EntityDao<org.squashtest.tm.domain.users.Team>
Parameters:
teamId -
Returns:

delete

void delete(org.squashtest.tm.domain.users.Team team)
Simply delete the given Team

Parameters:
team -

findAllByName

List<org.squashtest.tm.domain.users.Team> findAllByName(String name)
Find all teams with name equals to the given name param.

Parameters:
name -
Returns:
list of team with same name as param

count

long count()
Simply count all Teams

Returns:
amount of Team in database

findAllByIds

List<org.squashtest.tm.domain.users.Team> findAllByIds(List<Long> teamIds)
Find all teams matching the given ids

Parameters:
teamIds - : ids of Teams to return
Returns:
List of matching Teams.

countAssociatedTeams

long countAssociatedTeams(long userId)
Will count the number of Teams where the concerned user is member.

Parameters:
userId - : id of the concerned user
Returns:
the total number of teams associated to the user

findAllNonAssociatedTeams

List<org.squashtest.tm.domain.users.Team> findAllNonAssociatedTeams(long userId)
Will return all Teams that don't have the concerned user as a member.

Parameters:
userId - : the id of the concerned user
Returns:


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