org.jboss.dna.graph.query.model
Class EquiJoinCondition

java.lang.Object
  extended by org.jboss.dna.graph.query.model.JoinCondition
      extended by org.jboss.dna.graph.query.model.EquiJoinCondition
All Implemented Interfaces:
Serializable, LanguageObject, Visitable

@Immutable
public class EquiJoinCondition
extends JoinCondition

A join condition that tests whether a property on a node is equal to a property on another node. A node-tuple satisfies the constraint only if:

See Also:
Serialized Form

Constructor Summary
EquiJoinCondition(Column column1, Column column2)
          Create an equi-join condition, given the columns.
EquiJoinCondition(SelectorName selector1Name, String property1Name, SelectorName selector2Name, String property2Name)
          Create an equi-join condition, given the names of the selector and property for the left- and right-hand-side of the join.
 
Method Summary
 void accept(Visitor visitor)
          Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.
 boolean equals(Object obj)
          
 String getProperty1Name()
          Get the name of the property that appears on the left-side of the join.
 String getProperty2Name()
          Get the name of the property that appears on the left-side of the join.
 SelectorName getSelector1Name()
          Get the name of the selector that appears on the left-side of the join.
 SelectorName getSelector2Name()
          Get the name of the selector that appears on the right-side of the join.
 int hashCode()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EquiJoinCondition

public EquiJoinCondition(SelectorName selector1Name,
                         String property1Name,
                         SelectorName selector2Name,
                         String property2Name)
Create an equi-join condition, given the names of the selector and property for the left- and right-hand-side of the join.

Parameters:
selector1Name - the selector name appearing on the left-side of the join; never null
property1Name - the property name for the left-side of the join; never null
selector2Name - the selector name appearing on the right-side of the join; never null
property2Name - the property name for the right-side of the join; never null

EquiJoinCondition

public EquiJoinCondition(Column column1,
                         Column column2)
Create an equi-join condition, given the columns.

Parameters:
column1 - the column for the left-side of the join; never null
column2 - the column for the right-side of the join; never null
Method Detail

getSelector1Name

public final SelectorName getSelector1Name()
Get the name of the selector that appears on the left-side of the join.

Returns:
the selector name appearing on the left-side of the join; never null

getProperty1Name

public final String getProperty1Name()
Get the name of the property that appears on the left-side of the join.

Returns:
the property name for the left-side of the join; never null

getSelector2Name

public final SelectorName getSelector2Name()
Get the name of the selector that appears on the right-side of the join.

Returns:
the selector name appearing on the right-side of the join; never null

getProperty2Name

public final String getProperty2Name()
Get the name of the property that appears on the left-side of the join.

Returns:
the property name for the left-side of the join; never null

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

accept

public void accept(Visitor visitor)
Accept the supplied visitor, which should call back to the visitor to complete the double-dispatch operation.

Parameters:
visitor - the visitor; never null
See Also:
Visitable.accept(org.jboss.dna.graph.query.model.Visitor)


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.