| 1234567891011121314151617181920212223242526272829303132333435363738 |
- package com.izouma.nineth.repo;
- import com.izouma.nineth.domain.ShowCollection;
- import org.springframework.data.jpa.repository.JpaRepository;
- import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
- import org.springframework.data.jpa.repository.Modifying;
- import org.springframework.data.jpa.repository.Query;
- import javax.transaction.Transactional;
- import java.util.Collection;
- import java.util.List;
- public interface ShowCollectionRepo extends JpaRepository<ShowCollection, Long>, JpaSpecificationExecutor<ShowCollection> {
- @Query("update ShowCollection t set t.del = true where t.id = ?1")
- @Modifying
- @Transactional
- void softDelete(Long id);
- @Query("update ShowCollection t set t.del = true where t.collectionId = ?1")
- @Modifying
- @Transactional
- void softDeleteCollection(Long collectionId);
- List<ShowCollection> findAllByShowroomId(Long showroomId);
- List<ShowCollection> findAllByShowroomIdIn(Collection<Long> showroomId);
- @Query("update ShowCollection t set t.del = true where t.showroomId = ?1")
- @Modifying
- @Transactional
- void softDeleteByRoom(Long showroomId);
- @Query("update ShowCollection t set t.del = true where t.id in ?1")
- @Modifying
- @Transactional
- void softDeleteByIdIn(Collection<Long> ids);
- }
|