Top Description Constructors Methods
org.hibernate.engine.internal

public final Class JoinHelper

extends Object
Class Inheritance
Imports
org.hibernate.engine.spi.Mapping, .SessionFactoryImplementor, org.hibernate.internal.util.StringHelper, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.persister.entity.Joinable, .OuterJoinLoadable, .PropertyMapping, org.hibernate.type.AssociationType

Helper for dealing with joins.
Author
Gavin King

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String[]

Returns:

The qualified column names.
getAliasedLHSColumnNames
(AssociationType
The association type for the association that represents the join
type
,
String
The left-hand side table alias
alias
,
int
The index of the property that represents the association/join
property
,
OuterJoinLoadable
The persister for the left-hand side of the association/join
lhsPersister
,
Mapping
The mapping (typically the SessionFactory).
mapping
)

Get the qualified (prefixed by alias) names of the columns of the owning entity which are to be used in the join

public static String[]

Returns:

The qualified column names.
getAliasedLHSColumnNames
(AssociationType
The association type for the association that represents the join
associationType
,
String
The left-hand side table alias
columnQualifier
,
int
The index of the property that represents the association/join
propertyIndex
,
int
The index for any nested (composites) attributes
begin
,
OuterJoinLoadable
The persister for the left-hand side of the association/join
lhsPersister
,
Mapping
The mapping (typically the SessionFactory).
mapping
)

Get the qualified (prefixed by alias) names of the columns of the owning entity which are to be used in the join

public static String[]

Returns:

The unqualified column names.
getLHSColumnNames
(AssociationType
The association type for the association that represents the join
type
,
int
The name of the property that represents the association/join
property
,
OuterJoinLoadable
The persister for the left-hand side of the association/join
lhsPersister
,
Mapping
The mapping (typically the SessionFactory).
mapping
)

Get the unqualified names of the columns of the owning entity which are to be used in the join.

public static String[]

Returns:

The columns for the left-hand-side of the join
getLHSColumnNames
(AssociationType
The type representing the join
type
,
int
The property index for the association type
property
,
int
?
begin
,
OuterJoinLoadable
The persister for the left-hand-side of the join
lhsPersister
,
Mapping
The mapping object (typically the SessionFactory)
mapping
)

Get the columns of the owning entity which are to be used in the join

public static String

Returns:

The table name
getLHSTableName
(AssociationType
The type representing the join
type
,
int
The property index for the type
propertyIndex
,
OuterJoinLoadable
The persister for the left-hand-side of the join
lhsPersister
)

Determine the name of the table that is the left-hand-side of the join.

public static String[]

Returns:

The columns for the right-hand-side of the join
getRHSColumnNames
(AssociationType
The type
type
,
SessionFactoryImplementor
The SessionFactory
factory
)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Get the columns of the associated table which are to be used in the join
private static String[]
toColumns(OuterJoinLoadable persister, String columnQualifier, int propertyIndex)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JoinHelperback to summary
private JoinHelper()

Method Detail

getAliasedLHSColumnNamesback to summary
public static String[] getAliasedLHSColumnNames(AssociationType type, String alias, int property, OuterJoinLoadable lhsPersister, Mapping mapping)

Get the qualified (prefixed by alias) names of the columns of the owning entity which are to be used in the join

Parameters
type:AssociationType

The association type for the association that represents the join

alias:String

The left-hand side table alias

property:int

The index of the property that represents the association/join

lhsPersister:OuterJoinLoadable

The persister for the left-hand side of the association/join

mapping:Mapping

The mapping (typically the SessionFactory).

Returns:String[]

The qualified column names.

getAliasedLHSColumnNamesback to summary
public static String[] getAliasedLHSColumnNames(AssociationType associationType, String columnQualifier, int propertyIndex, int begin, OuterJoinLoadable lhsPersister, Mapping mapping)

Get the qualified (prefixed by alias) names of the columns of the owning entity which are to be used in the join

Parameters
associationType:AssociationType

The association type for the association that represents the join

columnQualifier:String

The left-hand side table alias

propertyIndex:int

The index of the property that represents the association/join

begin:int

The index for any nested (composites) attributes

lhsPersister:OuterJoinLoadable

The persister for the left-hand side of the association/join

mapping:Mapping

The mapping (typically the SessionFactory).

Returns:String[]

The qualified column names.

getLHSColumnNamesback to summary
public static String[] getLHSColumnNames(AssociationType type, int property, OuterJoinLoadable lhsPersister, Mapping mapping)

Get the unqualified names of the columns of the owning entity which are to be used in the join.

Parameters
type:AssociationType

The association type for the association that represents the join

property:int

The name of the property that represents the association/join

lhsPersister:OuterJoinLoadable

The persister for the left-hand side of the association/join

mapping:Mapping

The mapping (typically the SessionFactory).

Returns:String[]

The unqualified column names.

getLHSColumnNamesback to summary
public static String[] getLHSColumnNames(AssociationType type, int property, int begin, OuterJoinLoadable lhsPersister, Mapping mapping)

Get the columns of the owning entity which are to be used in the join

Parameters
type:AssociationType

The type representing the join

property:int

The property index for the association type

begin:int

?

lhsPersister:OuterJoinLoadable

The persister for the left-hand-side of the join

mapping:Mapping

The mapping object (typically the SessionFactory)

Returns:String[]

The columns for the left-hand-side of the join

getLHSTableNameback to summary
public static String getLHSTableName(AssociationType type, int propertyIndex, OuterJoinLoadable lhsPersister)

Determine the name of the table that is the left-hand-side of the join. Usually this is the name of the main table from the left-hand-side persister. But that is not the case with property-refs.

Parameters
type:AssociationType

The type representing the join

propertyIndex:int

The property index for the type

lhsPersister:OuterJoinLoadable

The persister for the left-hand-side of the join

Returns:String

The table name

getRHSColumnNamesback to summary
public static String[] getRHSColumnNames(AssociationType type, SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Get the columns of the associated table which are to be used in the join

Parameters
type:AssociationType

The type

factory:SessionFactoryImplementor

The SessionFactory

Returns:String[]

The columns for the right-hand-side of the join

toColumnsback to summary
private static String[] toColumns(OuterJoinLoadable persister, String columnQualifier, int propertyIndex)