Module org.jooq
Package org.jooq

Interface CaseConditionStep<T>

Type Parameters:
T - The type returned by this case statement
All Superinterfaces:
Field<T>, FieldOrConstraint, FieldOrRow, GroupField, Named, OrderField<T>, QueryPart, SelectField<T>, SelectFieldOrAsterisk, Serializable, Typed<T>

public interface CaseConditionStep<T> extends Field<T>
The final step in creating a case statement of the type

 CASE WHEN x < 1  THEN 'one'
      WHEN x >= 2 THEN 'two'
      ELSE            'three'
 END
 
Author:
Lukas Eder
See Also:
  • Method Details

    • when

      @NotNull @Support @NotNull CaseConditionStep<T> when(Condition condition, T result)
      Compare a condition to the already constructed case statement, return result if the condition holds true
      Parameters:
      condition - The condition to add to the case statement
      result - The result value if the condition holds true
      Returns:
      An intermediary step for case statement construction
    • when

      @NotNull @Support @NotNull CaseConditionStep<T> when(Condition condition, Field<T> result)
      Compare a condition to the already constructed case statement, return result if the condition holds true
      Parameters:
      condition - The condition to add to the case statement
      result - The result value if the condition holds true
      Returns:
      An intermediary step for case statement construction
    • when

      @NotNull @Support @NotNull CaseConditionStep<T> when(Condition condition, Select<? extends Record1<T>> result)
      Compare a condition to the already constructed case statement, return result if the condition holds true
      Parameters:
      condition - The condition to add to the case statement
      result - The result value if the condition holds true
      Returns:
      An intermediary step for case statement construction
    • when

      @NotNull @Support @NotNull CaseConditionStep<T> when(Field<Boolean> condition, T result)
      Compare a condition to the already constructed case statement, return result if the condition holds true
      Parameters:
      condition - The condition to add to the case statement
      result - The result value if the condition holds true
      Returns:
      An intermediary step for case statement construction
    • when

      @NotNull @Support @NotNull CaseConditionStep<T> when(Field<Boolean> condition, Field<T> result)
      Compare a condition to the already constructed case statement, return result if the condition holds true
      Parameters:
      condition - The condition to add to the case statement
      result - The result value if the condition holds true
      Returns:
      An intermediary step for case statement construction
    • when

      @NotNull @Support @NotNull CaseConditionStep<T> when(Field<Boolean> condition, Select<? extends Record1<T>> result)
      Compare a condition to the already constructed case statement, return result if the condition holds true
      Parameters:
      condition - The condition to add to the case statement
      result - The result value if the condition holds true
      Returns:
      An intermediary step for case statement construction
    • otherwise

      @NotNull @Support @NotNull Field<T> otherwise(T result)
      Add an else clause to the already constructed case statement
      Parameters:
      result - The result value if no other value matches the case
      Returns:
      The resulting field from case statement construction
    • otherwise

      @NotNull @Support @NotNull Field<T> otherwise(Field<T> result)
      Add an else clause to the already constructed case statement
      Parameters:
      result - The result value if no other value matches the case
      Returns:
      The resulting field from case statement construction
    • otherwise

      @NotNull @Support @NotNull Field<T> otherwise(Select<? extends Record1<T>> result)
      Add an else clause to the already constructed case statement
      Parameters:
      result - The result value if no other value matches the case
      Returns:
      The resulting field from case statement construction
    • else_

      @NotNull @Support @NotNull Field<T> else_(T result)
      Add an else clause to the already constructed case statement
      Parameters:
      result - The result value if no other value matches the case
      Returns:
      The resulting field from case statement construction
    • else_

      @NotNull @Support @NotNull Field<T> else_(Field<T> result)
      Add an else clause to the already constructed case statement
      Parameters:
      result - The result value if no other value matches the case
      Returns:
      The resulting field from case statement construction
    • else_

      @NotNull @Support @NotNull Field<T> else_(Select<? extends Record1<T>> result)
      Add an else clause to the already constructed case statement
      Parameters:
      result - The result value if no other value matches the case
      Returns:
      The resulting field from case statement construction