Interface ShowcaseRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Showcase,​Long>, org.springframework.data.jpa.repository.JpaRepository<Showcase,​Long>, org.springframework.data.repository.PagingAndSortingRepository<Showcase,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Showcase>, org.springframework.data.repository.Repository<Showcase,​Long>

    @Repository
    public interface ShowcaseRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Showcase,​Long>
    Class represent repository which is responsible for show-case db operations
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Optional<Showcase> findByIdAndRoom​(Long showcaseId, Room room)
      Gets showcase by its id and room
      Optional<Showcase> findByNameAndRoom​(String name, Room room)
      Gets showcase by its name and room
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
      • Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

        deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, saveAll, saveAllAndFlush, saveAndFlush
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findBy, findOne
    • Method Detail

      • findByNameAndRoom

        Optional<Showcase> findByNameAndRoom​(String name,
                                             Room room)
        Gets showcase by its name and room
        Parameters:
        name - showcase name
        room - room
        Returns:
        found showcase
      • findByIdAndRoom

        Optional<Showcase> findByIdAndRoom​(Long showcaseId,
                                           Room room)
        Gets showcase by its id and room
        Parameters:
        showcaseId - showcase id
        room - room
        Returns:
        showcase by its id and room