Top Description Fields Constructors Methods
org.hibernate.sql

public Class QueryJoinFragment

extends JoinFragment
Class Inheritance
Imports
org.hibernate.dialect.Dialect, org.hibernate.internal.util.StringHelper

A join that appears in a translated HQL query
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private StringBuilder
private StringBuilder
private Dialect
private boolean
Inherited from org.hibernate.sql.JoinFragment:
FULL_JOININNER_JOINLEFT_OUTER_JOINRIGHT_OUTER_JOIN

Constructor Summary

AccessConstructor and Description
public
QueryJoinFragment(Dialect dialect, boolean useThetaStyleInnerJoins)

Method Summary

Modifier and TypeMethod and Description
public void
addCondition(String alias, String[] columns, String condition)

public void
addCondition(String
The alias of the joined table
alias
,
String[]
The names of the columns which reference the joined table
fkColumns
,
String[]
The columns in the joined table being referenced
pkColumns
)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Adds a condition to the join fragment.
public void
addCondition(String alias, String[][] fkColumns, String[] pkColumns)

public boolean

Returns:

true if the condition was added, false if it was already in the fragment.
addCondition
(String condition)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Add the condition string to the join fragment.
public void
addCrossJoin(String
The name of the table to be joined
tableName
,
String
The alias to apply to the joined table
alias
)

Implements abstract org.hibernate.sql.JoinFragment.addCrossJoin.

Adds a cross join to the specified table.
public void
addFromFragmentString(String fromFragmentString)

public void
addJoin(String
The name of the table to be joined
tableName
,
String
The alias to apply to the joined table
alias
,
String[]
The names of the columns which reference the joined table
fkColumns
,
String[]
The columns in the joined table being referenced
pkColumns
,
JoinType
The type of join
joinType
)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Adds a join.
public void
addJoin(String
The name of the table to be joined
tableName
,
String
The alias to apply to the joined table
alias
,
String[]
The names of the columns which reference the joined table
fkColumns
,
String[]
The columns in the joined table being referenced
pkColumns
,
JoinType
The type of join
joinType
,
String
The additional ON fragment
on
)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Adds a join, with an additional ON clause fragment
public void
addJoin(String tableName, String alias, String[][] fkColumns, String[] pkColumns, JoinType joinType)

public void
addJoin(String
The name of the table to be joined
tableName
,
String
The alias to apply to the joined table
alias
,
String[][]
The names of the columns which reference the joined table
fkColumns
,
String[]
The columns in the joined table being referenced
pkColumns
,
JoinType
The type of join
joinType
,
String
The additional ON fragment
on
)

Overrides org.hibernate.sql.JoinFragment.addJoin.

Adds a join, with an additional ON clause fragment
private void
addJoin(String tableName, String alias, String concreteAlias, String[] fkColumns, String[] pkColumns, JoinType joinType, String on)

private void
addJoin(String tableName, String alias, String concreteAlias, String[][] fkColumns, String[] pkColumns, JoinType joinType, String on)

public void
addJoins(String
The FROM clause fragment
fromFragment
,
String
The WHERE clause fragment
whereFragment
)

Implements abstract org.hibernate.sql.JoinFragment.addJoins.

Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments
public void
public JoinFragment
copy()

Implements abstract org.hibernate.sql.JoinFragment.copy.

Make a copy.
public String
toFromFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toFromFragmentString.

Render this fragment to its FROM clause portion
public String
toWhereFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toWhereFragmentString.

Render this fragment to its WHERE clause portion
Inherited from org.hibernate.sql.JoinFragment:
addConditionaddFragmenthasFilterConditionhasThetaJoinssetHasFilterConditionsetHasThetaJoins

Field Detail

afterFromback to summary
private StringBuilder afterFrom
afterWhereback to summary
private StringBuilder afterWhere
dialectback to summary
private Dialect dialect
useThetaStyleInnerJoinsback to summary
private boolean useThetaStyleInnerJoins

Constructor Detail

QueryJoinFragmentback to summary
public QueryJoinFragment(Dialect dialect, boolean useThetaStyleInnerJoins)

Method Detail

addConditionback to summary
public void addCondition(String alias, String[] columns, String condition)
addConditionback to summary
public void addCondition(String alias, String[] fkColumns, String[] pkColumns)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Doc from org.hibernate.sql.JoinFragment.addCondition.

Adds a condition to the join fragment.

Parameters
alias:String

The alias of the joined table

fkColumns:String[]

The names of the columns which reference the joined table

pkColumns:String[]

The columns in the joined table being referenced

addConditionback to summary
public void addCondition(String alias, String[][] fkColumns, String[] pkColumns)
addConditionback to summary
public boolean addCondition(String condition)

Implements abstract org.hibernate.sql.JoinFragment.addCondition.

Add the condition string to the join fragment.

Returns:boolean

true if the condition was added, false if it was already in the fragment.

addCrossJoinback to summary
public void addCrossJoin(String tableName, String alias)

Implements abstract org.hibernate.sql.JoinFragment.addCrossJoin.

Doc from org.hibernate.sql.JoinFragment.addCrossJoin.

Adds a cross join to the specified table.

Parameters
tableName:String

The name of the table to be joined

alias:String

The alias to apply to the joined table

addFromFragmentStringback to summary
public void addFromFragmentString(String fromFragmentString)
addJoinback to summary
public void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType joinType)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Doc from org.hibernate.sql.JoinFragment.addJoin.

Adds a join.

Parameters
tableName:String

The name of the table to be joined

alias:String

The alias to apply to the joined table

fkColumns:String[]

The names of the columns which reference the joined table

pkColumns:String[]

The columns in the joined table being referenced

joinType:JoinType

The type of join

addJoinback to summary
public void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType joinType, String on)

Implements abstract org.hibernate.sql.JoinFragment.addJoin.

Doc from org.hibernate.sql.JoinFragment.addJoin.

Adds a join, with an additional ON clause fragment

Parameters
tableName:String

The name of the table to be joined

alias:String

The alias to apply to the joined table

fkColumns:String[]

The names of the columns which reference the joined table

pkColumns:String[]

The columns in the joined table being referenced

joinType:JoinType

The type of join

on:String

The additional ON fragment

addJoinback to summary
public void addJoin(String tableName, String alias, String[][] fkColumns, String[] pkColumns, JoinType joinType)
addJoinback to summary
public void addJoin(String tableName, String alias, String[][] fkColumns, String[] pkColumns, JoinType joinType, String on)

Overrides org.hibernate.sql.JoinFragment.addJoin.

Doc from org.hibernate.sql.JoinFragment.addJoin.

Adds a join, with an additional ON clause fragment

Parameters
tableName:String

The name of the table to be joined

alias:String

The alias to apply to the joined table

fkColumns:String[][]

The names of the columns which reference the joined table

pkColumns:String[]

The columns in the joined table being referenced

joinType:JoinType

The type of join

on:String

The additional ON fragment

addJoinback to summary
private void addJoin(String tableName, String alias, String concreteAlias, String[] fkColumns, String[] pkColumns, JoinType joinType, String on)
addJoinback to summary
private void addJoin(String tableName, String alias, String concreteAlias, String[][] fkColumns, String[] pkColumns, JoinType joinType, String on)
addJoinsback to summary
public void addJoins(String fromFragment, String whereFragment)

Implements abstract org.hibernate.sql.JoinFragment.addJoins.

Doc from org.hibernate.sql.JoinFragment.addJoins.

Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments

Parameters
fromFragment:String

The FROM clause fragment

whereFragment:String

The WHERE clause fragment

clearWherePartback to summary
public void clearWherePart()
copyback to summary
public JoinFragment copy()

Implements abstract org.hibernate.sql.JoinFragment.copy.

Doc from org.hibernate.sql.JoinFragment.copy.

Make a copy.

Returns:JoinFragment

The copy.

toFromFragmentStringback to summary
public String toFromFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toFromFragmentString.

Doc from org.hibernate.sql.JoinFragment.toFromFragmentString.

Render this fragment to its FROM clause portion

Returns:String

The FROM clause portion of this fragment

toWhereFragmentStringback to summary
public String toWhereFragmentString()

Implements abstract org.hibernate.sql.JoinFragment.toWhereFragmentString.

Doc from org.hibernate.sql.JoinFragment.toWhereFragmentString.

Render this fragment to its WHERE clause portion

Returns:String

The WHERE clause portion of this fragment