AS AgentScopeAPI 手册 / API Reference

ResourceShareEntityRepository

public interface ResourceShareEntityRepository extends JpaRepository<ResourceShareEntity, Long>
源码Source io/agentscope/builder/web/persistence/jpa/ResourceShareEntityRepository.java:23–34

定义资源 Share Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<ResourceShareEntity, Long>。核心成员包括 findByResourceTypeAndResourceId、findByShareId、findByResourceTypeAndResourceIdAndGranteeTypeAndGranteeId、deleteByShareId。

Spring Data repository for ResourceShareEntity.

方法摘要Method Summary

方法Method说明Description
public List<ResourceShareEntity> findByResourceTypeAndResourceId(String resourceType, String resourceId)
查找通过资源类型和资源标识。
Finds the by resource type and resource id.
public Optional<ResourceShareEntity> findByShareId(String shareId)
查找 `findByShareId`。
Finds the by share id.
public Optional<ResourceShareEntity> findByResourceTypeAndResourceIdAndGranteeTypeAndGranteeId(String resourceType, String resourceId, String granteeType, String granteeId)
查找 `findByResourceTypeAndResourceIdAndGranteeTypeAndGranteeId`。
Finds the by resource type and resource id and grantee type and grantee id.
public void deleteByShareId(String shareId)
删除 `deleteByShareId`。
Deletes the by share id.

方法详情Method Detail

findByResourceTypeAndResourceId

public List<ResourceShareEntity> findByResourceTypeAndResourceId(String resourceType, String resourceId)

查找通过资源类型和资源标识。

Finds the by resource type and resource id.

参数Parameters
名称Name类型Type说明Description
resourceTypeString资源类型(类型 `String`)。The resource type.
resourceIdString资源标识(类型 `String`)。The resource id.
返回Returns List<ResourceShareEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/ResourceShareEntityRepository.java:25–26

findByShareId

public Optional<ResourceShareEntity> findByShareId(String shareId)

查找 findByShareId。

Finds the by share id.

参数Parameters
名称Name类型Type说明Description
shareIdStringshare 标识(类型 `String`)。The share id.
返回Returns Optional<ResourceShareEntity>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/persistence/jpa/ResourceShareEntityRepository.java:28

findByResourceTypeAndResourceIdAndGranteeTypeAndGranteeId

public Optional<ResourceShareEntity> findByResourceTypeAndResourceIdAndGranteeTypeAndGranteeId(String resourceType, String resourceId, String granteeType, String granteeId)

查找 findByResourceTypeAndResourceIdAndGranteeTypeAndGranteeId。

Finds the by resource type and resource id and grantee type and grantee id.

参数Parameters
名称Name类型Type说明Description
resourceTypeString资源类型(类型 `String`)。The resource type.
resourceIdString资源标识(类型 `String`)。The resource id.
granteeTypeStringgrantee 类型(类型 `String`)。The grantee type.
granteeIdStringgrantee 标识(类型 `String`)。The grantee id.
返回Returns Optional<ResourceShareEntity>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/persistence/jpa/ResourceShareEntityRepository.java:30–31

deleteByShareId

public void deleteByShareId(String shareId)

删除 deleteByShareId。

Deletes the by share id.

参数Parameters
名称Name类型Type说明Description
shareIdStringshare 标识(类型 `String`)。The share id.
源码Source io/agentscope/builder/web/persistence/jpa/ResourceShareEntityRepository.java:33
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.