Package org.openiam.esb.repository
Interface OrganizationRepository
-
- All Superinterfaces:
AbstractEntitlementPolicyRepository<OrganizationEntity,String>
,AbstractEntityRepository<OrganizationEntity,String>
,AbstractKeyEntityCustomRepository<OrganizationEntity,String>
,AbstractKeyEntityRepository<OrganizationEntity,String>
,AbstractKeyNameEntityCustomRepository<OrganizationEntity,String>
,AbstractKeyNameEntityRepository<OrganizationEntity,String>
,AbstractMetadataTypeRepository<OrganizationEntity,String>
,org.springframework.data.repository.CrudRepository<OrganizationEntity,String>
,EvictableCustomRepository<OrganizationEntity>
,FindBeansRepositoryCustom<OrganizationEntity,OrganizationSearchBean>
,IDetacheableEntityRepository<OrganizationEntity,String>
,org.springframework.data.jpa.repository.JpaRepository<OrganizationEntity,String>
,org.springframework.data.jpa.repository.JpaSpecificationExecutor<OrganizationEntity>
,OrganizationRepositoryCustom
,org.springframework.data.repository.PagingAndSortingRepository<OrganizationEntity,String>
,org.springframework.data.repository.query.QueryByExampleExecutor<OrganizationEntity>
,org.springframework.data.repository.Repository<OrganizationEntity,String>
@Repository public interface OrganizationRepository extends AbstractEntitlementPolicyRepository<OrganizationEntity,String>, OrganizationRepositoryCustom, IDetacheableEntityRepository<OrganizationEntity,String>
This is repository for working with OrganizationEntity- Author:
- zaporozhec
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>
collectPolicyIdsByOrgIds(Collection<String> ids)
List<OrganizationEntity>
findByOrganizationTypeIdIn(Collection<String> ids)
org.springframework.data.domain.Page<OrganizationEntity>
getDetachedForUser(String userId, String name, org.springframework.data.domain.Pageable page)
method is used to detect all user's organizations that are not linked with any resources.-
Methods inherited from interface org.openiam.esb.repository.AbstractEntityRepository
getPageable
-
Methods inherited from interface org.openiam.esb.repository.custom.AbstractKeyEntityCustomRepository
findByIdIn
-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
-
Methods inherited from interface org.openiam.esb.repository.custom.EvictableCustomRepository
evict, evict, evict
-
Methods inherited from interface org.openiam.esb.repository.custom.FindBeansRepositoryCustom
count, find, find, find, getByExample, getByExample, isValidSearchBean
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, exists, findAll, findAll, findAll, findOne
-
Methods inherited from interface org.openiam.esb.repository.custom.OrganizationRepositoryCustom
findForSynchronizationRequest
-
-
-
-
Method Detail
-
findByOrganizationTypeIdIn
@Query("SELECT x FROM OrganizationEntity x WHERE x.organizationType.id IN(:ids)") List<OrganizationEntity> findByOrganizationTypeIdIn(@Param("ids") Collection<String> ids)
-
getDetachedForUser
@Query("SELECT m FROM OrganizationEntity m JOIN m.users u WHERE lower(m.name) LIKE lower(concat(\'%\', :name,\'%\')) AND u.memberEntity.id=:userId AND m.resources is empty order by m.name") org.springframework.data.domain.Page<OrganizationEntity> getDetachedForUser(@Param("userId") String userId, @Param("name") String name, org.springframework.data.domain.Pageable page)
method is used to detect all user's organizations that are not linked with any resources.- Specified by:
getDetachedForUser
in interfaceIDetacheableEntityRepository<OrganizationEntity,String>
- Parameters:
userId
- - id of User to check detached organizationsname
- - name for case INSENSITIVE CONTAINS match search.page
- -Pageable
for paging- Returns:
- -
with results;
-
collectPolicyIdsByOrgIds
@Query("SELECT o.policy.id FROM OrganizationEntity o WHERE o.id IN :ids") Set<String> collectPolicyIdsByOrgIds(@Param("ids") Collection<String> ids)
-
-