@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(ligaaas.teamc.domain.User user)
Returns a
List of Team with the specified user. |
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.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.Copyright © 2017. All rights reserved.