Package org.hibernate.sql
Class Sybase11JoinFragment
- java.lang.Object
-
- org.hibernate.sql.JoinFragment
-
- org.hibernate.sql.Sybase11JoinFragment
-
public class Sybase11JoinFragment extends JoinFragment
An old Sybase-style join (before Sybase supported the ANSI style "inner join" etc syntax) This is needed for Sybase 11.9.2 and earlier, using the HQL 2.* syntax with Collections.
-
-
Field Summary
-
Fields inherited from class org.hibernate.sql.JoinFragment
FULL_JOIN, INNER_JOIN, LEFT_OUTER_JOIN, RIGHT_OUTER_JOIN
-
-
Constructor Summary
Constructors Constructor Description Sybase11JoinFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addCondition(java.lang.String condition)
Adds a free-form condition fragmentvoid
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)
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 fragmentvoid
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 fragmentvoid
addJoins(java.lang.String fromFragment, java.lang.String whereFragment)
Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragmentsJoinFragment
copy()
Make a copy.java.lang.String
toFromFragmentString()
Render this fragment to its FROM clause portionjava.lang.String
toWhereFragmentString()
Render this fragment to its WHERE clause portion-
Methods inherited from class org.hibernate.sql.JoinFragment
addCondition, addFragment, hasFilterCondition, hasThetaJoins, setHasFilterCondition, setHasThetaJoins
-
-
-
-
Method Detail
-
addJoin
public void addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, JoinType joinType)
Description copied from class:JoinFragment
Adds a join.- Specified by:
addJoin
in classJoinFragment
- Parameters:
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 join
-
addJoin
public void addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[][] fkColumns, java.lang.String[] pkColumns, JoinType joinType)
-
toFromFragmentString
public java.lang.String toFromFragmentString()
Description copied from class:JoinFragment
Render this fragment to its FROM clause portion- Specified by:
toFromFragmentString
in classJoinFragment
- Returns:
- The FROM clause portion of this fragment
-
toWhereFragmentString
public java.lang.String toWhereFragmentString()
Description copied from class:JoinFragment
Render this fragment to its WHERE clause portion- Specified by:
toWhereFragmentString
in classJoinFragment
- Returns:
- The WHERE clause portion of this fragment
-
addJoins
public void addJoins(java.lang.String fromFragment, java.lang.String whereFragment)
Description copied from class:JoinFragment
Free-form form of adding theta-style joins taking the necessary FROM and WHERE clause fragments- Specified by:
addJoins
in classJoinFragment
- Parameters:
fromFragment
- The FROM clause fragmentwhereFragment
- The WHERE clause fragment
-
copy
public JoinFragment copy()
Description copied from class:JoinFragment
Make a copy.- Specified by:
copy
in classJoinFragment
- Returns:
- The copy.
-
addCondition
public void addCondition(java.lang.String alias, java.lang.String[] columns, java.lang.String condition)
-
addCrossJoin
public void addCrossJoin(java.lang.String tableName, java.lang.String alias)
Description copied from class:JoinFragment
Adds a cross join to the specified table.- Specified by:
addCrossJoin
in classJoinFragment
- Parameters:
tableName
- The name of the table to be joinedalias
- The alias to apply to the joined table
-
addCondition
public void addCondition(java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns)
Description copied from class:JoinFragment
Adds a condition to the join fragment.- Specified by:
addCondition
in classJoinFragment
- Parameters:
alias
- The alias of the joined tablefkColumns
- The names of the columns which reference the joined tablepkColumns
- The columns in the joined table being referenced
-
addCondition
public boolean addCondition(java.lang.String condition)
Description copied from class:JoinFragment
Adds a free-form condition fragment- Specified by:
addCondition
in classJoinFragment
- Parameters:
condition
- The fragment- Returns:
true
if the condition was added
-
addFromFragmentString
public void addFromFragmentString(java.lang.String fromFragmentString)
-
addJoin
public void addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, JoinType joinType, java.lang.String on)
Description copied from class:JoinFragment
Adds a join, with an additional ON clause fragment- Specified by:
addJoin
in classJoinFragment
- Parameters:
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 fragment
-
addJoin
public void addJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[][] fkColumns, java.lang.String[] pkColumns, JoinType joinType, java.lang.String on)
Description copied from class:JoinFragment
Adds a join, with an additional ON clause fragment- Overrides:
addJoin
in classJoinFragment
- Parameters:
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 fragment
-
-