Package de.presti.ree6.utils.data
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.github.philippheuer.credentialmanager.domain.Credential>getCredentialByUserId(String userId) Gets a Credential by UserIdList<com.github.philippheuer.credentialmanager.domain.Credential>Load the CredentialsvoidsaveCredentials(List<com.github.philippheuer.credentialmanager.domain.Credential> list) Save the Credentials
-
Constructor Details
-
DatabaseStorageBackend
public DatabaseStorageBackend()
-
-
Method Details
-
loadCredentials
Load the Credentials- Specified by:
loadCredentialsin interfacecom.github.philippheuer.credentialmanager.api.IStorageBackend- Returns:
- List Credential
-
saveCredentials
Save the Credentials- Specified by:
saveCredentialsin interfacecom.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:
getCredentialByUserIdin interfacecom.github.philippheuer.credentialmanager.api.IStorageBackend- Parameters:
userId- User Id- Returns:
- Credential
-