Package de.dlr.proseo.usermgr.dao
Schnittstelle UserRepository
- Alle Superschnittstellen:
org.springframework.data.repository.CrudRepository<User,
,String> org.springframework.data.jpa.repository.JpaRepository<User,
,String> org.springframework.data.repository.PagingAndSortingRepository<User,
,String> org.springframework.data.repository.query.QueryByExampleExecutor<User>
,org.springframework.data.repository.Repository<User,
String>
@Repository
public interface UserRepository
extends org.springframework.data.jpa.repository.JpaRepository<User,String>
Data Access Object for the User class
- Autor:
- Dr. Thomas Bassler *
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungfindByAuthority
(String authority) Get all user accounts having the given authority (as directly assigned authority)findByExpirationDateBefore
(Date expirationLimit) Get all user accounts whose expiration date is reached before the given limit datefindByMissionCode
(String missionCode) Get all users for the given missionfindByUsername
(String username) Get the user with the given user nameVon Schnittstelle geerbte Methoden org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
Von Schnittstelle geerbte Methoden org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
Von Schnittstelle geerbte Methoden org.springframework.data.repository.PagingAndSortingRepository
findAll
Von Schnittstelle geerbte Methoden org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findOne
-
Methodendetails
-
findByUsername
Get the user with the given user name- Parameter:
username
- the user name- Gibt zurück:
- the unique processing user identified by the given user name
-
findByMissionCode
@Query("select u from users u where u.username like concat(?1, \'-%\')") List<User> findByMissionCode(String missionCode) Get all users for the given mission- Parameter:
missionCode
- the code of the mission- Gibt zurück:
- a list of users with user names starting with the mission code
-
findByExpirationDateBefore
Get all user accounts whose expiration date is reached before the given limit date- Parameter:
expirationLimit
- limit date for account expirations- Gibt zurück:
- a list of user accounts expired before the given limit
-
findByAuthority
@Query("select u from users u join u.authorities a where a.authority = ?1") List<User> findByAuthority(String authority) Get all user accounts having the given authority (as directly assigned authority)- Parameter:
authority
- the authority (name) to check for- Gibt zurück:
- a list of user accounts with the given authority
-