Package com.skava.auth.repository
Interface GroupAttributeRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<GroupAttribute,
,Long> org.springframework.data.jpa.repository.JpaRepository<GroupAttribute,
,Long> org.springframework.data.repository.ListCrudRepository<GroupAttribute,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<GroupAttribute,
,Long> org.springframework.data.repository.PagingAndSortingRepository<GroupAttribute,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<GroupAttribute>
,org.springframework.data.repository.Repository<GroupAttribute,
Long>
public interface GroupAttributeRepository
extends org.springframework.data.jpa.repository.JpaRepository<GroupAttribute,Long>
Repository class to represent the data access layer of the `groupattribute` entity.
- Author:
- Infosys Equinox
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
GroupAttributeProjection interface. -
Method Summary
Modifier and TypeMethodDescriptionfindAllGroupAttributesByUserId
(Long userId) Service definition to find all group attributes by user id.findByPrivilegeIdAndAuthGroupId
(Long privilegeId, Long authGroupId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByPrivilegeIdAndAuthGroupId
-
findAllGroupAttributesByUserId
@Query(value="select p.id as privilegeid, ga.attributevalue as attributevalue, ga.authgroupid as groupId from groupattribute ga, privilege p, authgroup_userids ag_u where p.id = ga.privilegeid and ga.authgroupid = ag_u.authgroup_id and ag_u.userids = ?1", nativeQuery=true) List<GroupAttributeRepository.GroupAttributeProjection> findAllGroupAttributesByUserId(Long userId) Service definition to find all group attributes by user id.- Parameters:
userId
- long- Returns:
- GroupAttributeProjection
-