AgentEntityRepository
public interface AgentEntityRepository extends JpaRepository<AgentEntity, Long>
源码Source
io/agentscope/builder/web/persistence/jpa/AgentEntityRepository.java:23–30定义智能体 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<AgentEntity, Long>。核心成员包括 findByOwnerIdOrderByCreatedAtAsc、findByOwnerIdAndAgentId。
Spring Data repository for AgentEntity.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public List<AgentEntity> findByOwnerIdOrderByCreatedAtAsc(String ownerId) | 查找 `findByOwnerIdOrderByCreatedAtAsc`。 All agent definitions owned by `ownerId`, oldest first. |
public Optional<AgentEntity> findByOwnerIdAndAgentId(String ownerId, String agentId) | 查找通过所有者标识和智能体标识。 Single definition lookup by the `(ownerId, agentId)` pair. |
方法详情Method Detail
findByOwnerIdOrderByCreatedAtAsc
public List<AgentEntity> findByOwnerIdOrderByCreatedAtAsc(String ownerId)
查找 findByOwnerIdOrderByCreatedAtAsc。
All agent definitions owned by ownerId, oldest first.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
List<AgentEntity>返回列出。Returns list.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentEntityRepository.java:26findByOwnerIdAndAgentId
public Optional<AgentEntity> findByOwnerIdAndAgentId(String ownerId, String agentId)
查找通过所有者标识和智能体标识。
Single definition lookup by the (ownerId, agentId) pair.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
Optional<AgentEntity>返回可选。Returns optional.
源码Source
io/agentscope/builder/web/persistence/jpa/AgentEntityRepository.java:29