Interface FestivalUserRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<FestivalUser,FestivalUser.Key>, org.springframework.data.jpa.repository.JpaRepository<FestivalUser,FestivalUser.Key>, org.springframework.data.repository.ListCrudRepository<FestivalUser,FestivalUser.Key>, org.springframework.data.repository.ListPagingAndSortingRepository<FestivalUser,FestivalUser.Key>, org.springframework.data.repository.PagingAndSortingRepository<FestivalUser,FestivalUser.Key>, org.springframework.data.repository.query.QueryByExampleExecutor<FestivalUser>, org.springframework.data.repository.Repository<FestivalUser,FestivalUser.Key>

public interface FestivalUserRepository extends org.springframework.data.jpa.repository.JpaRepository<FestivalUser,FestivalUser.Key>
Repository for FestivalUser entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    Finds a festival-user relationship by festival ID and user ID.
    Finds all festival-user relationships for a user, ordered by selected time.

    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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    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 Details

    • findByKeyFestivalIdAndKeyUserId

      Optional<FestivalUser> findByKeyFestivalIdAndKeyUserId(UUID festivalId, UUID userId)
      Finds a festival-user relationship by festival ID and user ID.
      Parameters:
      festivalId - The ID of the festival.
      userId - The ID of the user.
      Returns:
      An optional containing the festival-user relationship if found, otherwise empty.
    • findByKeyUserId

      @Query("select fu from FestivalUser fu where fu.key.userId = :userId order by fu.selectedAt desc") List<FestivalUser> findByKeyUserId(UUID userId)
      Finds all festival-user relationships for a user, ordered by selected time.
      Parameters:
      userId - The ID of the user.
      Returns:
      A list of festival-user relationships.