org.modeshape.graph.query
Class QueryBuilder.JoinClause

java.lang.Object
  extended by org.modeshape.graph.query.QueryBuilder.JoinClause
Enclosing class:
QueryBuilder

public class QueryBuilder.JoinClause
extends Object

Class used to specify a join clause of a query.

See Also:
QueryBuilder.join(String), QueryBuilder.innerJoin(String), QueryBuilder.leftOuterJoin(String), QueryBuilder.rightOuterJoin(String), QueryBuilder.fullOuterJoin(String)

Method Summary
 QueryBuilder on(String columnEqualExpression)
          Define the join as using an equi-join criteria by specifying the expression equating two columns.
 QueryBuilder onChildNode(String parentTable, String childTable)
          Define the join criteria to require the node in one table is a child of the node in another table.
 QueryBuilder onDescendant(String ancestorTable, String descendantTable)
          Define the join criteria to require the node in one table is a descendant of the node in another table.
 QueryBuilder onSameNode(String table1, String table2)
          Define the join criteria to require the two tables represent the same node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

on

public QueryBuilder on(String columnEqualExpression)
Define the join as using an equi-join criteria by specifying the expression equating two columns. Each column reference must be qualified with the appropriate table name or alias.

Parameters:
columnEqualExpression - the equality expression between the two tables; may not be null
Returns:
the query builder instance, for method chaining purposes
Throws:
IllegalArgumentException - if the supplied expression is not an equality expression

onSameNode

public QueryBuilder onSameNode(String table1,
                               String table2)
Define the join criteria to require the two tables represent the same node. The supplied tables must be a valid name or alias.

Parameters:
table1 - the name or alias of the first table
table2 - the name or alias of the second table
Returns:
the query builder instance, for method chaining purposes

onDescendant

public QueryBuilder onDescendant(String ancestorTable,
                                 String descendantTable)
Define the join criteria to require the node in one table is a descendant of the node in another table. The supplied tables must be a valid name or alias.

Parameters:
ancestorTable - the name or alias of the table containing the ancestor node
descendantTable - the name or alias of the table containing the descendant node
Returns:
the query builder instance, for method chaining purposes

onChildNode

public QueryBuilder onChildNode(String parentTable,
                                String childTable)
Define the join criteria to require the node in one table is a child of the node in another table. The supplied tables must be a valid name or alias.

Parameters:
parentTable - the name or alias of the table containing the parent node
childTable - the name or alias of the table containing the child node
Returns:
the query builder instance, for method chaining purposes


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