ObjectKey

data class ObjectKey(val address: Any, val version: Optional<Any?> = Optional.Absent, val rootVersion: Optional<Any?> = Optional.Absent, val atCheckpoint: Optional<Any?> = Optional.Absent)

Identifies a specific version of an object.

The address field must be specified, as well as at most one of version, rootVersion, or atCheckpoint. If none are provided, the object is fetched at the current checkpoint.

Specifying a version or a rootVersion disables nested queries for paginating owned objects or dynamic fields (these queries are only supported at checkpoint boundaries).

See Query.object for more details.

Parameters

address

The object's ID.

version

If specified, tries to fetch the object at this exact version.

rootVersion

If specified, tries to fetch the latest version of the object at or before this version. Nested dynamic field accesses will also be subject to this bound.

This can be used to fetch a child or ancestor object bounded by its root object's version. For any wrapped or child (object-owned) object, its root object can be defined recursively as:

  • The root object of the object it is wrapped in, if it is wrapped.

  • The root object of its owner, if it is owned by another object.

  • The object itself, if it is not object-owned or wrapped.

atCheckpoint

If specified, tries to fetch the latest version as of this checkpoint. Fails if the checkpoint is later than the RPC's latest checkpoint.

Constructors

Link copied to clipboard
constructor(address: Any, version: Optional<Any?> = Optional.Absent, rootVersion: Optional<Any?> = Optional.Absent, atCheckpoint: Optional<Any?> = Optional.Absent)

Properties

Link copied to clipboard

The object's ID.

Link copied to clipboard
val atCheckpoint: Optional<Any?>

If specified, tries to fetch the latest version as of this checkpoint. Fails if the checkpoint is later than the RPC's latest checkpoint.

Link copied to clipboard
val rootVersion: Optional<Any?>

If specified, tries to fetch the latest version of the object at or before this version. Nested dynamic field accesses will also be subject to this bound.

Link copied to clipboard
val version: Optional<Any?>

If specified, tries to fetch the object at this exact version.