Interface DeviceRepository

    • 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 List of DeviceEntity linked 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 List of DeviceEntity that 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)