MemoryStoreEntityRepository
public interface MemoryStoreEntityRepository extends JpaRepository<MemoryStoreEntity, Long>
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryStoreEntityRepository.java:23–30定义记忆存储 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<MemoryStoreEntity, Long>。核心成员包括 findByStoreId、findByOwnerIdOrderByCreatedAtAsc、existsByOwnerIdAndName。
Spring Data repository for MemoryStoreEntity.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Optional<MemoryStoreEntity> findByStoreId(String storeId) | 查找通过存储标识。 Finds the by store id. |
public List<MemoryStoreEntity> findByOwnerIdOrderByCreatedAtAsc(String ownerId) | 查找 `findByOwnerIdOrderByCreatedAtAsc`。 Finds the by owner id order by created at asc. |
public boolean existsByOwnerIdAndName(String ownerId, String name) | 执行 `existsByOwnerIdAndName` 方法。 Performs the exists by owner id and name operation. |
方法详情Method Detail
findByStoreId
public Optional<MemoryStoreEntity> findByStoreId(String storeId)
查找通过存储标识。
Finds the by store id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
storeId | String | 存储标识(类型 `String`)。The store id. |
Optional<MemoryStoreEntity>返回可选。Returns optional.
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryStoreEntityRepository.java:25findByOwnerIdOrderByCreatedAtAsc
public List<MemoryStoreEntity> findByOwnerIdOrderByCreatedAtAsc(String ownerId)
查找 findByOwnerIdOrderByCreatedAtAsc。
Finds the by owner id order by created at asc.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
List<MemoryStoreEntity>返回列出。Returns list.
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryStoreEntityRepository.java:27existsByOwnerIdAndName
public boolean existsByOwnerIdAndName(String ownerId, String name)
执行 existsByOwnerIdAndName 方法。
Performs the exists by owner id and name operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
name | String | 名称(类型 `String`)。The name. |
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryStoreEntityRepository.java:29