Package org.openiam.esb.repository
Interface DeviceRepository
-
- All Superinterfaces:
AbstractEntityRepository<DeviceEntity,String>,AbstractKeyEntityCustomRepository<DeviceEntity,String>,AbstractKeyEntityRepository<DeviceEntity,String>,org.springframework.data.repository.CrudRepository<DeviceEntity,String>,DeviceRepositoryCustom,org.springframework.data.jpa.repository.JpaRepository<DeviceEntity,String>,org.springframework.data.jpa.repository.JpaSpecificationExecutor<DeviceEntity>,org.springframework.data.repository.PagingAndSortingRepository<DeviceEntity,String>,org.springframework.data.repository.query.QueryByExampleExecutor<DeviceEntity>,org.springframework.data.repository.Repository<DeviceEntity,String>
@Repository public interface DeviceRepository extends AbstractKeyEntityRepository<DeviceEntity,String>, DeviceRepositoryCustom
This is repository for working with Device Entity
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountDeviceEntitiesByActiveTrueAndUserId(String userId)intdeleteDeviceEntityByUserId(String userId)List<DeviceEntity>getDeviceEntitiesByActiveTrueAndUserId(String userId)method is used to retrieve all active user devicesDeviceEntitygetDeviceEntitiesByTokenHash(String token)method is used to retrieve device by given token. token must be hashed. search is working with hashed data.DeviceEntitygetDeviceEntitiesByTokenHashAndUserId(String token, String userId)List<DeviceEntity>getDeviceEntitiesByUserId(String userId)method is used to retrieve all user devicesDeviceEntitygetDeviceEntitiesByUserIdAndRegistrationToken(String userId, String registrationToken)-
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.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
-
-
-
-
Method Detail
-
getDeviceEntitiesByUserId
List<DeviceEntity> getDeviceEntitiesByUserId(String userId)
method is used to retrieve all user devices- Parameters:
userId- - target user id- Returns:
- null if userId is null otherwize return the
ListofDeviceEntitylinked with given user id
-
getDeviceEntitiesByActiveTrueAndUserId
List<DeviceEntity> getDeviceEntitiesByActiveTrueAndUserId(String userId)
method is used to retrieve all active user devices- Parameters:
userId- - target user id- Returns:
- null if userId is null otherwize return the
ListofDeviceEntitythat has active flag quals 'true' and linked with given user id
-
countDeviceEntitiesByActiveTrueAndUserId
int countDeviceEntitiesByActiveTrueAndUserId(String userId)
-
getDeviceEntitiesByTokenHash
DeviceEntity getDeviceEntitiesByTokenHash(String token)
method is used to retrieve device by given token. token must be hashed. search is working with hashed data.- Parameters:
token- device token hash- Returns:
- device for given token, null if there is no such device
-
getDeviceEntitiesByTokenHashAndUserId
DeviceEntity getDeviceEntitiesByTokenHashAndUserId(String token, String userId)
-
getDeviceEntitiesByUserIdAndRegistrationToken
DeviceEntity getDeviceEntitiesByUserIdAndRegistrationToken(String userId, String registrationToken)
-
deleteDeviceEntityByUserId
int deleteDeviceEntityByUserId(String userId)
-
-