Class RelationshipBase<TProperties>Abstract

A base class for implementations of data/_Relationship!Relationship.

Type Parameters

Hierarchy (view full)

Implements

Constructors

Properties

_handles: Handles<unknown, ResourceHandle>
_id: string

The unique ID for this entity. Once set, this should never change.

_itemType: string = ItemType.RELATIONSHIP

The item type for this entity when it participates in an App.

_source: FeatureSource

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

cardinality: Cardinality

The cardinality of the relationship.

relatedSource: FeatureSource

The feature source with related data, if available.

relationshipType: string

The type of relationship.

title: string

The human-readable name for the relationship.

Accessors

  • get id(): string
  • The unique ID for this entity.

    Returns string

  • get itemType(): string
  • The item type for this entity when it participates in an App.

    Returns string

Methods

  • Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

    Returns Promise<void>

  • Called after normal initialization. Note: Child items are initialized before this is called.

    Returns Promise<void>

  • Sets the properties for this item.

    This version will also await any asynchronous logic that is needed to set the properties.

    Parameters

    • properties: Partial<TProperties>

      A plain object containing property values to set, keyed by property name.

    Returns Promise<void>

  • A clean-up function that should get called whenever the item is disposed of.

    Returns Promise<void>

  • Waits for all deserialization logic initiated thus far to finish, whether invoked by passing properties into the constructor, or by invoking assignProperties() or assignPropertiesAsync().

    Returns Promise<void>

  • Initializes the item.

    Returns Promise<void>

  • Returns a serializable representation of the item.

    Parameters

    • serializeMode: SerializeMode = "all"

      If specified, only properties that are appropriate for the given mode are returned. Otherwise, all properties will be serialized.

    Returns TProperties