Interface TableGroupJoinProducer

    • Method Detail

      • isSimpleJoinPredicate

        boolean isSimpleJoinPredicate​(Predicate predicate)
        Returns whether the given predicate is a simple join predicate for this attribute. This is useful to understand if a predicate has additional conjunctions other than the FK related predicate.
      • createTableGroupJoin

        TableGroupJoin createTableGroupJoin​(NavigablePath navigablePath,
                                            TableGroup lhs,
                                            String explicitSourceAlias,
                                            SqlAliasBase explicitSqlAliasBase,
                                            SqlAstJoinType sqlAstJoinType,
                                            boolean fetched,
                                            boolean addsPredicate,
                                            SqlAstCreationState creationState)
        Create a TableGroupJoin.
        Parameters:
        navigablePath - The NavigablePath to the join
        lhs - The join's (L)eft-(H)and (S)ide
        explicitSqlAliasBase - A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState
        sqlAstJoinType - An explicit join-type. May be null to signal that the join is for an implicit path.
        addsPredicate - Indicates there are explicit, additional predicates (from an SQM tree ON/WITH clause)
      • createRootTableGroupJoin

        TableGroup createRootTableGroupJoin​(NavigablePath navigablePath,
                                            TableGroup lhs,
                                            String explicitSourceAlias,
                                            SqlAliasBase explicitSqlAliasBase,
                                            SqlAstJoinType sqlAstJoinType,
                                            boolean fetched,
                                            Consumer<Predicate> predicateConsumer,
                                            SqlAstCreationState creationState)
        Create the "join", but return a TableGroup. Intended for creating sub-query correlations. E.g., given
             from SomeEntity e
             where exists (
                 select 1
                 from AnotherEntity a
                 where e.association.attr = 1
             )
         
        We call this for the `e.association` path.
        Parameters:
        navigablePath - The NavigablePath to the join
        lhs - The join's (L)eft-(H)and (S)ide
        explicitSqlAliasBase - A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState
        sqlAstJoinType - An explicit join-type. May be null to signal that the join is for an implicit path.
        predicateConsumer - Consumer for additional predicates from the producer's mapping.