@RolesAllowed(value={"ADMIN","USER"}) public class CompetitionService extends Object
| Constructor and Description |
|---|
CompetitionService() |
| Modifier and Type | Method and Description |
|---|---|
es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition |
create(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition competition)
Creates a new competition in the database
|
void |
delete(String name)
Logical deletes a competition in the database
|
List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> |
findOwned()
Returns all players owned by the actual user
|
es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition |
get(String name)
Gets a competition from the database
|
List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> |
getByCity(String city)
Gets a competition from the database searching by city
|
List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> |
getByNameDescription(String name,
String description)
Gets a competition from the database searching by name or description
|
List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> |
getBySport(String sport)
Gets a competition from the database searching by sport
|
es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition |
update(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition competition)
Updates a competition in the database
|
@PermitAll public es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition create(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition competition)
competition - the competition to be inserted in the databasejavax.ejb.EJBAccessException - if the competition user is not the current user does not have access to do this action.public void delete(String name)
name - the name of the competition to be logical deleted from the databasejavax.ejb.EJBAccessException - if the competition user is not the current user does not have access to do this action.public es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition update(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition competition)
competition - the competition to be updated in the databasejavax.ejb.EJBAccessException - if the competition user is not the current user does not have access to do this action.@PermitAll public es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition get(String name)
name - is the name of the competition for search@PermitAll public List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> getByNameDescription(String name, String description)
name - name of the competition to searchdescription - description of the competition to search@PermitAll public List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> getByCity(String city)
city - name of the city in which the competition to search takes place@PermitAll public List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> getBySport(String sport)
sport - name of the sport played in competition to search@RolesAllowed(value="REGISTERED") public List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Competition> findOwned()
Copyright © 2018. All rights reserved.