Interface TokenDataAccessProvider

All Superinterfaces:
DataAccessProvider

public interface TokenDataAccessProvider extends DataAccessProvider
  • Method Details

    • getByHash

      @Nullable @Nullable Token getByHash(String tokenHash)
      Retrieve the Token instance based on the provided token hash.
      Parameters:
      tokenHash - hash of the token value to look up status
      Returns:
      instantiated Token instance
    • getById

      @Deprecated(forRemoval=true, since="5.4.0") @Nullable default @Nullable Token getById(String tokenId)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 5.4.0
      Retrieve the Token instance based on the provided id.

      Note: not all Tokens have an id!

      Parameters:
      tokenId - id of the token to lookup
      Returns:
      instantiated Token instance
    • create

      void create(Token token)
      Create a new Token from the provided instance.
      Parameters:
      token - token to persist
    • getStatus

      @Nullable @Nullable String getStatus(String tokenHash)
      Retrieve the status of a token with the provided tokenHash.
      Parameters:
      tokenHash - hash of the token value to look up status
      Returns:
      token status, or empty when token was not found
    • setStatusByTokenHash

      long setStatusByTokenHash(String tokenHash, TokenStatus newStatus)
      Update status of token.
      Parameters:
      tokenHash - hash of the token value to look up status
      newStatus - new status of the token
      Returns:
      the number of records that were updated.
    • setStatus

      @Deprecated(forRemoval=true, since="7.1.0") long setStatus(String tokenId, TokenStatus newStatus)
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 7.1.0
      Update status of token.
      Parameters:
      tokenId - ID of the token to look up status
      newStatus - new status of the token
      Returns:
      the number of records that were updated.