public abstract class JoinFragment extends Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
FULL_JOIN
Deprecated. 
 
use  
JoinType.FULL_JOIN instead. | 
static int | 
INNER_JOIN
Deprecated. 
 
use  
JoinType.INNER_JOIN instead. | 
static int | 
LEFT_OUTER_JOIN
Deprecated. 
 
use  
JoinType.LEFT_OUTER_JOIN instead. | 
static int | 
RIGHT_OUTER_JOIN
Deprecated. 
 
use  
JoinType.RIGHT_OUTER_JOIN instead. | 
| Constructor and Description | 
|---|
JoinFragment()  | 
| Modifier and Type | Method and Description | 
|---|---|
abstract boolean | 
addCondition(String condition)
Adds a free-form condition fragment 
 | 
protected boolean | 
addCondition(StringBuilder buffer,
            String on)
Appends the 'on' condition to the buffer, returning true if the condition was added. 
 | 
abstract void | 
addCondition(String alias,
            String[] fkColumns,
            String[] pkColumns)
Adds a condition to the join fragment. 
 | 
abstract void | 
addCrossJoin(String tableName,
            String alias)
Adds a cross join to the specified table. 
 | 
void | 
addFragment(JoinFragment ojf)
Adds another join fragment to this one. 
 | 
abstract void | 
addJoin(String tableName,
       String alias,
       String[] fkColumns,
       String[] pkColumns,
       JoinType joinType)
Adds a join. 
 | 
abstract void | 
addJoin(String tableName,
       String alias,
       String[] fkColumns,
       String[] pkColumns,
       JoinType joinType,
       String on)
Adds a join, with an additional ON clause fragment 
 | 
abstract void | 
addJoins(String fromFragment,
        String whereFragment)
Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments 
 | 
abstract JoinFragment | 
copy()
Make a copy. 
 | 
boolean | 
hasFilterCondition()
True if the where fragment is from a filter condition. 
 | 
boolean | 
hasThetaJoins()
Determine if the join fragment contained any theta-joins. 
 | 
void | 
setHasFilterCondition(boolean b)  | 
void | 
setHasThetaJoins(boolean hasThetaJoins)  | 
abstract String | 
toFromFragmentString()
Render this fragment to its FROM clause portion 
 | 
abstract String | 
toWhereFragmentString()
Render this fragment to its WHERE clause portion 
 | 
@Deprecated public static final int INNER_JOIN
JoinType.INNER_JOIN instead.@Deprecated public static final int FULL_JOIN
JoinType.FULL_JOIN instead.@Deprecated public static final int LEFT_OUTER_JOIN
JoinType.LEFT_OUTER_JOIN instead.@Deprecated public static final int RIGHT_OUTER_JOIN
JoinType.RIGHT_OUTER_JOIN instead.public abstract void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType joinType)
tableName - The name of the table to be joinedalias - The alias to apply to the joined tablefkColumns - The names of the columns which reference the joined tablepkColumns - The columns in the joined table being referencedjoinType - The type of joinpublic abstract void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType joinType, String on)
tableName - The name of the table to be joinedalias - The alias to apply to the joined tablefkColumns - The names of the columns which reference the joined tablepkColumns - The columns in the joined table being referencedjoinType - The type of joinon - The additional ON fragmentpublic abstract void addCrossJoin(String tableName, String alias)
tableName - The name of the table to be joinedalias - The alias to apply to the joined tablepublic abstract void addJoins(String fromFragment, String whereFragment)
fromFragment - The FROM clause fragmentwhereFragment - The WHERE clause fragmentpublic abstract String toFromFragmentString()
public abstract String toWhereFragmentString()
public abstract void addCondition(String alias, String[] fkColumns, String[] pkColumns)
alias - The alias of the joined tablefkColumns - The names of the columns which reference the joined tablepkColumns - The columns in the joined table being referencedpublic abstract boolean addCondition(String condition)
condition - The fragmenttrue if the condition was addedpublic abstract JoinFragment copy()
public void addFragment(JoinFragment ojf)
ojf - The other join fragmentprotected boolean addCondition(StringBuilder buffer, String on)
buffer - The buffer to append the 'on' condition to.on - The 'on' condition.public boolean hasFilterCondition()
public void setHasFilterCondition(boolean b)
public boolean hasThetaJoins()
true if the fragment contained theta joinspublic void setHasThetaJoins(boolean hasThetaJoins)
Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.