ManagedSessionEntityRepository
public interface ManagedSessionEntityRepository extends JpaRepository<ManagedSessionEntity, Long>
io/agentscope/builder/web/persistence/jpa/ManagedSessionEntityRepository.java:23–42定义托管会话 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<ManagedSessionEntity, Long>。核心成员包括 findBySessionId、findByOwnerIdOrderByCreatedAtDesc、findByOwnerIdAndAgentIdOrderByCreatedAtDesc、countByEnvironmentIdAndArchivedAtIsNull、findFirstByOwnerIdAndAgentIdAndExternalKeyAndArchivedAtIsNullOrderByCreatedAtDesc。
Spring Data repository for ManagedSessionEntity.
方法摘要Method Summary
方法详情Method Detail
findBySessionId
public Optional<ManagedSessionEntity> findBySessionId(String sessionId)
查找通过会话标识。
Finds the by session id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
Optional<ManagedSessionEntity>io/agentscope/builder/web/persistence/jpa/ManagedSessionEntityRepository.java:25findByOwnerIdOrderByCreatedAtDesc
public List<ManagedSessionEntity> findByOwnerIdOrderByCreatedAtDesc(String ownerId)
查找 findByOwnerIdOrderByCreatedAtDesc。
Finds the by owner id order by created at desc.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
List<ManagedSessionEntity>io/agentscope/builder/web/persistence/jpa/ManagedSessionEntityRepository.java:27findByOwnerIdAndAgentIdOrderByCreatedAtDesc
public List<ManagedSessionEntity> findByOwnerIdAndAgentIdOrderByCreatedAtDesc(String ownerId, String agentId)
查找 findByOwnerIdAndAgentIdOrderByCreatedAtDesc。
Finds the by owner id and agent id order by created at desc.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
List<ManagedSessionEntity>io/agentscope/builder/web/persistence/jpa/ManagedSessionEntityRepository.java:29–30countByEnvironmentIdAndArchivedAtIsNull
public long countByEnvironmentIdAndArchivedAtIsNull(String environmentId)
设置该参数。
Performs the count by environment id and archived at is null operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environmentId | String | 环境标识(类型 `String`)。The environment id. |
longio/agentscope/builder/web/persistence/jpa/ManagedSessionEntityRepository.java:32findFirstByOwnerIdAndAgentIdAndExternalKeyAndArchivedAtIsNullOrderByCreatedAtDesc
public Optional<ManagedSessionEntity> findFirstByOwnerIdAndAgentIdAndExternalKeyAndArchivedAtIsNullOrderByCreatedAtDesc(String ownerId, String agentId, String externalKey)
查找 findFirstByOwnerIdAndAgentIdAndExternalKeyAndArchivedAtIsNullOrderByCreatedAtDesc。
Finds the most recent non-archived session for a given owner/agent/external-key triple.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
externalKey | String | 外部键(类型 `String`)。The external key. |
Optional<ManagedSessionEntity>io/agentscope/builder/web/persistence/jpa/ManagedSessionEntityRepository.java:39–41