Package org.hibernate.engine.internal
Class JoinHelper
- java.lang.Object
-
- org.hibernate.engine.internal.JoinHelper
-
public final class JoinHelper extends Object
Helper for dealing with joins.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 joinstatic 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.static String
getLHSTableName(AssociationType type, int propertyIndex, OuterJoinLoadable lhsPersister)
Determine the name of the table that is the left-hand-side of the join.static String[]
getRHSColumnNames(AssociationType type, SessionFactoryImplementor factory)
Get the columns of the associated table which are to be used in the join
-
-
-
Method Detail
-
getLHSColumnNames
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
- The association type for the association that represents the joinproperty
- The name of the property that represents the association/joinlhsPersister
- The persister for the left-hand side of the association/joinmapping
- The mapping (typically the SessionFactory).- Returns:
- The unqualified column names.
-
getLHSColumnNames
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
- The type representing the joinproperty
- The property index for the association typebegin
- ?lhsPersister
- The persister for the left-hand-side of the joinmapping
- The mapping object (typically the SessionFactory)- Returns:
- The columns for the left-hand-side of the join
-
getLHSTableName
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
- The type representing the joinpropertyIndex
- The property index for the typelhsPersister
- The persister for the left-hand-side of the join- Returns:
- The table name
-
getRHSColumnNames
public static String[] getRHSColumnNames(AssociationType type, SessionFactoryImplementor factory)
Get the columns of the associated table which are to be used in the join- Parameters:
type
- The typefactory
- The SessionFactory- Returns:
- The columns for the right-hand-side of the join
-
-