EnvironmentEntityRepository
public interface EnvironmentEntityRepository extends JpaRepository<EnvironmentEntity, Long>
源码Source
io/agentscope/builder/web/persistence/jpa/EnvironmentEntityRepository.java:23–32定义环境 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<EnvironmentEntity, Long>。核心成员包括 findByEnvironmentId、findByOwnerIdOrderByCreatedAtAsc、findByOwnerIdAndArchivedAtIsNullOrderByCreatedAtAsc、existsByOwnerIdAndName。
Spring Data repository for EnvironmentEntity.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Optional<EnvironmentEntity> findByEnvironmentId(String environmentId) | 查找通过环境标识。 Finds the by environment id. |
public List<EnvironmentEntity> findByOwnerIdOrderByCreatedAtAsc(String ownerId) | 查找 `findByOwnerIdOrderByCreatedAtAsc`。 Finds the by owner id order by created at asc. |
public List<EnvironmentEntity> findByOwnerIdAndArchivedAtIsNullOrderByCreatedAtAsc(String ownerId) | 查找 `findByOwnerIdAndArchivedAtIsNullOrderByCreatedAtAsc`。 Finds the by owner id and archived at is null order by created at asc. |
public boolean existsByOwnerIdAndName(String ownerId, String name) | 执行 `existsByOwnerIdAndName` 方法。 Performs the exists by owner id and name operation. |
方法详情Method Detail
findByEnvironmentId
public Optional<EnvironmentEntity> findByEnvironmentId(String environmentId)
查找通过环境标识。
Finds the by environment id.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
environmentId | String | 环境标识(类型 `String`)。The environment id. |
Optional<EnvironmentEntity>返回可选。Returns optional.
源码Source
io/agentscope/builder/web/persistence/jpa/EnvironmentEntityRepository.java:25findByOwnerIdOrderByCreatedAtAsc
public List<EnvironmentEntity> 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<EnvironmentEntity>返回列出。Returns list.
源码Source
io/agentscope/builder/web/persistence/jpa/EnvironmentEntityRepository.java:27findByOwnerIdAndArchivedAtIsNullOrderByCreatedAtAsc
public List<EnvironmentEntity> findByOwnerIdAndArchivedAtIsNullOrderByCreatedAtAsc(String ownerId)
查找 findByOwnerIdAndArchivedAtIsNullOrderByCreatedAtAsc。
Finds the by owner id and archived at is null order by created at asc.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
List<EnvironmentEntity>返回列出。Returns list.
源码Source
io/agentscope/builder/web/persistence/jpa/EnvironmentEntityRepository.java:29existsByOwnerIdAndName
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/EnvironmentEntityRepository.java:31