@RolesAllowed(value="registered") public class TeamEJB extends Object
| Constructor and Description |
|---|
TeamEJB() |
| Modifier and Type | Method and Description |
|---|---|
ligaaas.teamc.domain.Team |
addPlayers(List<ligaaas.teamc.domain.Player> teamPlayers,
ligaaas.teamc.domain.Team team)
Adds players to team.
|
ligaaas.teamc.domain.Team |
create(ligaaas.teamc.domain.Team team)
Creates a new
Team. |
void |
delete(long teamId)
Deletes a
Team. |
ligaaas.teamc.domain.Team |
find(long teamID)
Returns the
Team identified by id. |
List<ligaaas.teamc.domain.Team> |
findByDescription(String teamDescription)
Returns a
List of Team with the specified description. |
List<ligaaas.teamc.domain.Team> |
findByName(String teamName)
Returns a
List of Team with the specified name. |
List<ligaaas.teamc.domain.Team> |
findBySportType(ligaaas.teamc.domain.SportType teamSportType)
Returns a
List of Team with the specified sportType. |
List<ligaaas.teamc.domain.Team> |
findByUser()
Returns the List of
Team managed by the authorized user
User. |
List<ligaaas.teamc.domain.Team> |
findByUser(ligaaas.teamc.domain.User user)
Returns a
List of Team with the specified user. |
List<ligaaas.teamc.domain.Team> |
findPublicTeam()
Returns a
List of public Team |
List<ligaaas.teamc.domain.Team> |
findPublicTeamByCompetition(ligaaas.teamc.domain.Competition competition)
Returns a
List of public Team filtered by the competition
associated. |
List<ligaaas.teamc.domain.Team> |
findPublicTeamByLocality(String teamLocality)
Returns a
List of public Team filtered by the locality of
the team. |
List<ligaaas.teamc.domain.Team> |
findPublicTeamBySportType(ligaaas.teamc.domain.SportType teamSportType)
|
ligaaas.teamc.domain.Team |
removePlayers(List<ligaaas.teamc.domain.Player> teamPlayers,
ligaaas.teamc.domain.Team team)
Removes players from team.
|
ligaaas.teamc.domain.Team |
update(ligaaas.teamc.domain.Team team)
Updates a team.
|
public ligaaas.teamc.domain.Team create(ligaaas.teamc.domain.Team team)
Team. If the Team already has other
entities related to it, they will be created too.team - A new team to be stored.Team created.NullPointerException - if Team is null.IllegalArgumentException - if Team already exists.public ligaaas.teamc.domain.Team update(ligaaas.teamc.domain.Team team)
Team is not stored, it will be persisted.team - A modified Team to be persisted.Team modified.NullPointerException - if the Team is null.IllegalArgumentException - if Team doesn't exist.javax.ejb.EJBAccessException - if team's user isn't the current principal.public void delete(long teamId)
Team.teamId. - The id of the Team to be deleted.NullPointerException - if the Team does not exist.javax.ejb.EJBAccessException - if team's user isn't the current principal.@PermitAll public ligaaas.teamc.domain.Team find(long teamID)
Team identified by id. If there is no Team
with the specified id, null will be returned.teamID. - The id of the Team to be returned.Team with the given id.public List<ligaaas.teamc.domain.Team> findByName(String teamName)
List of Team with the specified name.teamName. - The name of the Team to be searched.List of Team with the specified name.NullPointerException - if the team name is null.IllegalArgumentException - if the team name length is not between 5 and 60 characters.public List<ligaaas.teamc.domain.Team> findByDescription(String teamDescription)
List of Team with the specified description.teamDescription. - The description of the Team to be searched.List of Team with the specified description.NullPointerException - if the team descripcion is null.IllegalArgumentException - if the team description length is not between 10 and 240
characters.public List<ligaaas.teamc.domain.Team> findByUser(ligaaas.teamc.domain.User user)
List of Team with the specified user.user. - The user of the Team to be searched.List of Team with the specified user.NullPointerException - if the team user is nullpublic List<ligaaas.teamc.domain.Team> findBySportType(ligaaas.teamc.domain.SportType teamSportType)
List of Team with the specified sportType.teamSportType. - The sport type of the Team to be searched.List of Team with the specified sport type.IllegalArgumentException - if the team sport type is nullpublic ligaaas.teamc.domain.Team addPlayers(List<ligaaas.teamc.domain.Player> teamPlayers, ligaaas.teamc.domain.Team team)
teamPlayers - A Player list to add.team - A Team to add players.Team modified.NullPointerException - if the Team is null.NullPointerException - if the Player is null.IllegalArgumentException - if Team has been deleted.IllegalArgumentException - if the new players already are in the team.javax.ejb.EJBAccessException - if team's user isn't the current principal.public ligaaas.teamc.domain.Team removePlayers(List<ligaaas.teamc.domain.Player> teamPlayers, ligaaas.teamc.domain.Team team)
teamPlayers - A Player list to remove.team - A Team to remove players.Team modified.NullPointerException - if the Team is null.NullPointerException - if the Player is null.IllegalArgumentException - if the players to remove aren't in the team.javax.ejb.EJBAccessException - if team's user isn't the current principal.public List<ligaaas.teamc.domain.Team> findByUser()
Team managed by the authorized user
User.Team managed by the User.@PermitAll public List<ligaaas.teamc.domain.Team> findPublicTeam()
List of public TeamList of public Team@PermitAll public List<ligaaas.teamc.domain.Team> findPublicTeamBySportType(ligaaas.teamc.domain.SportType teamSportType)
teamSportType - the SportType to be filtered ofList of public Team filtered by a
SportType.@PermitAll public List<ligaaas.teamc.domain.Team> findPublicTeamByLocality(String teamLocality)
List of public Team filtered by the locality of
the team.teamLocality - the locality to be filtered ofList of public Team filtered by the locality of
the team.@PermitAll public List<ligaaas.teamc.domain.Team> findPublicTeamByCompetition(ligaaas.teamc.domain.Competition competition)
List of public Team filtered by the competition
associated.competition - the competition associated.List of public Team.Copyright © 2018. All rights reserved.