AS AgentScopeAPI 手册 / API Reference

SessionEventEntityRepository

public interface SessionEventEntityRepository extends JpaRepository<SessionEventEntity, Long>
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:26–58

定义会话事件 Entity 仓库契约的接口。位于 io.agentscope.builder.web.persistence.jpa 包,实现 JpaRepository<SessionEventEntity, Long>。核心成员包括 findBySessionIdOrderBySeqAsc、findBySessionIdAndSeqGreaterThanOrderBySeqAsc、findBySessionIdAndEventTypeInOrderBySeqAsc、findBySessionIdAndEventTypeInAndSeqGreaterThanOrderBySeqAsc、findByEventId、maxSeq。

Spring Data repository for SessionEventEntity.

方法摘要Method Summary

方法Method说明Description
public List<SessionEventEntity> findBySessionIdOrderBySeqAsc(String sessionId)
查找 `findBySessionIdOrderBySeqAsc`。
Finds the by session id order by seq asc.
public List<SessionEventEntity> findBySessionIdAndSeqGreaterThanOrderBySeqAsc(String sessionId, long afterSeq)
查找 `findBySessionIdAndSeqGreaterThanOrderBySeqAsc`。
Finds the by session id and seq greater than order by seq asc.
public List<SessionEventEntity> findBySessionIdAndEventTypeInOrderBySeqAsc(String sessionId, Collection<String> eventTypes)
查找 `findBySessionIdAndEventTypeInOrderBySeqAsc`。
Finds the by session id and event type in order by seq asc.
public List<SessionEventEntity> findBySessionIdAndEventTypeInAndSeqGreaterThanOrderBySeqAsc(String sessionId, Collection<String> eventTypes, long afterSeq)
查找 `findBySessionIdAndEventTypeInAndSeqGreaterThanOrderBySeqAsc`。
Finds the by session id and event type in and seq greater than order by seq asc.
public Optional<SessionEventEntity> findByEventId(String eventId)
查找通过事件标识。
Finds the by event id.
public long maxSeq(String sessionId)
设置该参数。
Performs the max seq operation.
public long countBySessionIdAndEventTypeIn(String sessionId, Collection<String> types)
执行数量通过会话标识和事件类型 In相关操作。
Performs the count by session id and event type in operation.
public long maxCreatedAt(String sessionId)
设置最大已创建 At。
Performs the max created at operation.
public boolean existsBySessionIdAndEventType(String sessionId, String eventType)
执行 `existsBySessionIdAndEventType` 方法。
Performs the exists by session id and event type operation.
public void deleteBySessionId(String sessionId)
删除通过会话标识。
Deletes the by session id.

方法详情Method Detail

findBySessionIdOrderBySeqAsc

public List<SessionEventEntity> findBySessionIdOrderBySeqAsc(String sessionId)

查找 findBySessionIdOrderBySeqAsc。

Finds the by session id order by seq asc.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
返回Returns List<SessionEventEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:28

findBySessionIdAndSeqGreaterThanOrderBySeqAsc

public List<SessionEventEntity> findBySessionIdAndSeqGreaterThanOrderBySeqAsc(String sessionId, long afterSeq)

查找 findBySessionIdAndSeqGreaterThanOrderBySeqAsc。

Finds the by session id and seq greater than order by seq asc.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
afterSeqlong之后 Seq(类型 `long`)。The after seq.
返回Returns List<SessionEventEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:30–31

findBySessionIdAndEventTypeInOrderBySeqAsc

public List<SessionEventEntity> findBySessionIdAndEventTypeInOrderBySeqAsc(String sessionId, Collection<String> eventTypes)

查找 findBySessionIdAndEventTypeInOrderBySeqAsc。

Finds the by session id and event type in order by seq asc.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
eventTypesCollection<String>事件类型(类型 `Collection`)。The event types.
返回Returns List<SessionEventEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:33–34

findBySessionIdAndEventTypeInAndSeqGreaterThanOrderBySeqAsc

public List<SessionEventEntity> findBySessionIdAndEventTypeInAndSeqGreaterThanOrderBySeqAsc(String sessionId, Collection<String> eventTypes, long afterSeq)

查找 findBySessionIdAndEventTypeInAndSeqGreaterThanOrderBySeqAsc。

Finds the by session id and event type in and seq greater than order by seq asc.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
eventTypesCollection<String>事件类型(类型 `Collection`)。The event types.
afterSeqlong之后 Seq(类型 `long`)。The after seq.
返回Returns List<SessionEventEntity>
返回列出。Returns list.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:36–37

findByEventId

public Optional<SessionEventEntity> findByEventId(String eventId)

查找通过事件标识。

Finds the by event id.

参数Parameters
名称Name类型Type说明Description
eventIdString事件标识(类型 `String`)。The event id.
返回Returns Optional<SessionEventEntity>
返回可选。Returns optional.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:39

maxSeq

public long maxSeq(String sessionId)

设置该参数。

Performs the max seq operation.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:41–42

countBySessionIdAndEventTypeIn

public long countBySessionIdAndEventTypeIn(String sessionId, Collection<String> types)

执行数量通过会话标识和事件类型 In相关操作。

Performs the count by session id and event type in operation.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
typesCollection<String>类型(类型 `Collection`)。The types.
返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:44–48

maxCreatedAt

public long maxCreatedAt(String sessionId)

设置最大已创建 At。

Performs the max created at operation.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
返回Returns long
返回数值结果。Returns a numeric result.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:50–53

existsBySessionIdAndEventType

public boolean existsBySessionIdAndEventType(String sessionId, String eventType)

执行 existsBySessionIdAndEventType 方法。

Performs the exists by session id and event type operation.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
eventTypeString事件类型(类型 `String`)。The event type.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:55

deleteBySessionId

public void deleteBySessionId(String sessionId)

删除通过会话标识。

Deletes the by session id.

参数Parameters
名称Name类型Type说明Description
sessionIdString会话标识(类型 `String`)。The session id.
源码Source io/agentscope/builder/web/persistence/jpa/SessionEventEntityRepository.java:57
基于官方固定版本源码静态生成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.