@RolesAllowed(value="registered") public class PlayerEJB extends Object
| Constructor and Description |
|---|
PlayerEJB() |
| Modifier and Type | Method and Description |
|---|---|
ligaaas.teamc.domain.Player |
create(ligaaas.teamc.domain.Player player)
Creates a new
Player. |
ligaaas.teamc.domain.Player |
createUserPlayer(ligaaas.teamc.domain.Player player)
Creates a new
Player. |
void |
delete(long playerId)
Deletes a
Player. |
ligaaas.teamc.domain.Player |
find(long playerID)
Returns the
Player identified by id. |
List<ligaaas.teamc.domain.Player> |
findByUser()
Returns the List of
Player managed by the authorized user
User. |
List<ligaaas.teamc.domain.Player> |
findPlayersByLocality(String locality)
Returns the List of
Player given its locality. |
List<ligaaas.teamc.domain.Player> |
findPlayersByNickname(String nickname)
Returns the List of
Player given its nickname. |
List<ligaaas.teamc.domain.Player> |
findTeamPlayers(ligaaas.teamc.domain.Team team)
Returns the List of
Player that plays in a Team. |
ligaaas.teamc.domain.Player |
update(ligaaas.teamc.domain.Player player)
Updates a player.
|
public ligaaas.teamc.domain.Player create(ligaaas.teamc.domain.Player player)
Player.player - A new player to be stored.Player created.NullPointerException - if Player is null.IllegalArgumentException - if Player already exists.public ligaaas.teamc.domain.Player createUserPlayer(ligaaas.teamc.domain.Player player)
Player.player - A new user player to be stored.Player created.NullPointerException - if Player is null.IllegalArgumentException - if Player already exists.public ligaaas.teamc.domain.Player find(long playerID)
Player identified by id. If there is no Player
with the specified id, null will be returned.playerID. - The id of the Player to be returned.Player with the given id.public ligaaas.teamc.domain.Player update(ligaaas.teamc.domain.Player player)
player - A modified Player to be persisted.Player modified.NullPointerException - if the Player is null.IllegalArgumentException - if Player doesn't exist.javax.ejb.EJBAccessException - if player's user isn't the current principal.public void delete(long playerId)
Player.playerId. - The id of the Player to be deleted.NullPointerException - if the Player does not exist.javax.ejb.EJBAccessException - if player's user isn't the current principal.public List<ligaaas.teamc.domain.Player> findByUser()
Player managed by the authorized user
User.Player managed by the User.@PermitAll public List<ligaaas.teamc.domain.Player> findTeamPlayers(ligaaas.teamc.domain.Team team)
Player that plays in a Team.Player that plays in a Team.public List<ligaaas.teamc.domain.Player> findPlayersByNickname(String nickname)
Player given its nickname.nickname - The nickname of the playersPlayer that have that nickname.Copyright © 2018. All rights reserved.