Class DatabaseStorageBackend

java.lang.Object
de.presti.ree6.utils.data.DatabaseStorageBackend
All Implemented Interfaces:
com.github.philippheuer.credentialmanager.api.IStorageBackend

public class DatabaseStorageBackend extends Object implements com.github.philippheuer.credentialmanager.api.IStorageBackend
The Storage backend to allow the Twitch4J CredentialManager to store the Data in our Database.
  • Constructor Details

    • DatabaseStorageBackend

      public DatabaseStorageBackend()
  • Method Details

    • loadCredentials

      public List<com.github.philippheuer.credentialmanager.domain.Credential> loadCredentials()
      Load the Credentials
      Specified by:
      loadCredentials in interface com.github.philippheuer.credentialmanager.api.IStorageBackend
      Returns:
      List Credential
    • saveCredentials

      public void saveCredentials(List<com.github.philippheuer.credentialmanager.domain.Credential> list)
      Save the Credentials
      Specified by:
      saveCredentials in interface com.github.philippheuer.credentialmanager.api.IStorageBackend
      Parameters:
      list - List Credential
    • getCredentialByUserId

      public Optional<com.github.philippheuer.credentialmanager.domain.Credential> getCredentialByUserId(String userId)
      Gets a Credential by UserId
      Specified by:
      getCredentialByUserId in interface com.github.philippheuer.credentialmanager.api.IStorageBackend
      Parameters:
      userId - User Id
      Returns:
      Credential