@RolesAllowed(value="registered") public class CompetitionEJB extends Object
| Constructor and Description |
|---|
CompetitionEJB() |
| Modifier and Type | Method and Description |
|---|---|
ligaaas.teamc.domain.Competition |
create(ligaaas.teamc.domain.Competition competition)
Creates a new
Competition. |
void |
delete(long competitionId)
Deletes a
Competition. |
ligaaas.teamc.domain.Competition |
find(long competitionID)
Returns the
Competition identified by id. |
List<ligaaas.teamc.domain.Competition> |
findByDescription(String competitionDescription)
Returns a
List of Competition with the specified description. |
List<ligaaas.teamc.domain.Competition> |
findByName(String competitionName)
Returns a
List of Competition with the specified name. |
List<ligaaas.teamc.domain.Competition> |
findByShortName(String competitionShortName)
Returns a
List of Competition with the specified short name. |
List<ligaaas.teamc.domain.Competition> |
findBySportType(ligaaas.teamc.domain.SportType competitionSportType)
Returns a
List of Competition with the specified sport type. |
List<ligaaas.teamc.domain.Competition> |
findByTeam(ligaaas.teamc.domain.Team competitionTeam)
Returns a
List of Competition with the specified team. |
List<ligaaas.teamc.domain.Competition> |
findByUser(ligaaas.teamc.domain.User competitionUser)
Returns a
List of Competition with the specified user. |
ligaaas.teamc.domain.Competition |
update(ligaaas.teamc.domain.Competition competition)
Updates a competition.
|
public ligaaas.teamc.domain.Competition create(ligaaas.teamc.domain.Competition competition)
Competition. If the Competition already has
other entities related to it, they will be created too.competition. - A new competition to be stored.Competition created.IllegalArgumentException - if Competition is null or it already exist.public ligaaas.teamc.domain.Competition update(ligaaas.teamc.domain.Competition competition)
Competition is not stored, it will be
persisted.competition. - A modified Competition to be persisted.Competition modified.IllegalArgumentException - if the Competition is null or does not exist.public void delete(long competitionId)
Competition.competitionId. - The id of the Competition to be deleted.IllegalArgumentException - if the Competition does not exist.public ligaaas.teamc.domain.Competition find(long competitionID)
Competition identified by id. If there is no
Competition with the specified id, null will be
returned.competitionID. - The id of the competition to be returned.Competition with the given id.public List<ligaaas.teamc.domain.Competition> findByName(String competitionName)
List of Competition with the specified name.competitionName. - The name of the Competition to be searched.List of Competition with the specified name.IllegalArgumentException - if the competition name is null or its length is not between 5
and 60 characters.public List<ligaaas.teamc.domain.Competition> findByShortName(String competitionShortName)
List of Competition with the specified short name.competitionShortName. - The short name of the Competition to be searched.List of Competition with the specified short name.IllegalArgumentException - if the competition short name is null or its length is not
between 2 and 10 characters.public List<ligaaas.teamc.domain.Competition> findByDescription(String competitionDescription)
List of Competition with the specified description.competitionDescription. - The description of the Competition to be searched.List of Competition with the specified description.IllegalArgumentException - if the competition description is null or its length is not
between 10 and 240 characters.public List<ligaaas.teamc.domain.Competition> findBySportType(ligaaas.teamc.domain.SportType competitionSportType)
List of Competition with the specified sport type.competitionSportType. - The sport type of the Competition to be searched.List of Competition with the specified sport type.IllegalArgumentException - if the competition sport type is nullpublic List<ligaaas.teamc.domain.Competition> findByUser(ligaaas.teamc.domain.User competitionUser)
List of Competition with the specified user.competitionUser. - The user of the Competition to be searched.List of Competition with the specified user.IllegalArgumentException - if the competition user is nullpublic List<ligaaas.teamc.domain.Competition> findByTeam(ligaaas.teamc.domain.Team competitionTeam)
List of Competition with the specified team.competitionTeam. - The team of the Competition to be searched.List of Competition with the specified team.IllegalArgumentException - if the competition team is nullCopyright © 2017. All rights reserved.