public class ANSIJoinFragment extends JoinFragment
FULL_JOIN, INNER_JOIN, LEFT_OUTER_JOIN, RIGHT_OUTER_JOIN
Constructor and Description |
---|
ANSIJoinFragment() |
Modifier and Type | Method and Description |
---|---|
boolean |
addCondition(String condition)
Adds a free-form condition fragment
|
void |
addCondition(String alias,
String[] columns,
String condition)
Adds a condition to the join fragment.
|
void |
addCondition(String alias,
String[] fkColumns,
String[] pkColumns)
Adds a condition to the join fragment.
|
void |
addCrossJoin(String tableName,
String alias)
Adds a cross join to the specified table.
|
void |
addFromFragmentString(String fromFragmentString)
Adds an externally built join fragment.
|
void |
addJoin(String rhsTableName,
String rhsAlias,
String[][] lhsColumns,
String[] rhsColumns,
JoinType joinType,
String on)
Adds a join, with an additional ON clause fragment
|
void |
addJoin(String tableName,
String alias,
String[] fkColumns,
String[] pkColumns,
JoinType joinType)
Adds a join, represented by the given information, to the fragment.
|
void |
addJoin(String rhsTableName,
String rhsAlias,
String[] lhsColumns,
String[] rhsColumns,
JoinType joinType,
String on)
Adds a join, represented by the given information, to the fragment.
|
void |
addJoins(String fromFragment,
String whereFragment)
Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments
|
JoinFragment |
copy()
Make a copy.
|
String |
toFromFragmentString()
Render this fragment to its FROM clause portion
|
String |
toWhereFragmentString()
Render this fragment to its WHERE clause portion
|
addCondition, addFragment, hasFilterCondition, hasThetaJoins, setHasFilterCondition, setHasThetaJoins
public void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType joinType)
addJoin
in class JoinFragment
tableName
- The name of the table being joined.alias
- The alias applied to the table being joined.fkColumns
- The columns (from the table being joined) used to define the join-restriction (the ON)pkColumns
- The columns (from the table being joined to) used to define the join-restriction (the ON)joinType
- The type of join to produce (INNER, etc).public void addJoin(String rhsTableName, String rhsAlias, String[] lhsColumns, String[] rhsColumns, JoinType joinType, String on)
addJoin
in class JoinFragment
rhsTableName
- The name of the table being joined (the RHS table).rhsAlias
- The alias applied to the table being joined (the alias for the RHS table).lhsColumns
- The columns (from the table being joined) used to define the join-restriction (the ON). These
are the LHS columns, and are expected to be qualified.rhsColumns
- The columns (from the table being joined to) used to define the join-restriction (the ON). These
are the RHS columns and are expected to *not* be qualified.joinType
- The type of join to produce (INNER, etc).on
- Any extra join restrictionspublic void addJoin(String rhsTableName, String rhsAlias, String[][] lhsColumns, String[] rhsColumns, JoinType joinType, String on)
JoinFragment
addJoin
in class JoinFragment
rhsTableName
- The name of the table to be joinedrhsAlias
- The alias to apply to the joined tablelhsColumns
- The names of the columns which reference the joined tablerhsColumns
- The columns in the joined table being referencedjoinType
- The type of joinon
- The additional ON fragmentpublic String toFromFragmentString()
JoinFragment
toFromFragmentString
in class JoinFragment
public String toWhereFragmentString()
JoinFragment
toWhereFragmentString
in class JoinFragment
public void addJoins(String fromFragment, 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(String alias, String[] columns, String condition)
[alias.[column] = [condition]
alias
- The alias to apply to column(s)columns
- The columns to apply restrictioncondition
- The restriction conditionpublic void addCrossJoin(String tableName, 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(String alias, String[] fkColumns, 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(String condition)
JoinFragment
addCondition
in class JoinFragment
condition
- The fragmenttrue
if the condition was addedpublic void addFromFragmentString(String fromFragmentString)
fromFragmentString
- The join fragment stringCopyright © 2019 JBoss by Red Hat. All rights reserved.