Class GameService


  • @Service
    @Transactional
    public class GameService
    extends Object
    Service Implementation for managing Game.
    • Method Detail

      • save

        public Game save​(Game game)
        Save a game.
        Parameters:
        game - the entity to save
        Returns:
        the persisted entity
      • findAll

        @Transactional(readOnly=true)
        public org.springframework.data.domain.Page<Game> findAll​(org.springframework.data.domain.Pageable pageable)
        Get all the games.
        Parameters:
        pageable - the pagination information
        Returns:
        the list of entities
      • findByOwnerIsCurrentUserOrShared

        @Transactional(readOnly=true)
        public List<Game> findByOwnerIsCurrentUserOrShared​(String login)
        Get all the games owned by this user, plus all shared games.
        Returns:
        the list of entities
      • findByNameAndType

        @Transactional(readOnly=true)
        public List<Game> findByNameAndType​(String login,
                                            String name,
                                            GameType type)
        Get one game by login, name and type.
        Parameters:
        login -
        name -
        type -
        Returns:
        the entity
      • findOne

        @Transactional(readOnly=true)
        public Optional<Game> findOne​(Long id)
        Get one game by id.
        Parameters:
        id - the id of the entity
        Returns:
        the entity
      • findByAssociatedFile

        @Transactional(readOnly=true)
        public List<Game> findByAssociatedFile​(File file)
      • delete

        public void delete​(Game game)
        Delete the game.
        Parameters:
        game - the Game to delete