Package st.orm

Enum Class DefaultJoinType

All Implemented Interfaces:
Serializable, Comparable<DefaultJoinType>, Constable, JoinType

public enum DefaultJoinType extends Enum<DefaultJoinType> implements JoinType
Default implementation of the JoinType interface used to represent the default join types.
  • Enum Constant Details

  • Method Details

    • values

      public static DefaultJoinType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DefaultJoinType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • sql

      public String sql()
      The SQL representation of the join type. For example, "INNER JOIN" or "LEFT JOIN".
      Specified by:
      sql in interface JoinType
      Returns:
      the SQL representation of the join type.
    • hasOnClause

      public boolean hasOnClause()
      Whether the join type will be accompanied by an ON clause.

      Note: The JoinType implementation is not responsible for generating the ON clause. This method is used to determine whether the ON clause should be included in the generated SQL.

      Specified by:
      hasOnClause in interface JoinType
      Returns:
      true if the join type will be accompanied by an ON clause, false otherwise.
    • isOuter

      public boolean isOuter()
      Whether the join type is an outer join.

      Outer joins will be treated differently when generating the SQL. Outer joins will be placed at the end of the join list to prevent undesired side effects.

      Specified by:
      isOuter in interface JoinType
      Returns:
      true if the join type is an outer join, false otherwise.