OuterJoinLoader
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | |
| private static class | JoinWalker.AssociationKey
Uniquely identifier a foreign key, so that we don't join it more than once, and create circularities |
| Modifier and Type | Field and Description |
|---|---|
| protected String[] | |
| protected final List | |
| protected int[] | |
| protected CollectionPersister[] | |
| protected String[] | |
| private final SessionFactoryImplementor | factory
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| private final LoadQueryInfluencers | |
| protected LockMode[] | |
| protected LockOptions | |
| protected EntityType[] | |
| protected int[] | |
| protected Loadable[] | |
| protected String | |
| protected String[] | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| protected | JoinWalker(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
Deprecated
as a consequence of
SessionFactoryImplementor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| private void | addAssociationToJoinTree(final AssociationType type, final String[] aliasedLhsColumns, final String alias, final PropertyPath path, final int currentDepth, final JoinType joinType)
Add on association (one-to-one, many-to-one, or a collection) to a list of associations to be fetched by outerjoin |
| private void | addAssociationToJoinTreeIfNecessary(final AssociationType type, final String[] aliasedLhsColumns, final String alias, final PropertyPath path, int currentDepth, final JoinType joinType)
Add on association (one-to-one, many-to-one, or a collection) to a list of associations to be fetched by outerjoin (if necessary) |
| protected static int | countCollectionPersisters(List<E> associations)
Count the number of instances of Joinable which are actually also instances of PersistentCollection which are being fetched by outer join |
| protected static int | countEntityPersisters(List<E> associations)
Count the number of instances of Joinable which are actually also instances of Loadable, or are one-to-many associations |
| protected String | |
| protected String | |
| public String[] | |
| public List | |
| public int[] | |
| public CollectionPersister[] | |
| public String[] | |
| protected Dialect | |
| protected SessionFactoryImplementor | |
| protected JoinType | Returns: type of join to use (org.,
org., or -1 to indicate no joining.The owner of the association. persister, final PropertyPath The path to the association path, int The property number representing the association. propertyNumber, AssociationType The association type. associationType, FetchMode The metadata-defined fetch mode. metadataFetchMode, CascadeStyle The metadata-defined cascade style. metadataCascadeStyle, String The owner table lhsTable, String[] The owner join columns lhsColumns, final boolean Is the association nullable. nullable, final int Current join depth currentDepth)Determine the appropriate type of join (if any) to use to fetch the given association. |
| protected JoinType | Returns: type of join to use (org.,
org., or -1 to indicate no joining.The association associationType. associationType, FetchMode The metadata-defined fetch mode. config, PropertyPath The path to the association path, String The owner table lhsTable, String[] The owner join columns lhsColumns, boolean Is the association nullable. nullable, int Current join depth currentDepth, CascadeStyle The metadata-defined cascade style. cascadeStyle)Determine the appropriate associationType of join (if any) to use to fetch the given association. |
| protected JoinType | getJoinType(boolean nullable, int currentDepth)
Use an inner join if it is a non-null association and this is the "first" join in a series |
| public LoadQueryInfluencers | |
| public LockMode[] | |
| public LockOptions | |
| public EntityType[] | |
| public int[] | |
| public Loadable[] | |
| public String | |
| public String[] | |
| protected String | |
| protected boolean | |
| protected void | |
| protected void | |
| protected void | initPersisters(final List<E> associations, final LockOptions lockOptions, final JoinWalker.
|
| protected boolean | isDuplicateAssociation(final String foreignKeyTable, final String[] foreignKeyColumns)
Used to detect circularities in the joined graph, note that this method is side-effecty |
| protected boolean | isDuplicateAssociation(final String lhsTable, final String[] lhsColumnNames, final AssociationType type)
Used to detect circularities in the joined graph, note that this method is side-effecty |
| protected boolean | isJoinable(final JoinType joinType, final Set<E> visitedAssociationKeys, final String lhsTable, final String[] lhsColumnNames, final AssociationType type, final int depth)
Should we join this association? |
| protected boolean | isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle)
Override on subclasses to enable or suppress joining of certain association types |
| protected boolean | isJoinedFetchEnabledInMapping(FetchMode config, AssociationType type)
Does the mapping, and Hibernate default semantics, specify that this association should be fetched by outer joining |
| protected boolean | |
| protected boolean | |
| protected static String | |
| protected final JoinFragment | mergeOuterJoins(List<E> associations)
Generate a sequence of LEFT OUTER JOIN clauses for the given associations. |
| protected String | |
| protected static String | |
| protected final String | selectString(List<E> associations)
Generate a select list of columns containing all properties of the entity classes |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| protected final void | walkCollectionTree(QueryableCollection persister, String alias)
For a collection role, return a list of associations to be fetched by outerjoin |
| private void | walkCollectionTree(final QueryableCollection persister, final String alias, final PropertyPath path, final int currentDepth)
For a collection role, return a list of associations to be fetched by outerjoin |
| private void | walkComponentTree(final CompositeType
The component type to be walked. componentType, final int The property number for the component property (relative to
persister). propertyNumber, int todo unknown begin, final OuterJoinLoadable The owner of the component property persister, final String The root alias alias, final PropertyPath The property access path path, final int The current join depth currentDepth)For a component, add to a list of associations to be fetched by outerjoin |
| private void | walkCompositeElementTree(final CompositeType compositeType, final String[] cols, final QueryableCollection persister, final String alias, final PropertyPath path, final int currentDepth)
For a composite element, add to a list of associations to be fetched by outerjoin |
| private void | walkEntityAssociationTree(final AssociationType
The type representing the association to be
processed. associationType, final OuterJoinLoadable The owner of the association to be processed. persister, final int The property number for the association
(relative to the persister). propertyNumber, final String The entity alias alias, final PropertyPath The path to the association path, final boolean is the association nullable (which I think is supposed
to indicate inner/outer join semantics). nullable, final int The current join depth currentDepth)Process a particular association owned by the entity |
| protected final void | walkEntityTree(OuterJoinLoadable
The persister representing the entity to be walked. persister, String The (root) alias to use for this entity/persister. alias)Walk the association tree for an entity, adding associations which should
be join fetched to the |
| private void | walkEntityTree(final OuterJoinLoadable
The persister representing the entity to be walked. persister, final String The (root) alias to use for this entity/persister. alias, final PropertyPath The property path to the entity being walked path, final int The current join depth currentDepth)Walk the association tree for an entity, adding associations which should
be join fetched to the |
| protected StringBuilder | whereString(String alias, String[] columnNames, int batchSize)
Render the where condition for a (batch) load by identifier / collection key |
| protected StringBuilder |
| aliases | back to summary |
|---|---|
| protected String[] aliases | |
| associations | back to summary |
|---|---|
| protected final List<E> associations | |
| collectionOwners | back to summary |
|---|---|
| protected int[] collectionOwners | |
| collectionPersisters | back to summary |
|---|---|
| protected CollectionPersister[] collectionPersisters | |
| collectionSuffixes | back to summary |
|---|---|
| protected String[] collectionSuffixes | |
| factory | back to summary |
|---|---|
| private final SessionFactoryImplementor factory
Deprecated as a consequence of | |
| loadQueryInfluencers | back to summary |
|---|---|
| private final LoadQueryInfluencers loadQueryInfluencers | |
| lockModeArray | back to summary |
|---|---|
| protected LockMode[] lockModeArray | |
| lockOptions | back to summary |
|---|---|
| protected LockOptions lockOptions | |
| ownerAssociationTypes | back to summary |
|---|---|
| protected EntityType[] ownerAssociationTypes | |
| owners | back to summary |
|---|---|
| protected int[] owners | |
| persisters | back to summary |
|---|---|
| protected Loadable[] persisters | |
| sql | back to summary |
|---|---|
| protected String sql | |
| suffixes | back to summary |
|---|---|
| protected String[] suffixes | |
| visitedAssociationKeys | back to summary |
|---|---|
| private final Set<E> visitedAssociationKeys | |
| JoinWalker | back to summary |
|---|---|
| protected JoinWalker(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
Deprecated as a consequence of | |
| addAssociationToJoinTree | back to summary |
|---|---|
| private void addAssociationToJoinTree(final AssociationType type, final String[] aliasedLhsColumns, final String alias, final PropertyPath path, final int currentDepth, final JoinType joinType) throws MappingException Add on association (one-to-one, many-to-one, or a collection) to a list of associations to be fetched by outerjoin | |
| addAssociationToJoinTreeIfNecessary | back to summary |
|---|---|
| private void addAssociationToJoinTreeIfNecessary(final AssociationType type, final String[] aliasedLhsColumns, final String alias, final PropertyPath path, int currentDepth, final JoinType joinType) throws MappingException Add on association (one-to-one, many-to-one, or a collection) to a list of associations to be fetched by outerjoin (if necessary) | |
| countCollectionPersisters | back to summary |
|---|---|
| protected static int countCollectionPersisters(List<E> associations) throws MappingException Count the number of instances of Joinable which are actually also instances of PersistentCollection which are being fetched by outer join | |
| countEntityPersisters | back to summary |
|---|---|
| protected static int countEntityPersisters(List<E> associations) throws MappingException Count the number of instances of Joinable which are actually also instances of Loadable, or are one-to-many associations | |
| generateRootAlias | back to summary |
|---|---|
| protected String generateRootAlias(final String description) | |
| generateTableAlias | back to summary |
|---|---|
| protected String generateTableAlias(final int n, final PropertyPath path, final Joinable joinable) | |
| getAliases | back to summary |
|---|---|
| public String[] getAliases() | |
| getAssociations | back to summary |
|---|---|
| public List | |
| getCollectionOwners | back to summary |
|---|---|
| public int[] getCollectionOwners() | |
| getCollectionPersisters | back to summary |
|---|---|
| public CollectionPersister[] getCollectionPersisters() | |
| getCollectionSuffixes | back to summary |
|---|---|
| public String[] getCollectionSuffixes() | |
| getDialect | back to summary |
|---|---|
| protected Dialect getDialect() | |
| getFactory | back to summary |
|---|---|
| protected SessionFactoryImplementor getFactory()
Deprecated as a consequence of | |
| getJoinType | back to summary |
|---|---|
| protected JoinType getJoinType(OuterJoinLoadable persister, final PropertyPath path, int propertyNumber, AssociationType associationType, FetchMode metadataFetchMode, CascadeStyle metadataCascadeStyle, String lhsTable, String[] lhsColumns, final boolean nullable, final int currentDepth) throws MappingException Determine the appropriate type of join (if any) to use to fetch the given association.
| |
| getJoinType | back to summary |
|---|---|
| protected JoinType getJoinType(AssociationType associationType, FetchMode config, PropertyPath path, String lhsTable, String[] lhsColumns, boolean nullable, int currentDepth, CascadeStyle cascadeStyle) throws MappingException Determine the appropriate associationType of join (if any) to use to fetch the given association.
| |
| getJoinType | back to summary |
|---|---|
| protected JoinType getJoinType(boolean nullable, int currentDepth) Use an inner join if it is a non-null association and this is the "first" join in a series | |
| getLoadQueryInfluencers | back to summary |
|---|---|
| public LoadQueryInfluencers getLoadQueryInfluencers() | |
| getLockModeArray | back to summary |
|---|---|
| public LockMode[] getLockModeArray() | |
| getLockModeOptions | back to summary |
|---|---|
| public LockOptions getLockModeOptions() | |
| getOwnerAssociationTypes | back to summary |
|---|---|
| public EntityType[] getOwnerAssociationTypes() | |
| getOwners | back to summary |
|---|---|
| public int[] getOwners() | |
| getPersisters | back to summary |
|---|---|
| public Loadable[] getPersisters() | |
| getSQLString | back to summary |
|---|---|
| public String getSQLString() | |
| getSuffixes | back to summary |
|---|---|
| public String[] getSuffixes() | |
| getWithClause | back to summary |
|---|---|
| protected String getWithClause(PropertyPath path) | |
| hasRestriction | back to summary |
|---|---|
| protected boolean hasRestriction(PropertyPath path) | |
| initPersisters | back to summary |
|---|---|
| protected void initPersisters(final List<E> associations, final LockMode lockMode) throws MappingException | |
| initPersisters | back to summary |
|---|---|
| protected void initPersisters(final List<E> associations, final LockOptions lockOptions) throws MappingException | |
| initPersisters | back to summary |
|---|---|
| protected void initPersisters(final List<E> associations, final LockOptions lockOptions, final JoinWalker. | |
| isDuplicateAssociation | back to summary |
|---|---|
| protected boolean isDuplicateAssociation(final String foreignKeyTable, final String[] foreignKeyColumns) Used to detect circularities in the joined graph, note that this method is side-effecty | |
| isDuplicateAssociation | back to summary |
|---|---|
| protected boolean isDuplicateAssociation(final String lhsTable, final String[] lhsColumnNames, final AssociationType type) Used to detect circularities in the joined graph, note that this method is side-effecty | |
| isJoinable | back to summary |
|---|---|
| protected boolean isJoinable(final JoinType joinType, final Set<E> visitedAssociationKeys, final String lhsTable, final String[] lhsColumnNames, final AssociationType type, final int depth) Should we join this association? | |
| isJoinedFetchEnabled | back to summary |
|---|---|
| protected boolean isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle) Override on subclasses to enable or suppress joining of certain association types | |
| isJoinedFetchEnabledInMapping | back to summary |
|---|---|
| protected boolean isJoinedFetchEnabledInMapping(FetchMode config, AssociationType type) throws MappingException Does the mapping, and Hibernate default semantics, specify that this association should be fetched by outer joining | |
| isTooDeep | back to summary |
|---|---|
| protected boolean isTooDeep(int currentDepth) | |
| isTooManyCollections | back to summary |
|---|---|
| protected boolean isTooManyCollections() | |
| mergeOrderings | back to summary |
|---|---|
| protected static String mergeOrderings(String ordering1, String ordering2) | |
| mergeOuterJoins | back to summary |
|---|---|
| protected final JoinFragment mergeOuterJoins(List<E> associations) throws MappingException Generate a sequence of LEFT OUTER JOIN clauses for the given associations. | |
| orderBy | back to summary |
|---|---|
| protected String orderBy(final List<E> associations, final String orderBy) | |
| orderBy | back to summary |
|---|---|
| protected static String orderBy(List<E> associations) throws MappingException Get the order by string required for collection fetching | |
| selectString | back to summary |
|---|---|
| protected final String selectString(List<E> associations) throws MappingException Generate a select list of columns containing all properties of the entity classes | |
| setAliases | back to summary |
|---|---|
| public void setAliases(String[] aliases) | |
| setCollectionOwners | back to summary |
|---|---|
| public void setCollectionOwners(int[] collectionOwners) | |
| setCollectionPersisters | back to summary |
|---|---|
| public void setCollectionPersisters(CollectionPersister[] collectionPersisters) | |
| setCollectionSuffixes | back to summary |
|---|---|
| public void setCollectionSuffixes(String[] collectionSuffixes) | |
| setOwnerAssociationTypes | back to summary |
|---|---|
| public void setOwnerAssociationTypes(EntityType[] ownerAssociationType) | |
| setOwners | back to summary |
|---|---|
| public void setOwners(int[] owners) | |
| setPersisters | back to summary |
|---|---|
| public void setPersisters(Loadable[] persisters) | |
| setSql | back to summary |
|---|---|
| public void setSql(String sql) | |
| setSuffixes | back to summary |
|---|---|
| public void setSuffixes(String[] suffixes) | |
| walkCollectionTree | back to summary |
|---|---|
| protected final void walkCollectionTree(QueryableCollection persister, String alias) throws MappingException For a collection role, return a list of associations to be fetched by outerjoin | |
| walkCollectionTree | back to summary |
|---|---|
| private void walkCollectionTree(final QueryableCollection persister, final String alias, final PropertyPath path, final int currentDepth) throws MappingException For a collection role, return a list of associations to be fetched by outerjoin | |
| walkComponentTree | back to summary |
|---|---|
| private void walkComponentTree(final CompositeType componentType, final int propertyNumber, int begin, final OuterJoinLoadable persister, final String alias, final PropertyPath path, final int currentDepth) throws MappingException For a component, add to a list of associations to be fetched by outerjoin
| |
| walkCompositeElementTree | back to summary |
|---|---|
| private void walkCompositeElementTree(final CompositeType compositeType, final String[] cols, final QueryableCollection persister, final String alias, final PropertyPath path, final int currentDepth) throws MappingException For a composite element, add to a list of associations to be fetched by outerjoin | |
| walkEntityAssociationTree | back to summary |
|---|---|
| private void walkEntityAssociationTree(final AssociationType associationType, final OuterJoinLoadable persister, final int propertyNumber, final String alias, final PropertyPath path, final boolean nullable, final int currentDepth) throws MappingException Process a particular association owned by the entity
| |
| walkEntityTree | back to summary |
|---|---|
| protected final void walkEntityTree(OuterJoinLoadable persister, String alias) throws MappingException Walk the association tree for an entity, adding associations which should
be join fetched to the
| |
| walkEntityTree | back to summary |
|---|---|
| private void walkEntityTree(final OuterJoinLoadable persister, final String alias, final PropertyPath path, final int currentDepth) throws MappingException Walk the association tree for an entity, adding associations which should
be join fetched to the
| |
| whereString | back to summary |
|---|---|
| protected StringBuilder whereString(String alias, String[] columnNames, int batchSize) Render the where condition for a (batch) load by identifier / collection key | |
| whereString | back to summary |
|---|---|
| protected StringBuilder whereString(String alias, String[] columnNames, boolean[] valueNullnes, int batchSize) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final JoinWalker. |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| NO_CALLBACK | back to summary |
|---|---|
| public static final JoinWalker. | |
| associationProcessed | back to summary |
|---|---|
| public void associationProcessed(OuterJoinableAssociation oja, int position) | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public int |
| columns | back to summary |
|---|---|
| private String[] columns | |
| table | back to summary |
|---|---|
| private String table | |
| AssociationKey | back to summary |
|---|---|
| private AssociationKey(String[] columns, String table) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |