public class

Relationship

extends Object
java.lang.Object
   ↳ com.esri.core.geodatabase.Relationship

Class Overview

This class describes the relationship between tables from a local geodatabase.

Summary

Nested Classes
enum Relationship.Cardinality The cardinality of the relationship. 
enum Relationship.Role Describes whether this table is the origin or destination of the relationship. 
Public Constructors
Relationship()
Public Methods
static Relationship fromJson(JsonParser parser, Geodatabase geodatabase)
Gets a Relationship from the input JSON string.
Relationship.Cardinality getCardinality()
Gets the cardinality of this relationship.
int getId()
The ID of the relationship; this is shared by the origin and destination.
String getKeyField()
Gets the key field of this table.
String getName()
The name of the relationship; this is shared by the origin and destination.
GeodatabaseFeatureTable getRelatedTable()
Gets the table that is related to this table.
Relationship.Role getRole()
Gets the role (origin or destination) that this table has in this relationship.
boolean isComposite()
If the origin table is logically composed of the destination table then the destination table records will be deleted when their origin table records are deleted.
static List<Relationship> listFromJson(JsonParser parser, Geodatabase geodatabase)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Relationship ()

Public Methods

public static Relationship fromJson (JsonParser parser, Geodatabase geodatabase)

Gets a Relationship from the input JSON string.

Parameters
parser JsonParser: the JSON parser
geodatabase Geodatabase: the Geodatabase
Returns
Relationship a Relationship instance
Throws
Exception any exception on parsing the JSON

public Relationship.Cardinality getCardinality ()

Gets the cardinality of this relationship.

Returns
Relationship.Cardinality the cardinality

public int getId ()

The ID of the relationship; this is shared by the origin and destination.

Returns
int the ID

public String getKeyField ()

Gets the key field of this table.

Returns
String field name.

public String getName ()

The name of the relationship; this is shared by the origin and destination.

Returns
String the name

public GeodatabaseFeatureTable getRelatedTable ()

Gets the table that is related to this table.

Returns
GeodatabaseFeatureTable the related table.

public Relationship.Role getRole ()

Gets the role (origin or destination) that this table has in this relationship.

Returns
Relationship.Role the role

public boolean isComposite ()

If the origin table is logically composed of the destination table then the destination table records will be deleted when their origin table records are deleted.

Returns
boolean true if the relationship is composite; false otherwise.

public static List<Relationship> listFromJson (JsonParser parser, Geodatabase geodatabase)

Parameters
parser JsonParser
geodatabase Geodatabase
Returns
List<Relationship>
Throws
Exception

public String toString ()

Returns
String