Style Intelligence v12.0

inetsoft.uql.erm
Class XRelationship

java.lang.Object
  extended by inetsoft.uql.erm.XRelationship
All Implemented Interfaces:
Serializable, Cloneable

public class XRelationship
extends Object
implements Cloneable, Serializable

An XRelationship object represents a relationship, or join, in the underlying data source of a data model. A relationship is between a column of one table to a column of another table.

Note that the order of the table/column pairs is arbitrary and has no effect on the resulting join.

Since:
4.4
See Also:
Serialized Form

Field Summary
static String EQUAL
          Equal join.
static String GREATER
          Greater than join.
static String GREATER_EQUAL
          Greater than or equal to join.
static int IDENTIFYING
          Deprecated. these types of relationships are no longer supported.
static String LEFT_OUTER
          Left outer join.
static String LESS
          Less than join.
static String LESS_EQUAL
          Less than or equal to join.
static int MANY
          Cardinality many.
static int NONIDENTIFYING
          Deprecated. these types of relationships are no longer supported.
static String NOT_EQUAL
          Not equal join.
static int ONE
          Cardinality one.
static String RIGHT_OUTER
          Right outer join.
 
Constructor Summary
XRelationship()
          Creates a new instance of XRelationship.
XRelationship(String dependentTable, String dependentColumn, String independentTable, String independentColumn)
          Constructs a new instance of XRelationship that defines a join between the specified tables and columns.
XRelationship(String dependentTable, String dependentColumn, String independentTable, String independentColumn, int type)
          Deprecated. these types of relationships are no longer supported.
XRelationship(String dependentTable, String dependentColumn, String independentTable, String independentColumn, String joinType)
          Constructs a new instance of XRelationship that defines a join between the specified tables and columns.
 
Method Summary
 Object clone()
          Creates and returns a copy of this relationship object.
 boolean equalContents(Object obj)
          Indicates whether other object is "equal to" this one without cardinality.
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 int getDependentCardinality()
          Get the dependent table cardinality.
 String getDependentColumn()
          Gets the column on which the dependent table is joined.
 String getDependentTable()
          Gets the dependent table in this relationship.
 int getIndependentCardinality()
          Get the independent table cardinality.
 String getIndependentColumn()
          Gets the column on which the independent table is joined.
 String getIndependentTable()
          Gets the independent table in this relationship.
 String getJoinType()
          Gets the type of join that this relationship represents.
 String getMerging()
          Gets the merging that this relationship represents.
 int getOrder()
          Gets the order that this relationship represents.
 int getType()
          Deprecated. these types of relationships are no longer supported.
 boolean isWeakJoin()
          Check if this is a weak join.
 void parseXML(Element tag)
          Read in a relationship definition from its XML representation.
 void setDependent(String table, String column)
          Sets the dependent table and column in this relationship.
 void setDependentCardinality(int dependentCardinality)
          Set the dependent table cardinality.
 void setIndependent(String table, String column)
          Sets the independent table and column in this relationship.
 void setIndependentCardinality(int independentCardinality)
          Set the independent table cardinality.
 void setJoinType(String joinType)
          Sets the type of join that this relationship represents.
 void setMerging(String merging)
          Sets the merging that this relationship represents.
 void setOrder(int order)
          Sets the order that this relationship represents.
 void setType(int type)
          Deprecated. these types of relationships are no longer supported.
 void setWeakJoin(boolean weak)
          Set the weak join flag.
 String toString()
          Gets a textual representation of this relationship.
protected  void writeXML(PrintWriter writer)
          Writes the XML representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EQUAL

public static final String EQUAL
Equal join.

See Also:
Constant Field Values

LEFT_OUTER

public static final String LEFT_OUTER
Left outer join.

See Also:
Constant Field Values

RIGHT_OUTER

public static final String RIGHT_OUTER
Right outer join.

See Also:
Constant Field Values

GREATER

public static final String GREATER
Greater than join.

See Also:
Constant Field Values

LESS

public static final String LESS
Less than join.

See Also:
Constant Field Values

GREATER_EQUAL

public static final String GREATER_EQUAL
Greater than or equal to join.

See Also:
Constant Field Values

LESS_EQUAL

public static final String LESS_EQUAL
Less than or equal to join.

See Also:
Constant Field Values

NOT_EQUAL

public static final String NOT_EQUAL
Not equal join.

See Also:
Constant Field Values

IDENTIFYING

public static final int IDENTIFYING
Deprecated. these types of relationships are no longer supported.
Constant specifying an identifying (1-to-n) relationship.

See Also:
Constant Field Values

NONIDENTIFYING

public static final int NONIDENTIFYING
Deprecated. these types of relationships are no longer supported.
Constant specifying a nonidentifying (m-to-n) relationship.

See Also:
Constant Field Values

ONE

public static final int ONE
Cardinality one.

See Also:
Constant Field Values

MANY

public static final int MANY
Cardinality many.

See Also:
Constant Field Values
Constructor Detail

XRelationship

public XRelationship()
Creates a new instance of XRelationship. Default constructor that should only be used when loading the relationship from an XML file.


XRelationship

public XRelationship(String dependentTable,
                     String dependentColumn,
                     String independentTable,
                     String independentColumn)
Constructs a new instance of XRelationship that defines a join between the specified tables and columns. For nonidentifying relationships, the order of the tables is is arbitrary.

Parameters:
dependentTable - the dependent table of the relationship.
dependentColumn - the column in the dependent table of the relationship.
independentTable - the independent table of the relationship.
independentColumn - the column in the independent table of the relationship.

XRelationship

public XRelationship(String dependentTable,
                     String dependentColumn,
                     String independentTable,
                     String independentColumn,
                     int type)
Deprecated. these types of relationships are no longer supported.

Constructs a new instance of XRelationship that defines a join between the specified tables and columns. For nonidentifying relationships, the order of the tables is is arbitrary.

Parameters:
dependentTable - the dependent table of the relationship.
dependentColumn - the column in the dependent table of the relationship.
independentTable - the independent table of the relationship.
independentColumn - the column in the independent table of the relationship.
type - the type of the relationship. May be either IDENTIFYING or NONIDENTIFYING.

XRelationship

public XRelationship(String dependentTable,
                     String dependentColumn,
                     String independentTable,
                     String independentColumn,
                     String joinType)
Constructs a new instance of XRelationship that defines a join between the specified tables and columns. For nonidentifying relationships, the order of the tables is is arbitrary.

Parameters:
dependentTable - the dependent table of the relationship.
dependentColumn - the column in the dependent table of the relationship.
independentTable - the independent table of the relationship.
independentColumn - the column in the independent table of the relationship.
joinType - the type of join that the relationship represents.
Method Detail

setDependent

public void setDependent(String table,
                         String column)
Sets the dependent table and column in this relationship. For nonidentifying relationships, the order is arbitrary.

Parameters:
table - the table to be joined.
column - the column on which to join.
Since:
5.0

getDependentTable

public String getDependentTable()
Gets the dependent table in this relationship. For nonidentifying relationships, the order is arbitrary.

Returns:
the table name.
Since:
5.0

getDependentColumn

public String getDependentColumn()
Gets the column on which the dependent table is joined. For nonidentifying relationships, the order is arbitrary.

Returns:
the column name.
Since:
5.0

setIndependent

public void setIndependent(String table,
                           String column)
Sets the independent table and column in this relationship. For nonidentifying relationships, the order is arbitrary.

Parameters:
table - the table to be joined.
column - the column on which to join.
Since:
5.0

getIndependentTable

public String getIndependentTable()
Gets the independent table in this relationship. For nonidentifying relationships, the order is arbitrary.

Returns:
the table name.
Since:
5.0

getIndependentColumn

public String getIndependentColumn()
Gets the column on which the independent table is joined. For nonidentifying relationships, the order is arbitrary.

Returns:
the column name.
Since:
5.0

getType

public int getType()
Deprecated. these types of relationships are no longer supported.

Gets the type of this relationship.

Returns:
one of IDENTIFYING or NONIDENTIFYING.
Since:
5.0

setType

public void setType(int type)
Deprecated. these types of relationships are no longer supported.

Sets the type of this relationship.

Parameters:
type - one of IDENTIFYING or NONIDENTIFYING.
Since:
5.0

isWeakJoin

public boolean isWeakJoin()
Check if this is a weak join.


setWeakJoin

public void setWeakJoin(boolean weak)
Set the weak join flag.


getJoinType

public String getJoinType()
Gets the type of join that this relationship represents.

Returns:
joinType the join type.

setJoinType

public void setJoinType(String joinType)
Sets the type of join that this relationship represents.

Parameters:
joinType - the new join type.

getOrder

public int getOrder()
Gets the order that this relationship represents.

Returns:
the order that this relationship represents.

setOrder

public void setOrder(int order)
Sets the order that this relationship represents.

Parameters:
order - the new order.

getMerging

public String getMerging()
Gets the merging that this relationship represents.

Returns:
joinType the join type.

getDependentCardinality

public int getDependentCardinality()
Get the dependent table cardinality.


setDependentCardinality

public void setDependentCardinality(int dependentCardinality)
Set the dependent table cardinality.

Parameters:
dependentCardinality - the dependentCardinality to be set.

getIndependentCardinality

public int getIndependentCardinality()
Get the independent table cardinality.


setIndependentCardinality

public void setIndependentCardinality(int independentCardinality)
Set the independent table cardinality.

Parameters:
independentCardinality - the independentCardinality to be set.

setMerging

public void setMerging(String merging)
Sets the merging that this relationship represents.

Parameters:
merging - the new join type.

writeXML

protected void writeXML(PrintWriter writer)
Writes the XML representation of this object.

Parameters:
writer - the output stream to which to write the XML data.

parseXML

public void parseXML(Element tag)
              throws DOMException
Read in a relationship definition from its XML representation.

Parameters:
tag - the XML element that represents this relationship.
Throws:
DOMException - if an error occurs while parsing the XML element.

toString

public String toString()
Gets a textual representation of this relationship.

Overrides:
toString in class Object
Returns:
a string representation of this object. This value will have the format XRelationship: table1.column -> table2.column

clone

public Object clone()
Creates and returns a copy of this relationship object.

Overrides:
clone in class Object
Returns:
a clone of this instance.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.

equalContents

public boolean equalContents(Object obj)
Indicates whether other object is "equal to" this one without cardinality.

Parameters:
obj - the reference object with which to compare.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.