AgentStateEntity
@Entity @Table( name = "builder_agent_state", uniqueConstraints = @UniqueConstraint( name = "uk_builder_agent_state_slot", columnNames = {"user_id", "session_id", "state_key"}), indexes = { @Index(name = "ix_builder_agent_state_user", columnList = "user_id"), @Index(name = "ix_builder_agent_state_user_session", columnList = "user_id,session_id") }) public class AgentStateEntity
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:34–127智能体状态 Entity,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.builder.web.persistence.jpa 包。核心成员包括 getRowId、setRowId、getUserId、setUserId、getSessionId、setSessionId。
One row of persisted io.agentscope.core.state.AgentStateStore data.
list_kind=false stores a single JSON object; list_kind=true stores a JSON
array (full list replacement).
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Long getRowId() | 获取 `getRowId`。 Returns the row id. |
public void setRowId(Long rowId) | 设置 `setRowId`。 Sets the row id. |
public String getUserId() | 获取用户标识。 Returns the user id. |
public void setUserId(String userId) | 设置用户标识。 Sets the user id. |
public String getSessionId() | 获取会话标识。 Returns the session id. |
public void setSessionId(String sessionId) | 设置会话标识。 Sets the session id. |
public String getStateKey() | 获取状态键。 Returns the state key. |
public void setStateKey(String stateKey) | 设置状态键。 Sets the state key. |
public boolean isListKind() | 判断是否列表种类。 Returns whether the list kind. |
public void setListKind(boolean listKind) | 设置列表种类。 Sets the list kind. |
public String getStateData() | 获取状态数据。 Returns the state data. |
public void setStateData(String stateData) | 设置状态数据。 Sets the state data. |
public long getUpdatedAt() | 获取已更新 At。 Returns the updated at. |
public void setUpdatedAt(long updatedAt) | 设置已更新 At。 Sets the updated at. |
方法详情Method Detail
getRowId
public Long getRowId()
获取 getRowId。
Returns the row id.
Long返回数值结果。Returns a numeric result.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:72–74setRowId
public void setRowId(Long rowId)
设置 setRowId。
Sets the row id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
rowId | Long | row 标识(类型 `Long`)。The row id. |
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:76–78getUserId
public String getUserId()
获取用户标识。
Returns the user id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:80–82setUserId
public void setUserId(String userId)
设置用户标识。
Sets the user id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
userId | String | 用户标识(类型 `String`)。The user id. |
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:84–86getSessionId
public String getSessionId()
获取会话标识。
Returns the session id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:88–90setSessionId
public void setSessionId(String sessionId)
设置会话标识。
Sets the session id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:92–94getStateKey
public String getStateKey()
获取状态键。
Returns the state key.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:96–98setStateKey
public void setStateKey(String stateKey)
设置状态键。
Sets the state key.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stateKey | String | 状态键(类型 `String`)。The state key. |
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:100–102isListKind
public boolean isListKind()
判断是否列表种类。
Returns whether the list kind.
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:104–106setListKind
public void setListKind(boolean listKind)
设置列表种类。
Sets the list kind.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
listKind | boolean | 列表种类(类型 `boolean`)。The list kind. |
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:108–110getStateData
public String getStateData()
获取状态数据。
Returns the state data.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:112–114setStateData
public void setStateData(String stateData)
设置状态数据。
Sets the state data.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stateData | String | 状态数据(类型 `String`)。The state data. |
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:116–118getUpdatedAt
public long getUpdatedAt()
获取已更新 At。
Returns the updated at.
long返回数值结果。Returns a numeric result.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:120–122setUpdatedAt
public void setUpdatedAt(long updatedAt)
设置已更新 At。
Sets the updated at.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
updatedAt | long | 已更新 At(类型 `long`)。The updated at. |
源码Source
io/agentscope/builder/web/persistence/jpa/AgentStateEntity.java:124–126