public class DataRelation
extends java.lang.Object
DataTable objects.| Constructor and Description |
|---|
DataRelation(java.lang.String relationName,
DataColumn[] parentColumns,
DataColumn[] childColumns,
boolean createConstraints)
Initializes a new instance of the
DataRelation class using the specified name, matched arrays of parent and child DataColumn objects, and value that indicates whether to create constraints. |
DataRelation(java.lang.String relationName,
DataColumn parentColumn,
DataColumn childColumn)
Initializes a new instance of the
DataRelation class using the specified DataRelation name, and parent and child DataColumn objects. |
DataRelation(java.lang.String relationName,
DataColumn parentColumn,
DataColumn childColumn,
boolean createConstraints)
Initializes a new instance of the
DataRelation class using the specified name, parent and child DataColumn objects, and a value that indicates whether to create constraints. |
DataRelation(java.lang.String relationName,
DataTable parentTable,
DataTable childTable,
java.lang.String[] parentColumnNames,
java.lang.String[] childColumnNames)
Initializes a new instance of the
DataRelation class using the specified name, parent and child tables,
matched arrays of parent and child columns. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String[] |
getChildColumnNames() |
DataColumn[] |
getChildColumns()
Gets the child
DataColumn objects of this relation. |
DataKey |
getChildKey() |
ForeignKeyConstraint |
getChildKeyConstraint()
Gets the
ForeignKeyConstraint for the relation. |
DataTable |
getChildTable()
Gets the child table of this relation.
|
java.lang.String |
getChildTableName() |
DataSet |
getDataSet()
Gets the
DataSet to which the DataRelation belongs. |
java.lang.String[] |
getParentColumnNames() |
DataColumn[] |
getParentColumns()
Gets an array of
DataColumn objects that are the parent columns of this DataRelation. |
DataKey |
getParentKey() |
UniqueConstraint |
getParentKeyConstraint()
Gets the
UniqueConstraint that guarantees that values in the parent column of a DataRelation are unique. |
DataTable |
getParentTable()
Gets the parent
DataTable of this DataRelation. |
java.lang.String |
getParentTableName() |
java.lang.String |
getRelationName()
Gets the name used to retrieve a
DataRelation from the DataRelationCollection. |
int |
hashCode() |
void |
setChildKeyConstraint(ForeignKeyConstraint childKeyConstraint) |
void |
setNested(boolean value)
Sets a value that indicates whether
DataRelation objects are nested. |
void |
setParentKeyConstraint(UniqueConstraint parentKeyConstraint) |
public DataRelation(java.lang.String relationName,
DataTable parentTable,
DataTable childTable,
java.lang.String[] parentColumnNames,
java.lang.String[] childColumnNames)
DataRelation class using the specified name, parent and child tables,
matched arrays of parent and child columns.relationName - The name of the DataRelation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.parentTable - The parent table in the relationship.childTable - The child table in the relationship.parentColumnNames - The parent DataColumn's name in the relationship.childColumnNames - The child DataColumn;s in the relationship.public DataRelation(java.lang.String relationName,
DataColumn[] parentColumns,
DataColumn[] childColumns,
boolean createConstraints)
DataRelation class using the specified name, matched arrays of parent and child DataColumn objects, and value that indicates whether to create constraints.relationName - The name of the relation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.parentColumns - An array of parent DataColumn objects.childColumns - An array of child DataColumn objects.createConstraints - A value that indicates whether to create constraints. true, if constraints are created. Otherwise, false.public DataRelation(java.lang.String relationName,
DataColumn parentColumn,
DataColumn childColumn,
boolean createConstraints)
DataRelation class using the specified name, parent and child DataColumn objects, and a value that indicates whether to create constraints.relationName - The name of the relation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.parentColumn - The parent DataColumn in the relation.childColumn - The child DataColumn in the relation.createConstraints - A value that indicates whether constraints are created. true, if constraints are created. Otherwise, false.public DataRelation(java.lang.String relationName,
DataColumn parentColumn,
DataColumn childColumn)
DataRelation class using the specified DataRelation name, and parent and child DataColumn objects.relationName - The name of the DataRelation. If null or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.parentColumn - The parent DataColumn in the relationship.childColumn - The child DataColumn in the relationship.public java.lang.String getRelationName()
DataRelation from the DataRelationCollection.DataRelation.public java.lang.String getParentTableName()
public java.lang.String getChildTableName()
public DataTable getParentTable()
DataTable of this DataRelation.DataTable that is the parent table of this relation.public DataTable getChildTable()
DataTable that is the child table of the relation.public java.lang.String[] getParentColumnNames()
public java.lang.String[] getChildColumnNames()
public DataColumn[] getParentColumns()
DataColumn objects that are the parent columns of this DataRelation.DataColumn objects that are the parent columns of this DataRelation.public DataColumn[] getChildColumns()
DataColumn objects of this relation.DataColumn objects.public void setNested(boolean value)
DataRelation objects are nested.value - true, if DataRelation objects are nested; otherwise, false.public UniqueConstraint getParentKeyConstraint()
UniqueConstraint that guarantees that values in the parent column of a DataRelation are unique.UniqueConstraint that makes sure that values in a parent column are unique.public void setParentKeyConstraint(UniqueConstraint parentKeyConstraint)
public ForeignKeyConstraint getChildKeyConstraint()
ForeignKeyConstraint for the relation.ForeignKeyConstraint.public void setChildKeyConstraint(ForeignKeyConstraint childKeyConstraint)
public DataKey getChildKey()
public DataKey getParentKey()
public DataSet getDataSet()
DataSet to which the DataRelation belongs.DataSet to which the DataRelation belongs.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object