Package org.jooq

Interface CaseValueStep<V>

  • Type Parameters:
    V - The type of values being compared in this case statement

    public interface CaseValueStep<V>
    An intermediary step in creating a case statement of the type
     CASE x WHEN 1 THEN 'one'
            WHEN 2 THEN 'two'
            ELSE        'three'
     END
     
    Author:
    Lukas Eder
    See Also:
    Case
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> CaseWhenStep<V,​T> mapFields​(java.util.Map<? extends Field<V>,​? extends Field<T>> fields)
      Create WHEN ..
      <T> CaseWhenStep<V,​T> mapValues​(java.util.Map<V,​T> values)
      Create WHEN ..
      <T> CaseWhenStep<V,​T> when​(Field<V> compareValue, Field<T> result)
      Compare a value to the already constructed case statement, return result if values are equal.
      <T> CaseWhenStep<V,​T> when​(Field<V> compareValue, Select<? extends Record1<T>> result)
      Compare a value to the already constructed case statement, return result if values are equal.
      <T> CaseWhenStep<V,​T> when​(Field<V> compareValue, T result)
      Compare a value to the already constructed case statement, return result if values are equal.
      <T> CaseWhenStep<V,​T> when​(V compareValue, Field<T> result)
      Compare a value to the already constructed case statement, return result if values are equal.
      <T> CaseWhenStep<V,​T> when​(V compareValue, Select<? extends Record1<T>> result)
      Compare a value to the already constructed case statement, return result if values are equal.
      <T> CaseWhenStep<V,​T> when​(V compareValue, T result)
      Compare a value to the already constructed case statement, return result if values are equal.
    • Method Detail

      • when

        @Support
        <T> CaseWhenStep<V,​T> when​(V compareValue,
                                         T result)
        Compare a value to the already constructed case statement, return result if values are equal.
        Type Parameters:
        T - The generic result field type parameter
        Parameters:
        compareValue - The value to compare with the already constructed case statement
        result - The result value if values are equal
        Returns:
        An intermediary step for case statement construction
      • when

        @Support
        <T> CaseWhenStep<V,​T> when​(V compareValue,
                                         Field<T> result)
        Compare a value to the already constructed case statement, return result if values are equal.
        Type Parameters:
        T - The generic result field type parameter
        Parameters:
        compareValue - The value to compare with the already constructed case statement
        result - The result value if values are equal
        Returns:
        An intermediary step for case statement construction
      • when

        @Support
        <T> CaseWhenStep<V,​T> when​(V compareValue,
                                         Select<? extends Record1<T>> result)
        Compare a value to the already constructed case statement, return result if values are equal.
        Type Parameters:
        T - The generic result field type parameter
        Parameters:
        compareValue - The value to compare with the already constructed case statement
        result - The result value if values are equal
        Returns:
        An intermediary step for case statement construction
      • when

        @Support
        <T> CaseWhenStep<V,​T> when​(Field<V> compareValue,
                                         T result)
        Compare a value to the already constructed case statement, return result if values are equal.
        Type Parameters:
        T - The generic result field type parameter
        Parameters:
        compareValue - The value to compare with the already constructed case statement
        result - The result value if values are equal
        Returns:
        An intermediary step for case statement construction
      • when

        @Support
        <T> CaseWhenStep<V,​T> when​(Field<V> compareValue,
                                         Field<T> result)
        Compare a value to the already constructed case statement, return result if values are equal.
        Type Parameters:
        T - The generic result field type parameter
        Parameters:
        compareValue - The value to compare with the already constructed case statement
        result - The result value if values are equal
        Returns:
        An intermediary step for case statement construction
      • when

        @Support
        <T> CaseWhenStep<V,​T> when​(Field<V> compareValue,
                                         Select<? extends Record1<T>> result)
        Compare a value to the already constructed case statement, return result if values are equal.
        Type Parameters:
        T - The generic result field type parameter
        Parameters:
        compareValue - The value to compare with the already constructed case statement
        result - The result value if values are equal
        Returns:
        An intermediary step for case statement construction
      • mapValues

        <T> CaseWhenStep<V,​T> mapValues​(java.util.Map<V,​T> values)
        Create WHEN .. THEN expressions from a Map.

        This will iterate over the map's entries to create individual WHEN .. THEN expressions for each map entry.

      • mapFields

        <T> CaseWhenStep<V,​T> mapFields​(java.util.Map<? extends Field<V>,​? extends Field<T>> fields)
        Create WHEN .. THEN expressions from a Map.

        This will iterate over the map's entries to create individual WHEN .. THEN expressions for each map entry.