org.modeshape.graph.query.model
Class EquiJoinCondition

java.lang.Object
  extended by org.modeshape.graph.query.model.EquiJoinCondition
All Implemented Interfaces:
Serializable, JoinCondition, LanguageObject, Visitable
Direct Known Subclasses:
JcrEquiJoinCondition

@Immutable
public class EquiJoinCondition
extends Object
implements 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)
          
 int hashCode()
          
 String property1Name()
          Get the name of the property that appears on the left-side of the join.
 String property2Name()
          Get the name of the property that appears on the left-side of the join.
 SelectorName selector1Name()
          Get the name of the selector that appears on the left-side of the join.
 SelectorName selector2Name()
          Get the name of the selector that appears on the right-side of the join.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, 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

selector1Name

public final SelectorName selector1Name()
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

property1Name

public final String property1Name()
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

selector2Name

public final SelectorName selector2Name()
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

property2Name

public final String property2Name()
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.

Specified by:
accept in interface Visitable
Parameters:
visitor - the visitor; never null
See Also:
Visitable.accept(org.modeshape.graph.query.model.Visitor)


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