Class JoinPath


  • public class JoinPath
    extends java.lang.Object
    A join path represents a path, association and join type for performing a join with a query.
    Since:
    1.0.0
    See Also:
    QueryModel
    • Constructor Detail

      • JoinPath

        public JoinPath​(@NonNull
                        java.lang.String path,
                        @NonNull
                        Association[] associationPath,
                        @NonNull
                        Join.Type joinType,
                        @Nullable
                        java.lang.String alias)
        Default constructor.
        Parameters:
        path - The path
        associationPath - The association
        joinType - The join type
        alias - The alias
    • Method Detail

      • getAlias

        public java.util.Optional<java.lang.String> getAlias()
        The alias for the join path.
        Returns:
        The optional alias
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getAssociation

        @NonNull
        public Association getAssociation()
        Returns:
        The association
      • getAssociationPath

        public Association[] getAssociationPath()
        Returns:
        The association path.
      • getPath

        @NonNull
        public java.lang.String getPath()
        Returns:
        The association path
      • getJoinType

        @NonNull
        public Join.Type getJoinType()
        Returns:
        The join type
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • of

        public static JoinPath of​(Association... associationPath)
        Create a join path from the association path.
        Parameters:
        associationPath - The association path
        Returns:
        The join path
      • of

        public static JoinPath of​(java.lang.String alias,
                                  Association... associationPath)
        Create a join path from the association path.
        Parameters:
        alias - The alias to use
        associationPath - The association path
        Returns:
        The join path