Check it !!! UserRepository.java
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
50c1397db2
commit
85052f5728
@ -11,6 +11,32 @@ import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* UserRepository.getByAuthority:
|
||||
* Return list of:
|
||||
* SELECT * FROM User WHERE email = i.
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*
|
||||
* UserRepository.getByToken:
|
||||
* Return list of:
|
||||
* SELECT * FROM User WHERE token = i.
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*
|
||||
* UserRepository.searchForUsers:
|
||||
* Return list of:
|
||||
* SELECT * FROM User WHERE (name LIKE %?1% OR surname LIKE %?1%).
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*
|
||||
* UserRepository.searchForUsers with role:
|
||||
* Return list of:
|
||||
* SELECT * FROM User WHERE (name LIKE %?1% OR surname LIKE %?1%) AND role=?2").
|
||||
*
|
||||
* Where i, ?1 are equale to variables.
|
||||
*/
|
||||
|
||||
@Repository
|
||||
public interface UserRepository extends JpaRepository<User, Long> {
|
||||
@Query("FROM User WHERE email = ?1")
|
||||
|
Loading…
Reference in New Issue
Block a user