-
-
Save jordanbaucke/7b14b3c939774b59063d980feb191016 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Spring Data JPA repository for the User entity. | |
*/ | |
public interface UserRepository extends EntityGraphJpaRepository<User, Long> { | |
Optional<User> findOneByActivationKey(String activationKey); | |
List<User> findAllByActivatedIsFalseAndCreatedDateBefore(ZonedDateTime dateTime); | |
Optional<User> findOneByResetKey(String resetKey); | |
Optional<User> findOneByEmail(String email); | |
Optional<User> findOneByLogin(String login); | |
@Query(value = "select distinct user from User user left join fetch user.authorities", | |
countQuery = "select count(user) from User user") | |
Page<User> findAllWithAuthorities(Pageable pageable); | |
@Query("SELECT new com.evasyst.api.web.rest.vm.ManagedUserVM(user) FROM User user") | |
Page<ManagedUserVM> findAllUsersPaginated(Pageable pageable); | |
Integer countByOnline(Boolean online); | |
Optional<User> findOneByUserProfile(UserProfile userProfile); | |
List<User> findAllByTestData(Boolean testdata); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment