Interface UserCommonsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<UserCommons,
,UserCommonsKey> org.springframework.data.repository.Repository<UserCommons,
UserCommonsKey>
@Repository
public interface UserCommonsRepository
extends org.springframework.data.repository.CrudRepository<UserCommons,UserCommonsKey>
-
Method Summary
Modifier and TypeMethodDescriptionfindByCommonsId
(Long commonsId) findByCommonsIdAndUserId
(Long commonsId, Long userId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAll
-
Method Details
-
findByCommonsIdAndUserId
@Query("SELECT uc FROM user_commons uc WHERE uc.commons.id = :commonsId AND uc.user.id = :userId") Optional<UserCommons> findByCommonsIdAndUserId(Long commonsId, Long userId) -
findByCommonsId
@Query("SELECT uc FROM user_commons uc WHERE uc.commons.id = :commonsId") Iterable<UserCommons> findByCommonsId(Long commonsId)
-