Class PromptConnectionEntity
java.lang.Object
de.xima.fc.prompt.ms.impl.dao.entities.PromptConnectionEntity
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 -
Method Summary
Modifier and TypeMethodDescriptionlongGets 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.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.getId()Gets the unique database ID of this prompt connection.intGets the locking version for optimistic locking.getName()getType()Gets the type of this prompt connection, i.e. the type of the prompt service provider that implements the connection and query logic.getUuid()Gets the UUID of this prompt connection.voidsetAssignee(long assignee) Sets the ID of the assignee who owns this prompt connection, i.e. a tenant or project.voidsetAssigneeKind(String assigneeKind) Sets the kind of the assignee who owns this prompt connection, i.e. a tenant or project.voidsetCustomProperties(Map<String, String> customProperties) Sets the custom plain text properties of this prompt connection.voidsetCustomPropertiesModel(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.voidsetDescription(String description) Sets the internal description of this prompt connection, visible only to backend users.voidSets the unique database ID of this prompt connection.voidsetLockingVersion(int lockingVersion) Sets the locking version for optimistic locking.voidSets the technical name of this prompt connection.voidSets the type of this prompt connection, i.e. the type of the prompt service provider that implements the connection and query logic.voidSets the UUID of this prompt connection.toString()
-
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
Gets the kind of the assignee who owns this prompt connection, i.e. a tenant or project.- Returns:
- The kind of the assignee.
-
setAssigneeKind
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
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. UsegetCustomPropertiesModel()to get the raw JSON data.- Returns:
- The custom properties map.
-
setCustomProperties
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. UsegetCustomPropertiesModel()to get the raw JSON data.- Parameters:
customProperties- The new custom properties map to set.
-
getCustomPropertiesModel
-
setCustomPropertiesModel
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
Gets the internal description of this prompt connection, visible only to backend users.- Returns:
- The description.
-
setDescription
Sets the internal description of this prompt connection, visible only to backend users.- Parameters:
description- The new description to set.
-
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
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
-
setName
Sets the technical name of this prompt connection.- Parameters:
name- The new technical name to set.
-
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
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
Gets the UUID of this prompt connection. The UUID is unique within the tenant.- Returns:
- The UUID.
-
setUuid
Sets the UUID of this prompt connection. The UUID is unique within the tenant.- Parameters:
uuid- The new UUID.
-
toString
-