RelationshipInfo Class

  • RelationshipInfo
  • class Esri::ArcGISRuntime::RelationshipInfo

    Information about the relationship between two tables. More...

    Header: #include <RelationshipInfo.h>
    Since: Esri::ArcGISRuntime 100.1

    This class was introduced in Esri::ArcGISRuntime 100.1.

    Public Functions

    RelationshipInfo(Esri::ArcGISRuntime::RelationshipInfo &&other)
    RelationshipInfo(const Esri::ArcGISRuntime::RelationshipInfo &other)
    RelationshipInfo()
    Esri::ArcGISRuntime::RelationshipInfo &operator=(Esri::ArcGISRuntime::RelationshipInfo &&other)
    Esri::ArcGISRuntime::RelationshipInfo &operator=(const Esri::ArcGISRuntime::RelationshipInfo &other)
    ~RelationshipInfo()
    Esri::ArcGISRuntime::RelationshipCardinality cardinality() const
    qint64 id() const
    bool isComposite() const
    bool isEmpty() const
    QString keyField() const
    QString keyFieldInRelationshipTable() const
    QString name() const
    qint64 relatedTableId() const
    qint64 relationshipTableId() const
    Esri::ArcGISRuntime::RelationshipRole role() const

    Detailed Description

    A RelationshipInfo identifies:

    • A table
    • The related table that the table is related to.
    • The table's role in the relationship (origin or destination).
    • The relationship's cardinality.
    • Whether this is a composite relationship.

    A table can participate in more than one relationship. Further, a table may be an origin table in one relationship and also a destination table in another relationship.

    The relationship's cardinality describes whether features in a table are related to only one feature in the other table, or whether a feature may be related to multiple features.

    In a simple relationship, the features in the participating tables can exist without the other. For example, a transformer and an electric pole may be related but one's existence does not depend on the other. Deleting the origin features will simply disassociate the destination features from the origin features.

    In a composite relationship, the destination features cannot exist without the origin features. When the origin feature is deleted, the related destination feature is deleted as well. This is called a cascade delete. This dependency also means that each destination feature must be linked to a counterpart origin feature.

    Member Function Documentation

    RelationshipInfo::RelationshipInfo(Esri::ArcGISRuntime::RelationshipInfo &&other)

    Move constructor from other RelationshipInfo.

    RelationshipInfo::RelationshipInfo(const Esri::ArcGISRuntime::RelationshipInfo &other)

    Copy constructor from other RelationshipInfo.

    RelationshipInfo::RelationshipInfo()

    Default constructor. Creates an empty RelationshipInfo.

    Esri::ArcGISRuntime::RelationshipInfo &RelationshipInfo::operator=(Esri::ArcGISRuntime::RelationshipInfo &&other)

    Move operator from other RelationshipInfo.

    Esri::ArcGISRuntime::RelationshipInfo &RelationshipInfo::operator=(const Esri::ArcGISRuntime::RelationshipInfo &other)

    Assignment operator from other RelationshipInfo.

    RelationshipInfo::~RelationshipInfo()

    Destructor.

    Esri::ArcGISRuntime::RelationshipCardinality RelationshipInfo::cardinality() const

    Returns the cardinality of this relationship.

    qint64 RelationshipInfo::id() const

    Returns the ID of this relationship.

    The relationship ID is shared between the origin and destination tables.

    bool RelationshipInfo::isComposite() const

    Returns whether this is a composite relationship.

    In a composite relationship, a feature in the destination table must always be associated with an origin feature. Orphan features in the destination tables are not permitted. Therefore, destination table features will be deleted when their associated origin table features are deleted (this is called a cascade delete).

    bool RelationshipInfo::isEmpty() const

    Returns if this RelationshipInfo is empty.

    QString RelationshipInfo::keyField() const

    Returns the key field, the field that links the origin and destination tables of this relationship.

    QString RelationshipInfo::keyFieldInRelationshipTable() const

    Returns the key field in the relationship table.

    Used in many-to-many and attributed relationships. Values in this field will match values stored in the keyField of features participating in the relationship.

    This function was introduced in Esri::ArcGISRuntime 100.12.

    QString RelationshipInfo::name() const

    Returns the name of the relationship.

    qint64 RelationshipInfo::relatedTableId() const

    Returns the ID of the related table.

    qint64 RelationshipInfo::relationshipTableId() const

    Returns the ID of the relationship table.

    The default value is -1, indicating that no table exists. The relationship table is used in many-to-many and attributed relationships.

    This function was introduced in Esri::ArcGISRuntime 100.12.

    Esri::ArcGISRuntime::RelationshipRole RelationshipInfo::role() const

    Returns the role that this table has in this relationship.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.