public class TeamEJB extends Object
| Constructor and Description |
|---|
TeamEJB() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPlayer(es.uvigo.esei.dgss.user.UserPlayerJPA player,
es.uvigo.esei.dgss.team.TeamJPA team)
Add a player to a team
|
void |
create(es.uvigo.esei.dgss.team.TeamJPA team)
Creates a new team
|
void |
delete(es.uvigo.esei.dgss.team.TeamJPA team)
Deletes a team
|
void |
deletePlayer(es.uvigo.esei.dgss.user.UserPlayerJPA player,
es.uvigo.esei.dgss.team.TeamJPA team)
Delete a player to a team
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
list()
Gets all teams
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
listByDescription(String description)
Search team by description
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
listByName(String name)
Search team by name
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
listByOwner(es.uvigo.esei.dgss.user.UserJPA owner)
Search by owner
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
listBySport(String sport)
Search team by sport
|
List<es.uvigo.esei.dgss.competition.CompetitionJPA> |
listCompetitions(es.uvigo.esei.dgss.team.TeamJPA team)
Get all competitions which team plays
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
listTeamPlayers(es.uvigo.esei.dgss.team.TeamJPA team)
Gets all players of a team
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
listTeamsByUser(es.uvigo.esei.dgss.user.UserJPA user)
Gets all teams of a user
|
es.uvigo.esei.dgss.team.TeamJPA |
read(int idTeam)
Gets a team given its full name
|
es.uvigo.esei.dgss.team.TeamJPA |
update(es.uvigo.esei.dgss.team.TeamJPA team)
Updates a team
|
void |
updateOwnerTeam(es.uvigo.esei.dgss.user.UserJPA user,
es.uvigo.esei.dgss.team.TeamJPA team)
Change the owner of the team
|
public void create(es.uvigo.esei.dgss.team.TeamJPA team)
team - A new team to be storedpublic es.uvigo.esei.dgss.team.TeamJPA read(int idTeam)
idTeam - Id of the team to findpublic es.uvigo.esei.dgss.team.TeamJPA update(es.uvigo.esei.dgss.team.TeamJPA team)
team - The team to be updatedpublic void delete(es.uvigo.esei.dgss.team.TeamJPA team)
team - The team to be removedpublic List<es.uvigo.esei.dgss.team.TeamJPA> list()
public List<es.uvigo.esei.dgss.team.TeamJPA> listTeamsByUser(es.uvigo.esei.dgss.user.UserJPA user)
user - The user which belongs to teampublic List<es.uvigo.esei.dgss.team.TeamJPA> listTeamPlayers(es.uvigo.esei.dgss.team.TeamJPA team)
team - The team that the players belongs to teampublic List<es.uvigo.esei.dgss.team.TeamJPA> listByName(String name)
name - The name of the teampublic List<es.uvigo.esei.dgss.team.TeamJPA> listByDescription(String description)
description - The description of the teampublic List<es.uvigo.esei.dgss.team.TeamJPA> listByOwner(es.uvigo.esei.dgss.user.UserJPA owner)
owner - The owner of the teampublic List<es.uvigo.esei.dgss.team.TeamJPA> listBySport(String sport)
sport - The sport of the teampublic List<es.uvigo.esei.dgss.competition.CompetitionJPA> listCompetitions(es.uvigo.esei.dgss.team.TeamJPA team)
team - The team which will get the competitionspublic void addPlayer(es.uvigo.esei.dgss.user.UserPlayerJPA player,
es.uvigo.esei.dgss.team.TeamJPA team)
player - The player to add to the teamteam - Team which player will be addedpublic void deletePlayer(es.uvigo.esei.dgss.user.UserPlayerJPA player,
es.uvigo.esei.dgss.team.TeamJPA team)
player - The player to add to the teamteam - Team which player will be addedpublic void updateOwnerTeam(es.uvigo.esei.dgss.user.UserJPA user,
es.uvigo.esei.dgss.team.TeamJPA team)
user - The new owner of teamteam - The team to change ownerCopyright © 2017. All rights reserved.