MemoryEntityRepository
public interface MemoryEntityRepository extends JpaRepository<MemoryEntity, Long>
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryEntityRepository.java:23–32定义记忆 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<MemoryEntity, Long>。核心成员包括 findByStoreIdOrderByPathAsc、findByStoreIdAndPath、findByMemoryId、deleteByStoreId。
Spring Data repository for MemoryEntity.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public List<MemoryEntity> findByStoreIdOrderByPathAsc(String storeId) | 查找 `findByStoreIdOrderByPathAsc`。 Finds the by store id order by path asc. |
public Optional<MemoryEntity> findByStoreIdAndPath(String storeId, String path) | 查找通过存储标识和路径。 Finds the by store id and path. |
public Optional<MemoryEntity> findByMemoryId(String memoryId) | 查找通过记忆标识。 Finds the by memory id. |
public void deleteByStoreId(String storeId) | 删除通过存储标识。 Deletes the by store id. |
方法详情Method Detail
findByStoreIdOrderByPathAsc
public List<MemoryEntity> findByStoreIdOrderByPathAsc(String storeId)
查找 findByStoreIdOrderByPathAsc。
Finds the by store id order by path asc.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
storeId | String | 存储标识(类型 `String`)。The store id. |
List<MemoryEntity>返回列出。Returns list.
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryEntityRepository.java:25findByStoreIdAndPath
public Optional<MemoryEntity> findByStoreIdAndPath(String storeId, String path)
查找通过存储标识和路径。
Finds the by store id and path.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
storeId | String | 存储标识(类型 `String`)。The store id. |
path | String | 路径(类型 `String`)。The path. |
Optional<MemoryEntity>返回可选。Returns optional.
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryEntityRepository.java:27findByMemoryId
public Optional<MemoryEntity> findByMemoryId(String memoryId)
查找通过记忆标识。
Finds the by memory id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
memoryId | String | 记忆标识(类型 `String`)。The memory id. |
Optional<MemoryEntity>返回可选。Returns optional.
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryEntityRepository.java:29deleteByStoreId
public void deleteByStoreId(String storeId)
删除通过存储标识。
Deletes the by store id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
storeId | String | 存储标识(类型 `String`)。The store id. |
源码Source
io/agentscope/builder/web/persistence/jpa/MemoryEntityRepository.java:31