@Service @Transactional public class GameService extends Object
| Constructor and Description |
|---|
GameService(GameRepository gameRepository,
FileService fileService) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(Long id)
Delete the game by id.
|
org.springframework.data.domain.Page<Game> |
findAll(org.springframework.data.domain.Pageable pageable)
Get all the games.
|
List<Game> |
findByAssociatedFile(File file) |
List<Game> |
findByNameAndType(String login,
String name,
GameType type)
Get one game by login, name and type.
|
List<Game> |
findByOwnerIsCurrentUserOrShared(String login)
Get all the games owned by this user, plus all shared games.
|
Game |
findOne(Long id)
Get one game by id.
|
Game |
save(Game game)
Save a game.
|
public GameService(GameRepository gameRepository, FileService fileService)
public Game save(Game game)
game - the entity to save@Transactional(readOnly=true) public org.springframework.data.domain.Page<Game> findAll(org.springframework.data.domain.Pageable pageable)
pageable - the pagination information@Transactional(readOnly=true) public List<Game> findByOwnerIsCurrentUserOrShared(String login)
@Transactional(readOnly=true) public List<Game> findByNameAndType(String login, String name, GameType type)
login - name - type - @Transactional(readOnly=true) public Game findOne(Long id)
id - the id of the entity@Transactional(readOnly=true) public List<Game> findByAssociatedFile(File file)
public void delete(Long id)
id - the id of the entityCopyright © 2018 Power TAC. All rights reserved.