Class UserServiceImpl
java.lang.Object
com.foreach.across.modules.user.services.UserServiceImpl
- All Implemented Interfaces:
UserService,org.springframework.data.querydsl.QuerydslPredicateExecutor<User>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcount(com.querydsl.core.types.Predicate predicate) voiddelete(long userId) voiddeleteProperties(long userId) voiddeleteProperties(User user) booleanexists(com.querydsl.core.types.Predicate predicate) findAll(com.querydsl.core.types.OrderSpecifier<?>... orders) findAll(com.querydsl.core.types.Predicate predicate) findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) org.springframework.data.domain.Page<User>findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable) findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) <S extends User,R>
RfindBy(com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) findOne(com.querydsl.core.types.Predicate predicate) getProperties(User user) getUserByEmail(String email) getUserByEmail(String email, UserDirectory userDirectory) getUserById(long id) getUserByUsername(String username) getUserByUsername(String username, UserDirectory userDirectory) getUsers()getUsersWithPropertyValue(String propertyName, Object propertyValue) voidsaveProperties(UserProperties userProperties)
-
Constructor Details
-
UserServiceImpl
public UserServiceImpl()
-
-
Method Details
-
getUsers
- Specified by:
getUsersin interfaceUserService
-
getUserById
@Cacheable(value="securityPrincipalCache", unless="true && (#result instanceof T(java.util.Optional) && #result.isPresent() ) || (not (#result instanceof T(java.util.Optional)) && #result != null)") public Optional<User> getUserById(long id) - Specified by:
getUserByIdin interfaceUserService
-
getUserByEmail
@Cacheable(value="userCache", key="(\'email:\' + #email).toLowerCase()", unless="true && (#result instanceof T(java.util.Optional) && #result.isPresent() ) || (not (#result instanceof T(java.util.Optional)) && #result != null)") public Optional<User> getUserByEmail(String email) - Specified by:
getUserByEmailin interfaceUserService
-
getUserByEmail
- Specified by:
getUserByEmailin interfaceUserService
-
getUserByUsername
- Specified by:
getUserByUsernamein interfaceUserService
-
getUserByUsername
@Cacheable(value="userCache", key="(\'username:\' + #username).toLowerCase()", unless="true && (#result instanceof T(java.util.Optional) && #result.isPresent() ) || (not (#result instanceof T(java.util.Optional)) && #result != null)") public Optional<User> getUserByUsername(String username) - Specified by:
getUserByUsernamein interfaceUserService
-
save
- Specified by:
savein interfaceUserService
-
delete
@Transactional("jpaTransactionManager") public void delete(long userId) - Specified by:
deletein interfaceUserService
-
deleteProperties
- Specified by:
deletePropertiesin interfaceUserService
-
deleteProperties
public void deleteProperties(long userId) - Specified by:
deletePropertiesin interfaceUserService
-
getProperties
- Specified by:
getPropertiesin interfaceUserService
-
saveProperties
- Specified by:
savePropertiesin interfaceUserService
-
getUsersWithPropertyValue
@Transactional(value="jpaTransactionManager", readOnly=true) public Collection<User> getUsersWithPropertyValue(String propertyName, Object propertyValue) - Specified by:
getUsersWithPropertyValuein interfaceUserService
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
findAllin interfaceUserService
-
findAll
public Iterable<User> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) - Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
findAllin interfaceUserService
-
findOne
- Specified by:
findOnein interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
findOnein interfaceUserService
-
findAll
public Collection<User> findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) - Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
findAllin interfaceUserService
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
findAllin interfaceUserService
-
findAll
public org.springframework.data.domain.Page<User> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable) - Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
findAllin interfaceUserService
-
count
public long count(com.querydsl.core.types.Predicate predicate) - Specified by:
countin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
countin interfaceUserService
-
exists
public boolean exists(com.querydsl.core.types.Predicate predicate) - Specified by:
existsin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>- Specified by:
existsin interfaceUserService
-
findBy
public <S extends User,R> R findBy(com.querydsl.core.types.Predicate predicate, Function<org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery<S>, R> queryFunction) - Specified by:
findByin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<User>
-