Interface UserPreferenceRepository

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

    @Repository
    public interface UserPreferenceRepository
    extends org.springframework.data.jpa.repository.JpaRepository<UserPreference,​Long>
    Spring Data repository for the UserPreference entity.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Optional<UserPreference> findByNameforUser​(String name, Long userId)  
      List<UserPreference> findByUser​(Long userId)  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

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

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

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

        count, exists, findAll, findOne
    • Method Detail

      • findByUser

        @Query(name="UserPreference.findByUserId")
        List<UserPreference> findByUser​(@Param("userId")
                                        Long userId)
      • findByNameforUser

        @Query(name="UserPreference.findByNameforUser")
        Optional<UserPreference> findByNameforUser​(@Param("name")
                                                   String name,
                                                   @Param("userId")
                                                   Long userId)