org.datanucleus.store.rdbms.query
Class QueryStatement.Join

java.lang.Object
  extended by org.datanucleus.store.rdbms.query.QueryStatement.Join
Enclosing class:
QueryStatement

public static class QueryStatement.Join
extends java.lang.Object

A join in a query. Supports ANSI-92, or ANSI-86 style joins. Provides the FROM clause only.


Field Summary
static int INNER_JOIN
          ANSI INNER JOIN
static int LEFT_OUTER_JOIN
          ANSI LEFT OUTER JOIN
static int RIGHT_OUTER_JOIN
          ANSI RIGHT OUTER JOIN
 
Constructor Summary
QueryStatement.Join(int type, org.datanucleus.store.mapped.expression.ScalarExpression expr1, org.datanucleus.store.mapped.expression.ScalarExpression expr2, org.datanucleus.store.mapped.expression.LogicSetExpression tblExpr)
          Constructor generating ANSI-92 style join.
QueryStatement.Join(org.datanucleus.store.mapped.expression.ScalarExpression expr1, org.datanucleus.store.mapped.expression.ScalarExpression expr2, org.datanucleus.store.mapped.expression.LogicSetExpression tblExpr)
          Constructor generating ANSI-86 style join.
 
Method Summary
 java.lang.String getFromClause(RDBMSAdapter rdbmsAdapter, boolean lock)
          Method to return the FROM clause to add.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INNER_JOIN

public static final int INNER_JOIN
ANSI INNER JOIN

See Also:
Constant Field Values

LEFT_OUTER_JOIN

public static final int LEFT_OUTER_JOIN
ANSI LEFT OUTER JOIN

See Also:
Constant Field Values

RIGHT_OUTER_JOIN

public static final int RIGHT_OUTER_JOIN
ANSI RIGHT OUTER JOIN

See Also:
Constant Field Values
Constructor Detail

QueryStatement.Join

public QueryStatement.Join(int type,
                           org.datanucleus.store.mapped.expression.ScalarExpression expr1,
                           org.datanucleus.store.mapped.expression.ScalarExpression expr2,
                           org.datanucleus.store.mapped.expression.LogicSetExpression tblExpr)
Constructor generating ANSI-92 style join. This creates a FROM clause like "INNER JOIN TABLE1 ON THIS.COL1 = TABLE1.COL2"

Parameters:
type - Type of Join
expr1 - left side expression
expr2 - right side expression
tblExpr - Table expression for the table to apply the join

QueryStatement.Join

public QueryStatement.Join(org.datanucleus.store.mapped.expression.ScalarExpression expr1,
                           org.datanucleus.store.mapped.expression.ScalarExpression expr2,
                           org.datanucleus.store.mapped.expression.LogicSetExpression tblExpr)
Constructor generating ANSI-86 style join.

Parameters:
expr1 - left side expression
expr2 - right side expression
tblExpr - Table expression
Method Detail

getFromClause

public java.lang.String getFromClause(RDBMSAdapter rdbmsAdapter,
                                      boolean lock)
Method to return the FROM clause to add.

Parameters:
rdbmsAdapter - The datastore adapter
lock - Whether to lock the query statement
Returns:
The FROM clause of this join


Copyright © 2009. All Rights Reserved.