DSRG.VKB
Class Join_Condition

java.lang.Object
  |
  +--DSRG.VKB.Condition
        |
        +--DSRG.VKB.Join_Condition

public class Join_Condition
extends Condition
implements java.lang.Cloneable

Join Condition of view Definition. It's a part of WHERE clause. It will help on query break down.

It will confirm the op is in this direction "<", "<=", if the op is "==" and "!=", the two attribute with smaller value on the left.

See Also:
Serialized Form

Field Summary
(package private)  Attribute right
          Second Operand
 
Fields inherited from class DSRG.VKB.Condition
left, op
 
Constructor Summary
Join_Condition()
          Default Constructor.
Join_Condition(Attribute la, Attribute ra)
          Constructor of Join_Conditon.
 
Method Summary
 java.lang.Object clone()
          Clone Join Condition.
 boolean contains(IS is)
          Check if specific IS in this condition.
 boolean contains(Relation rel)
          Check if specific relation in this condition.
 boolean contains(java.lang.String attr_name)
          check if specific attribute in this condition
 boolean equals(Join_Condition jc)
          Check if this join -conditoin is equivalent with another join Condition.
 java.lang.String getNoIS()
          Function to get String of Condition with out IS info in it.
 Attribute getRight()
          Get right attribute.
 java.lang.String getRightName()
          Get right attribute name in format "IS.R.A"
 void setOperand(java.lang.Object attr)
          Set Second Operand
 void setRight(Attribute attr)
          Set right attribute.
 java.lang.String toString()
          convert join-condition to string
 boolean valid()
          Test if the left attribute same as the right attribute.
 
Methods inherited from class DSRG.VKB.Condition
getLeft, getLeftName, getOperator, setAttribute, setOperator
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

right

Attribute right
Second Operand
Constructor Detail

Join_Condition

public Join_Condition()
Default Constructor.

Join_Condition

public Join_Condition(Attribute la,
                      Attribute ra)
Constructor of Join_Conditon. Construct a JC like " A = B" from two attributes.
Parameters:
la - left attribute
ra - right attribute.
Method Detail

getRightName

public java.lang.String getRightName()
Get right attribute name in format "IS.R.A"

setOperand

public void setOperand(java.lang.Object attr)
Set Second Operand
Parameters:
attr - Object of Attribute;
Overrides:
setOperand in class Condition

toString

public java.lang.String toString()
convert join-condition to string
Overrides:
toString in class Condition

equals

public boolean equals(Join_Condition jc)
Check if this join -conditoin is equivalent with another join Condition. This compare will not considering the directions of the Join Condition, that means: A=B is not same as B=A

contains

public boolean contains(java.lang.String attr_name)
check if specific attribute in this condition
Parameters:
attr_name - in format "IS.R.A"
Returns:
true: contains; false: not contains.
Overrides:
contains in class Condition

contains

public boolean contains(Relation rel)
Check if specific relation in this condition.
Parameters:
Rel - the specific Relation.
Returns:
true: contains; false: not contains.
Overrides:
contains in class Condition

contains

public boolean contains(IS is)
Check if specific IS in this condition.
Parameters:
IS - the specific IS.
Returns:
true: contains; false: not contains.

getRight

public Attribute getRight()
Get right attribute.

setRight

public void setRight(Attribute attr)
Set right attribute.

getNoIS

public java.lang.String getNoIS()
Function to get String of Condition with out IS info in it.
Overrides:
getNoIS in class Condition

valid

public boolean valid()
Test if the left attribute same as the right attribute. JC will not be valid if the left = right.

clone

public java.lang.Object clone()
Clone Join Condition.
Overrides:
clone in class Condition