Class GroupServiceImpl
java.lang.Object
com.foreach.across.modules.user.services.GroupServiceImpl
- All Implemented Interfaces:
GroupService,org.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
- Author:
- Arne Vandamme
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcount(com.querydsl.core.types.Predicate predicate) voiddelete(long groupId) voiddeleteProperties(long groupId) voiddeleteProperties(Group group) 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<Group>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 Group,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) getGroupById(long id) getGroupByName(String name) Get the group with a given name in the default directory.getGroupByName(String name, UserDirectory directory) Get the group with a given name in the specified directory.getGroupsWithPropertyValue(String propertyName, Object propertyValue) Returns all groups having a specific property value.getProperties(Group group) voidsaveProperties(GroupProperties groupProperties)
-
Constructor Details
-
GroupServiceImpl
public GroupServiceImpl()
-
-
Method Details
-
getGroups
- Specified by:
getGroupsin interfaceGroupService
-
getGroupById
@Cacheable(value="securityPrincipalCache", unless="true && (#result instanceof T(java.util.Optional) && #result.isPresent() ) || (not (#result instanceof T(java.util.Optional)) && #result != null)") public Optional<Group> getGroupById(long id) - Specified by:
getGroupByIdin interfaceGroupService
-
getGroupByName
@Cacheable(value="groupCache", unless="true && (#result instanceof T(java.util.Optional) && #result.isPresent() ) || (not (#result instanceof T(java.util.Optional)) && #result != null)") public Optional<Group> getGroupByName(String name) Description copied from interface:GroupServiceGet the group with a given name in the default directory.- Specified by:
getGroupByNamein interfaceGroupService- Parameters:
name- of the group- Returns:
- instance or
nullif not found
-
getGroupByName
@Cacheable(value="groupCache", key="#p0 + \':\' + #p1.id", unless="true && (#result instanceof T(java.util.Optional) && #result.isPresent() ) || (not (#result instanceof T(java.util.Optional)) && #result != null)") public Optional<Group> getGroupByName(String name, UserDirectory directory) Description copied from interface:GroupServiceGet the group with a given name in the specified directory.- Specified by:
getGroupByNamein interfaceGroupService- Parameters:
name- of the groupdirectory- the group should belong to- Returns:
- instance or
nullif not found
-
save
- Specified by:
savein interfaceGroupService
-
delete
@Transactional("jpaTransactionManager") public void delete(long groupId) - Specified by:
deletein interfaceGroupService
-
getProperties
- Specified by:
getPropertiesin interfaceGroupService
-
saveProperties
- Specified by:
savePropertiesin interfaceGroupService
-
deleteProperties
- Specified by:
deletePropertiesin interfaceGroupService
-
deleteProperties
public void deleteProperties(long groupId) - Specified by:
deletePropertiesin interfaceGroupService
-
getGroupsWithPropertyValue
@Transactional(readOnly=true, value="jpaTransactionManager") public Collection<Group> getGroupsWithPropertyValue(String propertyName, Object propertyValue) Description copied from interface:GroupServiceReturns all groups having a specific property value. Will return all matching groups across all user directories.- Specified by:
getGroupsWithPropertyValuein interfaceGroupService- Parameters:
propertyName- name of the propertypropertyValue- value the property should have- Returns:
- groups
-
findAll
- Specified by:
findAllin interfaceGroupService- Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-
findAll
public Iterable<Group> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Sort sort) - Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-
findAll
public Collection<Group> findAll(com.querydsl.core.types.Predicate predicate, com.querydsl.core.types.OrderSpecifier<?>... orderSpecifiers) - Specified by:
findAllin interfaceGroupService- Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-
findAll
- Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-
findAll
public org.springframework.data.domain.Page<Group> findAll(com.querydsl.core.types.Predicate predicate, org.springframework.data.domain.Pageable pageable) - Specified by:
findAllin interfaceGroupService- Specified by:
findAllin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-
count
public long count(com.querydsl.core.types.Predicate predicate) - Specified by:
countin interfaceGroupService- Specified by:
countin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-
exists
public boolean exists(com.querydsl.core.types.Predicate predicate) - Specified by:
existsin interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-
findBy
public <S extends Group,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<Group>
-
findOne
- Specified by:
findOnein interfaceGroupService- Specified by:
findOnein interfaceorg.springframework.data.querydsl.QuerydslPredicateExecutor<Group>
-