public class QueryJoinFragment extends JoinFragment
FULL_JOIN, INNER_JOIN, LEFT_OUTER_JOIN, RIGHT_OUTER_JOIN
Constructor and Description |
---|
QueryJoinFragment(Dialect dialect,
boolean useThetaStyleInnerJoins) |
Modifier and Type | Method and Description |
---|---|
boolean |
addCondition(java.lang.String condition)
Add the condition string to the join fragment.
|
void |
addCondition(java.lang.String alias,
java.lang.String[] columns,
java.lang.String condition) |
void |
addCondition(java.lang.String alias,
java.lang.String[] fkColumns,
java.lang.String[] pkColumns)
Adds a condition to the join fragment.
|
void |
addCrossJoin(java.lang.String tableName,
java.lang.String alias)
Adds a cross join to the specified table.
|
void |
addFromFragmentString(java.lang.String fromFragmentString) |
void |
addJoin(java.lang.String tableName,
java.lang.String alias,
java.lang.String[] fkColumns,
java.lang.String[] pkColumns,
JoinType joinType)
Adds a join.
|
void |
addJoin(java.lang.String tableName,
java.lang.String alias,
java.lang.String[] fkColumns,
java.lang.String[] pkColumns,
JoinType joinType,
java.lang.String on)
Adds a join, with an additional ON clause fragment
|
void |
addJoins(java.lang.String fromFragment,
java.lang.String whereFragment)
Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments
|
void |
clearWherePart() |
JoinFragment |
copy()
Make a copy.
|
java.lang.String |
toFromFragmentString()
Render this fragment to its FROM clause portion
|
java.lang.String |
toWhereFragmentString()
Render this fragment to its WHERE clause portion
|
addCondition, addFragment, hasFilterCondition, hasThetaJoins, setHasFilterCondition, setHasThetaJoins
public QueryJoinFragment(Dialect dialect, boolean useThetaStyleInnerJoins)
public void addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, JoinType joinType)
JoinFragment
addJoin
in class JoinFragment
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 void addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, JoinType joinType, java.lang.String on)
JoinFragment
addJoin
in class JoinFragment
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 java.lang.String toFromFragmentString()
JoinFragment
toFromFragmentString
in class JoinFragment
public java.lang.String toWhereFragmentString()
JoinFragment
toWhereFragmentString
in class JoinFragment
public void addJoins(java.lang.String fromFragment, java.lang.String whereFragment)
JoinFragment
addJoins
in class JoinFragment
fromFragment
- The FROM clause fragmentwhereFragment
- The WHERE clause fragmentpublic JoinFragment copy()
JoinFragment
copy
in class JoinFragment
public void addCondition(java.lang.String alias, java.lang.String[] columns, java.lang.String condition)
public void addCrossJoin(java.lang.String tableName, java.lang.String alias)
JoinFragment
addCrossJoin
in class JoinFragment
tableName
- The name of the table to be joinedalias
- The alias to apply to the joined tablepublic void addCondition(java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns)
JoinFragment
addCondition
in class JoinFragment
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 boolean addCondition(java.lang.String condition)
addCondition
in class JoinFragment
condition
- public void addFromFragmentString(java.lang.String fromFragmentString)
public void clearWherePart()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.