Interface FestivalArtistRepository

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

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

    Modifier and Type
    Method
    Description
    countByFestivalId(UUID festivalId)
    Counts the number of artists for a festival.
    void
    Deletes all festival-artist relationships for a festival.
    findByArtistId(UUID artistId)
    Finds all festival-artist relationships for an artist.
    findByFestivalId(UUID festivalId)
    Finds all festival-artist relationships for a festival.

    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

    • findByFestivalId

      List<FestivalArtist> findByFestivalId(UUID festivalId)
      Finds all festival-artist relationships for a festival.
      Parameters:
      festivalId - The ID of the festival.
      Returns:
      A list of festival-artist relationships.
    • findByArtistId

      List<FestivalArtist> findByArtistId(UUID artistId)
      Finds all festival-artist relationships for an artist.
      Parameters:
      artistId - The ID of the artist.
      Returns:
      A list of festival-artist relationships.
    • countByFestivalId

      Integer countByFestivalId(UUID festivalId)
      Counts the number of artists for a festival.
      Parameters:
      festivalId - The ID of the festival.
      Returns:
      The number of artists.
    • deleteByFestivalId

      @Transactional @Modifying @Query("delete from FestivalArtist fa where fa.festival.id = :festivalId") void deleteByFestivalId(UUID festivalId)
      Deletes all festival-artist relationships for a festival.
      Parameters:
      festivalId - The ID of the festival.