@RolesAllowed(value={"ADMIN","USER"}) public class TeamService extends Object
| Constructor and Description |
|---|
TeamService() |
| Modifier and Type | Method and Description |
|---|---|
es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team |
create(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
Creates a new team in the database
|
void |
delete(String name)
Logical deletes a team in the database
|
List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team> |
findByLocation(String location)
Gets a List of Teams from the database of a given location
|
List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team> |
findBySport(String sport)
Gets a List of Teams from the database of a given sport name
|
es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team |
get(String name)
Gets a Team from the database
|
List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team> |
getByNameDescription(String name,
String description)
Gets a Team from the database searching by name or description
|
es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team |
update(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
Updates a team in the database
|
@PermitAll public es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team create(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
team - the team to be inserted in the databasejavax.ejb.EJBAccessException - if the team user is not the current user does not have access to
do this action.public void delete(String name)
name - the name of the team to be logical deleted from the databasejavax.ejb.EJBAccessException - if the team user is not the current user does not have access to
do this action.public es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team update(es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team team)
team - the team to be updated in the databasejavax.ejb.EJBAccessException - if the team user is not the current user does not have access to
do this action.@PermitAll public es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team get(String name)
name - is the name of the team for search@PermitAll public List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team> getByNameDescription(String name, String description)
name - name of the Team to searchdescription - description of the Team to search@PermitAll public List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team> findBySport(String sport)
sport - a sport name for search teams@PermitAll public List<es.uvigo.esei.dgss.teamd.ligaaas.domain.entities.Team> findByLocation(String location)
location - a location for search teamsCopyright © 2018. All rights reserved.