@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()
Returns the List of
Competitions managed by the authorized user
User. |
List<ligaaas.teamc.domain.Competition> |
findByUser(ligaaas.teamc.domain.User competitionUser)
Returns a
List of Competition with the specified user. |
List<ligaaas.teamc.domain.Competition> |
findPublicCompetition()
Returns a
List of public Competition. |
List<ligaaas.teamc.domain.Competition> |
findPublicCompetitionById(long competitionId)
Returns a
List of public Competition. |
List<ligaaas.teamc.domain.Competition> |
findPublicCompetitionByLocality(String competitionLocality)
Returns a
List of public Competition filtered by the
locality of the competition. |
List<ligaaas.teamc.domain.Competition> |
findPublicCompetitionBySportType(ligaaas.teamc.domain.SportType competitionSportType)
|
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 null@PermitAll public List<ligaaas.teamc.domain.Competition> findPublicCompetition()
List of public Competition.List of public Competition.@PermitAll public List<ligaaas.teamc.domain.Competition> findPublicCompetitionById(long competitionId)
List of public Competition.competitionId - Id of Competition.List of public Competition.@PermitAll public List<ligaaas.teamc.domain.Competition> findPublicCompetitionBySportType(ligaaas.teamc.domain.SportType competitionSportType)
competitionSportType - the SportType to be filtered ofList of public Competition filtered by a
SportType.@PermitAll public List<ligaaas.teamc.domain.Competition> findPublicCompetitionByLocality(String competitionLocality)
List of public Competition filtered by the
locality of the competition.competitionLocality - the locality to be filtered ofList of public Competition filtered by the
locality of the competition.public List<ligaaas.teamc.domain.Competition> findByUser()
Competitions managed by the authorized user
User.Competitions managed by the User.Copyright © 2018. All rights reserved.