Interface HasJoins<R,​RC>

  • Type Parameters:
    R - Return type for all joins except cross join
    RC - Return type for cross join
    All Known Subinterfaces:
    JoinBuilder1<T0>, JoinBuilder2<T0,​T1>, JoinBuilder3<T0,​T1,​T2>, JoinBuilder4<T0,​T1,​T2,​T3>, JoinBuilder5<T0,​T1,​T2,​T3,​T4>, JoinBuilder6<T0,​T1,​T2,​T3,​T4,​T5>, JoinBuilder7<T0,​T1,​T2,​T3,​T4,​T5,​T6>, JoinBuilder8<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7>, JoinBuilder9<T0,​T1,​T2,​T3,​T4,​T5,​T6,​T7,​T8>

    public interface HasJoins<R,​RC>
    This interface contains the the supported join operations of Speedment.
    Since:
    3.0.23
    Author:
    Per Minborg
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <ENTITY> RC crossJoin​(com.speedment.runtime.config.identifier.TableIdentifier<ENTITY> joinedTable)
      Adds the provided joinedTable to the collection of joined tables.
      <ENTITY> R innerJoinOn​(com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,​?> joinedField)
      Adds the provided joinedField to the collection of joined column/tables.
      <ENTITY> R leftJoinOn​(com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,​?> joinedField)
      Adds the provided joinedField to the collection of joined column/tables.
      <ENTITY> R rightJoinOn​(com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,​?> joinedField)
      Adds the provided joinedField to the collection of joined column/tables.
    • Method Detail

      • innerJoinOn

        <ENTITY> R innerJoinOn​(com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,​?> joinedField)
        Adds the provided joinedField to the collection of joined column/tables. Elements are joined from the table of the provided joinedField using an INNER JOIN whereby rows from two tables are present only if there is a match between the joining columns. Thus, rows that do not have matches in the joining columns will not be present in the result.
        Type Parameters:
        ENTITY - entity type
        Parameters:
        joinedField - to add to the current join builder
        Returns:
        a builder where the provided joinedField is added
        Throws:
        NullPointerException - if the provided joinedField is null
      • leftJoinOn

        <ENTITY> R leftJoinOn​(com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,​?> joinedField)
        Adds the provided joinedField to the collection of joined column/tables. Elements are joined from the table of the provided joinedField using an LEFT JOIN whereby rows from two tables are present either if there is a match between the joining columns or for each row from previously existing table(s).

        Unmatched rows will have entities from the table in the given joinedField set to null

        Type Parameters:
        ENTITY - entity type
        Parameters:
        joinedField - to add to the current join builder
        Returns:
        a builder where the provided joinedField is added
        Throws:
        NullPointerException - if the provided joinedField is null
      • rightJoinOn

        <ENTITY> R rightJoinOn​(com.speedment.runtime.field.trait.HasComparableOperators<ENTITY,​?> joinedField)
        Adds the provided joinedField to the collection of joined column/tables. Elements are joined from the table of the provided joinedField using an RIGHT JOIN whereby rows from two tables are present either if there is a match between the joining columns or for each row from the table for the provided joinedField.

        Unmatched rows will have entities from the table in the given joinedField set to null

        Type Parameters:
        ENTITY - entity type
        Parameters:
        joinedField - to add to the current join builder
        Returns:
        a builder where the provided joinedField is added
        Throws:
        NullPointerException - if the provided joinedField is null
      • crossJoin

        <ENTITY> RC crossJoin​(com.speedment.runtime.config.identifier.TableIdentifier<ENTITY> joinedTable)
        Adds the provided joinedTable to the collection of joined tables. Elements are joined from the table of the provided joinedTable using an CROSS JOIN whereby all combination of rows using all tables(s) are produced.
        Type Parameters:
        ENTITY - entity type
        Parameters:
        joinedTable - to add to the current join builder
        Returns:
        a builder where the provided joinedField is added
        Throws:
        NullPointerException - if the provided joinedField is null