Schnittstelle RecommendationRepository
- Alle Superschnittstellen:
org.springframework.data.repository.CrudRepository<Recommendation,
,Long> org.springframework.data.jpa.repository.JpaRepository<Recommendation,
,Long> org.springframework.data.repository.ListCrudRepository<Recommendation,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<Recommendation,
,Long> org.springframework.data.repository.PagingAndSortingRepository<Recommendation,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Recommendation>
,org.springframework.data.repository.Repository<Recommendation,
Long>
public interface RecommendationRepository
extends org.springframework.data.jpa.repository.JpaRepository<Recommendation,Long>
Repository interface for accessing and managing recommendation entities in the database.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
updateCreatorToNull
(Long userId) In case of a user is deleted, updates the creator to nullVon Schnittstelle geerbte Methoden org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Von Schnittstelle geerbte Methoden org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Von Schnittstelle geerbte Methoden org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.PagingAndSortingRepository
findAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Methodendetails
-
updateCreatorToNull
@Modifying @Query(" UPDATE Recommendation r SET r.creator = null WHERE r.creator.id = :userId\n") void updateCreatorToNull(Long userId) In case of a user is deleted, updates the creator to null- Parameter:
userId
- the ID of the user, that is set to null
-