Package org.localify.repositories
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 TypeMethodDescriptioncountByFestivalId(UUID festivalId) Counts the number of artists for a festival.voiddeleteByFestivalId(UUID festivalId) 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, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByFestivalId
Finds all festival-artist relationships for a festival.- Parameters:
festivalId- The ID of the festival.- Returns:
- A list of festival-artist relationships.
-
findByArtistId
Finds all festival-artist relationships for an artist.- Parameters:
artistId- The ID of the artist.- Returns:
- A list of festival-artist relationships.
-
countByFestivalId
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.
-