Class CredentialEntity
java.lang.Object
ai.nervemind.app.database.model.CredentialEntity
JPA Entity for Credentials.
Credential data is stored encrypted.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for JPA.CredentialEntity(String name, ai.nervemind.common.enums.CredentialType type, String dataEncrypted) Creates a new CredentialEntity. -
Method Summary
Modifier and TypeMethodDescriptionGets the creation timestamp.Gets the encrypted credential data.getId()Gets the credential ID.getName()Gets the credential name.ai.nervemind.common.enums.CredentialTypegetType()Gets the credential type.Gets the last update timestamp.protected voidonCreate()Pre-persist callback to set timestamps.protected voidonUpdate()Pre-update callback to update timestamps.voidsetCreatedAt(Instant createdAt) Sets the creation timestamp.voidsetDataEncrypted(String dataEncrypted) Sets the encrypted credential data.voidSets the credential ID.voidSets the credential name.voidsetType(ai.nervemind.common.enums.CredentialType type) Sets the credential type.voidsetUpdatedAt(Instant updatedAt) Sets the last update timestamp.
-
Constructor Details
-
CredentialEntity
protected CredentialEntity()Default constructor for JPA. -
CredentialEntity
-
-
Method Details
-
onCreate
protected void onCreate()Pre-persist callback to set timestamps. -
onUpdate
protected void onUpdate()Pre-update callback to update timestamps. -
getId
-
setId
-
getName
-
setName
Sets the credential name.- Parameters:
name- the credential name to set
-
getType
public ai.nervemind.common.enums.CredentialType getType()Gets the credential type.- Returns:
- the credential type
-
setType
public void setType(ai.nervemind.common.enums.CredentialType type) Sets the credential type.- Parameters:
type- the credential type to set
-
getDataEncrypted
Gets the encrypted credential data.- Returns:
- the encrypted credential data
-
setDataEncrypted
Sets the encrypted credential data.- Parameters:
dataEncrypted- the encrypted credential data to set
-
getCreatedAt
-
setCreatedAt
Sets the creation timestamp.- Parameters:
createdAt- the creation timestamp to set
-
getUpdatedAt
-
setUpdatedAt
Sets the last update timestamp.- Parameters:
updatedAt- the last update timestamp to set
-