Class PromptConnectionEntity

java.lang.Object
de.xima.fc.prompt.ms.impl.dao.entities.PromptConnectionEntity

@Entity public class PromptConnectionEntity extends Object
JPA entity for a prompt connection configuration. A prompt connection defines how to connect to a prompt service provider, such as OpenAI or Anthropic. Usually contains a URL and authentication information such as an API key, and possibly other configuration parameters.

Since we wish to support various different prompt service providers with different configuration, this entity simply stores a type identifier and a map of custom properties. The actual interpretation of these properties is left to the prompt service provider implementations.

Since:
8.5.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Gets the ID of the assignee who owns this prompt connection, i.e. a tenant or project.
    Gets the kind of the assignee who owns this prompt connection, i.e. a tenant or project.
    Map<@Size(max=250) String, String>
    Sets the custom plain text properties of this prompt connection.
    Gets the parsed custom properties model of this prompt connection, as a multivalued map where each key can have multiple values.
    Gets the internal description of this prompt connection, visible only to backend users.
    Gets the unique database ID of this prompt connection.
    int
    Gets the locking version for optimistic locking.
     
    Gets the type of this prompt connection, i.e. the type of the prompt service provider that implements the connection and query logic.
    Gets the UUID of this prompt connection.
    void
    setAssignee(long assignee)
    Sets the ID of the assignee who owns this prompt connection, i.e. a tenant or project.
    void
    setAssigneeKind(String assigneeKind)
    Sets the kind of the assignee who owns this prompt connection, i.e. a tenant or project.
    void
    setCustomProperties(Map<String,String> customProperties)
    Sets the custom plain text properties of this prompt connection.
    void
    setCustomPropertiesModel(Map<String, List<String>> newCustomProperties)
    Sets the custom properties model of this prompt connection, which is a multivalued map where each key can have multiple values.
    void
    setDescription(String description)
    Sets the internal description of this prompt connection, visible only to backend users.
    void
    setId(Long id)
    Sets the unique database ID of this prompt connection.
    void
    setLockingVersion(int lockingVersion)
    Sets the locking version for optimistic locking.
    void
    Sets the technical name of this prompt connection.
    void
    Sets the type of this prompt connection, i.e. the type of the prompt service provider that implements the connection and query logic.
    void
    setUuid(UUID uuid)
    Sets the UUID of this prompt connection.
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PromptConnectionEntity

      public PromptConnectionEntity()
  • Method Details

    • getAssignee

      public long getAssignee()
      Gets the ID of the assignee who owns this prompt connection, i.e. a tenant or project. Null for the system scope.
      Returns:
      The ID of the assignee.
    • setAssignee

      public void setAssignee(long assignee)
      Sets the ID of the assignee who owns this prompt connection, i.e. a tenant or project. Null for the system scope.
      Parameters:
      assignee - The ID of the assignee.
    • getAssigneeKind

      public String getAssigneeKind()
      Gets the kind of the assignee who owns this prompt connection, i.e. a tenant or project.
      Returns:
      The kind of the assignee.
    • setAssigneeKind

      public void setAssigneeKind(String assigneeKind)
      Sets the kind of the assignee who owns this prompt connection, i.e. a tenant or project.
      Parameters:
      assigneeKind - The kind of the assignee.
    • getCustomProperties

      public Map<@Size(max=250) String, String> getCustomProperties()
      Sets the custom plain text properties of this prompt connection. These are stored as key-value pairs in the database. Implementations may deserialize these properties into a more complex structure. Use getCustomPropertiesModel() to get the raw JSON data.
      Returns:
      The custom properties map.
    • setCustomProperties

      public void setCustomProperties(Map<String,String> customProperties)
      Sets the custom plain text properties of this prompt connection. These are stored as key-value pairs in the database. Implementations may deserialize these properties into a more complex structure. Use getCustomPropertiesModel() to get the raw JSON data.
      Parameters:
      customProperties - The new custom properties map to set.
    • getCustomPropertiesModel

      public Map<String, List<String>> getCustomPropertiesModel()
      Gets the parsed custom properties model of this prompt connection, as a multivalued map where each key can have multiple values.
      Returns:
      The custom properties model as a JSON object map.
    • setCustomPropertiesModel

      public void setCustomPropertiesModel(Map<String, List<String>> newCustomProperties)
      Sets the custom properties model of this prompt connection, which is a multivalued map where each key can have multiple values. This will replace any existing custom properties.
      Parameters:
      newCustomProperties - The new custom properties model to set.
    • getDescription

      public String getDescription()
      Gets the internal description of this prompt connection, visible only to backend users.
      Returns:
      The description.
    • setDescription

      public void setDescription(String description)
      Sets the internal description of this prompt connection, visible only to backend users.
      Parameters:
      description - The new description to set.
    • getId

      public Long getId()
      Gets the unique database ID of this prompt connection. The database ID is unique within the system, across all tenants.
      Returns:
      The database ID of this prompt connection.
    • setId

      public void setId(Long id)
      Sets the unique database ID of this prompt connection. The database ID is unique within the system, across all tenants.
      Parameters:
      id - The database ID of this prompt connection.
    • getLockingVersion

      public int getLockingVersion()
      Gets the locking version for optimistic locking.
      Returns:
      The locking version.
    • setLockingVersion

      public void setLockingVersion(int lockingVersion)
      Sets the locking version for optimistic locking.
      Parameters:
      lockingVersion - The new locking version.
    • getName

      public String getName()
    • setName

      public void setName(String name)
      Sets the technical name of this prompt connection.
      Parameters:
      name - The new technical name to set.
    • getType

      public String getType()
      Gets the type of this prompt connection, i.e. the type of the prompt service provider that implements the connection and query logic. This is the technical type that must be unique amongst all prompt service providers.
      Returns:
      The type of the prompt connection, such as "de.xima.fc.plugin:prompt-service-plugin-openai".
    • setType

      public void setType(String type)
      Sets the type of this prompt connection, i.e. the type of the prompt service provider that implements the connection and query logic. This is the technical type that must be unique amongst all prompt service providers.
      Parameters:
      type - The new type of the prompt connection, such as "de.xima.fc.plugin:prompt-service-plugin-openai".
    • getUuid

      public UUID getUuid()
      Gets the UUID of this prompt connection. The UUID is unique within the tenant.
      Returns:
      The UUID.
    • setUuid

      public void setUuid(UUID uuid)
      Sets the UUID of this prompt connection. The UUID is unique within the tenant.
      Parameters:
      uuid - The new UUID.
    • toString

      public String toString()
      Overrides:
      toString in class Object