Class CredentialEntity

java.lang.Object
ai.nervemind.app.database.model.CredentialEntity

@Entity public class CredentialEntity extends Object
JPA Entity for Credentials. Credential data is stored encrypted.
  • Constructor Details

    • CredentialEntity

      protected CredentialEntity()
      Default constructor for JPA.
    • CredentialEntity

      public CredentialEntity(String name, ai.nervemind.common.enums.CredentialType type, String dataEncrypted)
      Creates a new CredentialEntity.
      Parameters:
      name - the display name of the credential
      type - the type of credential
      dataEncrypted - the encrypted credential data
  • Method Details

    • onCreate

      protected void onCreate()
      Pre-persist callback to set timestamps.
    • onUpdate

      protected void onUpdate()
      Pre-update callback to update timestamps.
    • getId

      public Long getId()
      Gets the credential ID.
      Returns:
      the credential ID
    • setId

      public void setId(Long id)
      Sets the credential ID.
      Parameters:
      id - the credential ID to set
    • getName

      public String getName()
      Gets the credential name.
      Returns:
      the credential name
    • setName

      public void setName(String name)
      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

      public String getDataEncrypted()
      Gets the encrypted credential data.
      Returns:
      the encrypted credential data
    • setDataEncrypted

      public void setDataEncrypted(String dataEncrypted)
      Sets the encrypted credential data.
      Parameters:
      dataEncrypted - the encrypted credential data to set
    • getCreatedAt

      public Instant getCreatedAt()
      Gets the creation timestamp.
      Returns:
      the creation timestamp
    • setCreatedAt

      public void setCreatedAt(Instant createdAt)
      Sets the creation timestamp.
      Parameters:
      createdAt - the creation timestamp to set
    • getUpdatedAt

      public Instant getUpdatedAt()
      Gets the last update timestamp.
      Returns:
      the last update timestamp
    • setUpdatedAt

      public void setUpdatedAt(Instant updatedAt)
      Sets the last update timestamp.
      Parameters:
      updatedAt - the last update timestamp to set