Interface UserJpaRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<User,
,Integer> org.springframework.data.jpa.repository.JpaRepository<User,
,Integer> org.springframework.data.repository.ListCrudRepository<User,
,Integer> org.springframework.data.repository.ListPagingAndSortingRepository<User,
,Integer> org.springframework.data.repository.PagingAndSortingRepository<User,
,Integer> org.springframework.data.repository.query.QueryByExampleExecutor<User>
,org.springframework.data.repository.Repository<User,
Integer>
public interface UserJpaRepository
extends org.springframework.data.jpa.repository.JpaRepository<User,Integer>
UserJpaRepository는 User 엔티티에 대한 데이터 액세스 기능을 제공.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByEmailAndState
(String email, BaseEntity.State state) 사용자 email과 상태를 기반으로 사용자가 존재하는지 확인.findByEmailAndState
(String email, BaseEntity.State state) 사용자명과 상태를 기반으로 사용자를 찾음.findByIdAndState
(Integer id, BaseEntity.State state) 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
-
findByEmailAndState
사용자명과 상태를 기반으로 사용자를 찾음.- Parameters:
email
- 찾으려는 사용자의 emailstate
- 찾으려는 사용자의 상태 (ACTIVE 또는 INACTIVE)- Returns:
- 조건에 맞는 사용자를 포함하는 Optional 객체
-
existsByEmailAndState
사용자 email과 상태를 기반으로 사용자가 존재하는지 확인.- Parameters:
email
- 찾으려는 사용자의 emailstate
- 찾으려는 사용자의 상태 (ACTIVE 또는 INACTIVE)- Returns:
- 사용자가 존재하면 true, 존재하지 않으면 false
-
findByIdAndState
-