Interface AppUserRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AppUser,
,Long> org.springframework.data.jpa.repository.JpaRepository<AppUser,
,Long> org.springframework.data.repository.ListCrudRepository<AppUser,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<AppUser,
,Long> org.springframework.data.repository.PagingAndSortingRepository<AppUser,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<AppUser>
,org.springframework.data.repository.Repository<AppUser,
Long>
@Repository
public interface AppUserRepository
extends org.springframework.data.jpa.repository.JpaRepository<AppUser,Long>
The app user repository holding the users credentials.
-
Method Summary
Modifier and TypeMethodDescriptionfindByFirstNameAndLastName
(String firstName, String lastName) This method is used to find a user by their first- and last name.findByUsername
(String username) This method is used to find a user by username.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
-
findByUsername
This method is used to find a user by username.- Parameters:
username
- The username of the user.- Returns:
- The user object.
-
findByFirstNameAndLastName
This method is used to find a user by their first- and last name.- Parameters:
firstName
- The first name of the user.lastName
- The last name of the user.- Returns:
- The user object.
-