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
|
es.uvigo.esei.dgss.team.TeamJPA |
getOwner(es.uvigo.esei.dgss.user.UserJPA owner)
Search by owner
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
list()
Gets all teams
|
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> |
listPlayers(es.uvigo.esei.dgss.team.TeamJPA team)
Gets all players of a team
|
List<es.uvigo.esei.dgss.team.TeamJPA> |
listTeams(es.uvigo.esei.dgss.user.UserJPA user)
Gets all teams of a user
|
es.uvigo.esei.dgss.team.TeamJPA |
read(String name)
Gets a team given its full name
|
es.uvigo.esei.dgss.team.TeamJPA |
searchByDescription(String description)
Search team by description
|
es.uvigo.esei.dgss.team.TeamJPA |
searchByName(String name)
Search team by name
|
es.uvigo.esei.dgss.team.TeamJPA |
searchBySport(String sport)
Search team by sport
|
es.uvigo.esei.dgss.team.TeamJPA |
update(es.uvigo.esei.dgss.team.TeamJPA team)
Updates a 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(String name)
name - Full name of the team to findpublic es.uvigo.esei.dgss.team.TeamJPA update(es.uvigo.esei.dgss.team.TeamJPA team)
team - The team to be updatedIllegalArgumentException - if the user is not foundpublic void delete(es.uvigo.esei.dgss.team.TeamJPA team)
team - The team to be removedIllegalArgumentException - if the team is not foundpublic List<es.uvigo.esei.dgss.team.TeamJPA> list()
public List<es.uvigo.esei.dgss.team.TeamJPA> listTeams(es.uvigo.esei.dgss.user.UserJPA user)
user - The user which belongs to teampublic List<es.uvigo.esei.dgss.team.TeamJPA> listPlayers(es.uvigo.esei.dgss.team.TeamJPA team)
team - The team that the players belongs to teampublic es.uvigo.esei.dgss.team.TeamJPA searchByName(String name)
name - The name of the teampublic es.uvigo.esei.dgss.team.TeamJPA searchByDescription(String description)
description - The description of the teampublic es.uvigo.esei.dgss.team.TeamJPA getOwner(es.uvigo.esei.dgss.user.UserJPA owner)
owner - The owner of the teampublic es.uvigo.esei.dgss.team.TeamJPA searchBySport(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 addedCopyright © 2017. All rights reserved.