Interface UserAttributeRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<UserAttribute,Long>, org.springframework.data.jpa.repository.JpaRepository<UserAttribute,Long>, org.springframework.data.repository.ListCrudRepository<UserAttribute,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<UserAttribute,Long>, org.springframework.data.repository.PagingAndSortingRepository<UserAttribute,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<UserAttribute>, org.springframework.data.repository.Repository<UserAttribute,Long>

public interface UserAttributeRepository extends org.springframework.data.jpa.repository.JpaRepository<UserAttribute,Long>
Repository class to represent the data access layer of the `userattribute` entity.
Author:
Infosys Equinox
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Service definition to find all user attributes by user id.
    findByPrivilegeIdAndUserId(Long privilegeId, Long userid)
    Service definition to find user attribute by privilege and user id.

    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

    • findByPrivilegeIdAndUserId

      Optional<UserAttribute> findByPrivilegeIdAndUserId(Long privilegeId, Long userid)
      Service definition to find user attribute by privilege and user id.
      Parameters:
      privilegeId - long privilege identifier
      userid - long user identifier
      Returns:
      UserAttribute
    • findAllUserAttributesByUserId

      @Query(value="select p.id as privilegeid, ua.attributevalue as attributevalue from userattribute ua, privilege p where p.id = ua.privilegeid and ua.userid = ?1", nativeQuery=true) List<UserAttributeRepository.UserAttributeProjection> findAllUserAttributesByUserId(Long userId)
      Service definition to find all user attributes by user id.
      Parameters:
      userId - long user identifier
      Returns:
      UserAttribute