DataRelation

Inheritance: java.lang.Object

public class DataRelation

Represents a parent/child relationship between two DataTable objects.

Constructors

ConstructorDescription
DataRelation(String relationName, System.Data.DataTable parentTable, System.Data.DataTable childTable, String[] parentColumnNames, 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.
DataRelation(String relationName, System.Data.DataColumn[] parentColumns, System.Data.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(String relationName, System.Data.DataColumn parentColumn, System.Data.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(String relationName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn)Initializes a new instance of the DataRelation class using the specified DataRelation name, and parent and child DataColumn objects.

Methods

MethodDescription
equals(Object obj)
getChildColumnNames()
getChildColumns()Gets the child DataColumn objects of this relation.
getChildKey()
getChildKeyConstraint()Gets the ForeignKeyConstraint for the relation.
getChildTable()Gets the child table of this relation.
getChildTableName()
getDataSet()Gets the DataSet to which the DataRelation belongs.
getParentColumnNames()
getParentColumns()Gets an array of DataColumn objects that are the parent columns of this DataRelation.
getParentKey()
getParentKeyConstraint()Gets the UniqueConstraint that guarantees that values in the parent column of a DataRelation are unique.
getParentTable()Gets the parent DataTable of this DataRelation.
getParentTableName()
getRelationName()Gets the name used to retrieve a DataRelation from the DataRelationCollection.
hashCode()
setChildKeyConstraint(System.Data.ForeignKeyConstraint childKeyConstraint)
setNested(boolean value)Sets a value that indicates whether DataRelation objects are nested.
setParentKeyConstraint(System.Data.UniqueConstraint parentKeyConstraint)

DataRelation(String relationName, System.Data.DataTable parentTable, System.Data.DataTable childTable, String[] parentColumnNames, String[] childColumnNames)

public DataRelation(String relationName, System.Data.DataTable parentTable, System.Data.DataTable childTable, String[] parentColumnNames, 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.

Parameters:

ParameterTypeDescription
relationNamejava.lang.StringThe 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.
parentTableDataTableThe parent table in the relationship.
childTableDataTableThe child table in the relationship.
parentColumnNamesjava.lang.String[]The parent DataColumn’s name in the relationship.
childColumnNamesjava.lang.String[]The child DataColumn;s in the relationship.

DataRelation(String relationName, System.Data.DataColumn[] parentColumns, System.Data.DataColumn[] childColumns, boolean createConstraints)

public DataRelation(String relationName, System.Data.DataColumn[] parentColumns, System.Data.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.

Parameters:

ParameterTypeDescription
relationNamejava.lang.StringThe 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.
parentColumnsDataColumn[]An array of parent DataColumn objects.
childColumnsDataColumn[]An array of child DataColumn objects.
createConstraintsbooleanA value that indicates whether to create constraints. true, if constraints are created. Otherwise, false.

DataRelation(String relationName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn, boolean createConstraints)

public DataRelation(String relationName, System.Data.DataColumn parentColumn, System.Data.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.

Parameters:

ParameterTypeDescription
relationNamejava.lang.StringThe 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.
parentColumnDataColumnThe parent DataColumn in the relation.
childColumnDataColumnThe child DataColumn in the relation.
createConstraintsbooleanA value that indicates whether constraints are created. true, if constraints are created. Otherwise, false.

DataRelation(String relationName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn)

public DataRelation(String relationName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn)

Initializes a new instance of the DataRelation class using the specified DataRelation name, and parent and child DataColumn objects.

Parameters:

ParameterTypeDescription
relationNamejava.lang.StringThe 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.
parentColumnDataColumnThe parent DataColumn in the relationship.
childColumnDataColumnThe child DataColumn in the relationship.

equals(Object obj)

public boolean equals(Object obj)

Parameters:

ParameterTypeDescription
objjava.lang.Object

Returns: boolean

getChildColumnNames()

public String[] getChildColumnNames()

Returns: java.lang.String[] - the child DataColumn names of this relation.

getChildColumns()

public System.Data.DataColumn[] getChildColumns()

Gets the child DataColumn objects of this relation.

Returns: com.aspose.words.net.System.Data.DataColumn[] - An array of DataColumn objects.

getChildKey()

public System.Data.DataKey getChildKey()

Returns: DataKey

getChildKeyConstraint()

public System.Data.ForeignKeyConstraint getChildKeyConstraint()

Gets the ForeignKeyConstraint for the relation.

Returns: ForeignKeyConstraint - A ForeignKeyConstraint.

getChildTable()

public System.Data.DataTable getChildTable()

Gets the child table of this relation.

Returns: DataTable - A DataTable that is the child table of the relation.

getChildTableName()

public String getChildTableName()

Returns: java.lang.String - the child DataTable’s name of this DataRelation.

getDataSet()

public System.Data.DataSet getDataSet()

Gets the DataSet to which the DataRelation belongs.

Returns: DataSet - A DataSet to which the DataRelation belongs.

getParentColumnNames()

public String[] getParentColumnNames()

Returns: java.lang.String[] - the parent DataColumn names of this relation.

getParentColumns()

public System.Data.DataColumn[] getParentColumns()

Gets an array of DataColumn objects that are the parent columns of this DataRelation.

Returns: com.aspose.words.net.System.Data.DataColumn[] - An array of DataColumn objects that are the parent columns of this DataRelation.

getParentKey()

public System.Data.DataKey getParentKey()

Returns: DataKey

getParentKeyConstraint()

public System.Data.UniqueConstraint getParentKeyConstraint()

Gets the UniqueConstraint that guarantees that values in the parent column of a DataRelation are unique.

Returns: UniqueConstraint - A UniqueConstraint that makes sure that values in a parent column are unique.

getParentTable()

public System.Data.DataTable getParentTable()

Gets the parent DataTable of this DataRelation.

Returns: DataTable - A DataTable that is the parent table of this relation.

getParentTableName()

public String getParentTableName()

Returns: java.lang.String - the parent DataTable’s name of this DataRelation.

getRelationName()

public String getRelationName()

Gets the name used to retrieve a DataRelation from the DataRelationCollection.

Returns: java.lang.String - The name of the a DataRelation.

hashCode()

public int hashCode()

Returns: int

setChildKeyConstraint(System.Data.ForeignKeyConstraint childKeyConstraint)

public void setChildKeyConstraint(System.Data.ForeignKeyConstraint childKeyConstraint)

Parameters:

ParameterTypeDescription
childKeyConstraintForeignKeyConstraint

setNested(boolean value)

public void setNested(boolean value)

Sets a value that indicates whether DataRelation objects are nested.

Parameters:

ParameterTypeDescription
valuebooleantrue, if DataRelation objects are nested; otherwise, false.

setParentKeyConstraint(System.Data.UniqueConstraint parentKeyConstraint)

public void setParentKeyConstraint(System.Data.UniqueConstraint parentKeyConstraint)

Parameters:

ParameterTypeDescription
parentKeyConstraintUniqueConstraint