public class TeamEJB extends Object
| Constructor and Description |
|---|
TeamEJB() |
| Modifier and Type | Method and Description |
|---|---|
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 teamUser)
Returns a
List of Team with the specified user. |
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.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.public void delete(long teamId)
Team.teamId. - The id of the Team to be deleted.NullPointerException - if the Team does not exist.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 teamUser)
List of Team with the specified user.teamUser. - 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 nullCopyright © 2017. All rights reserved.