AS AgentScopeAPI 手册 / API Reference

AgentShareEntity

@Entity @Table( name = "builder_agent_share", indexes = {@Index(name = "ix_agent_share_grantee", columnList = "grantee_type,grantee_id")}) public class AgentShareEntity
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:37–138

智能体 Share Entity,在多次调用之间保存和恢复会话与记忆数据。位于 io.agentscope.builder.web.persistence.jpa 包。核心成员包括 getId、getAgent、setAgent、getGranteeType、setGranteeType、getGranteeId。

Persistent representation of one io.agentscope.builder.web.share.AgentShareGrant.

Owned by an AgentEntity via a @ManyToOne relationship with a hard foreign key. orphanRemoval=true on the owning side ensures that removing a grant from the agent's collection deletes the row.

构造器摘要Constructor Summary

构造器Constructor说明Description
public AgentShareEntity()
初始化 `AgentShareEntity` 实例。
Creates a new instance.
public AgentShareEntity(AgentEntity agent, String granteeType, String granteeId, String tier, long createdAt, String createdBy)
初始化 `AgentShareEntity` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Long getId()
获取标识。
Returns the id.
public AgentEntity getAgent()
获取智能体。
Returns the agent.
public void setAgent(AgentEntity agent)
设置智能体。
Sets the agent.
public String getGranteeType()
获取 `getGranteeType`。
Returns the grantee type.
public void setGranteeType(String granteeType)
设置 `setGranteeType`。
Sets the grantee type.
public String getGranteeId()
获取 `getGranteeId`。
Returns the grantee id.
public void setGranteeId(String granteeId)
设置 `setGranteeId`。
Sets the grantee id.
public String getTier()
获取 `getTier`。
Returns the tier.
public void setTier(String tier)
设置 `setTier`。
Sets the tier.
public long getCreatedAt()
获取已创建 At。
Returns the created at.
public void setCreatedAt(long createdAt)
设置已创建 At。
Sets the created at.
public String getCreatedBy()
获取已创建通过。
Returns the created by.
public void setCreatedBy(String createdBy)
设置已创建通过。
Sets the created by.

构造器详情Constructor Detail

AgentShareEntity

public AgentShareEntity()

初始化 AgentShareEntity 实例。

Creates a new instance.

源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:70

AgentShareEntity

public AgentShareEntity(AgentEntity agent, String granteeType, String granteeId, String tier, long createdAt, String createdBy)

初始化 AgentShareEntity 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
agentAgentEntity智能体(类型 `AgentEntity`)。The agent.
granteeTypeStringgrantee 类型(类型 `String`)。The grantee type.
granteeIdStringgrantee 标识(类型 `String`)。The grantee id.
tierStringtier(类型 `String`)。The tier.
createdAtlong已创建 At(类型 `long`)。The created at.
createdByString已创建通过(类型 `String`)。The created by.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:72–85

方法详情Method Detail

getId

public Long getId()

获取标识。

Returns the id.

返回Returns Long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:87–89

getAgent

public AgentEntity getAgent()

获取智能体。

Returns the agent.

返回Returns AgentEntity
返回AgentEntity。Returns agent entity.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:91–93

setAgent

public void setAgent(AgentEntity agent)

设置智能体。

Sets the agent.

参数Parameters
名称Name类型Type说明Description
agentAgentEntity智能体(类型 `AgentEntity`)。The agent.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:95–97

getGranteeType

public String getGranteeType()

获取 getGranteeType。

Returns the grantee type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:99–101

setGranteeType

public void setGranteeType(String granteeType)

设置 setGranteeType。

Sets the grantee type.

参数Parameters
名称Name类型Type说明Description
granteeTypeStringgrantee 类型(类型 `String`)。The grantee type.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:103–105

getGranteeId

public String getGranteeId()

获取 getGranteeId。

Returns the grantee id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:107–109

setGranteeId

public void setGranteeId(String granteeId)

设置 setGranteeId。

Sets the grantee id.

参数Parameters
名称Name类型Type说明Description
granteeIdStringgrantee 标识(类型 `String`)。The grantee id.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:111–113

getTier

public String getTier()

获取 getTier。

Returns the tier.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:115–117

setTier

public void setTier(String tier)

设置 setTier。

Sets the tier.

参数Parameters
名称Name类型Type说明Description
tierStringtier(类型 `String`)。The tier.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:119–121

getCreatedAt

public long getCreatedAt()

获取已创建 At。

Returns the created at.

返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:123–125

setCreatedAt

public void setCreatedAt(long createdAt)

设置已创建 At。

Sets the created at.

参数Parameters
名称Name类型Type说明Description
createdAtlong已创建 At(类型 `long`)。The created at.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:127–129

getCreatedBy

public String getCreatedBy()

获取已创建通过。

Returns the created by.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:131–133

setCreatedBy

public void setCreatedBy(String createdBy)

设置已创建通过。

Sets the created by.

参数Parameters
名称Name类型Type说明Description
createdByString已创建通过(类型 `String`)。The created by.
源码Source io/agentscope/builder/web/persistence/jpa/AgentShareEntity.java:135–137
基于官方固定版本源码静态生成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.