org.jooq
Interface Case


public interface Case

The SQL case statement.

This construct can be used to create expressions of the type

 CASE x WHEN 1 THEN 'one'
        WHEN 2 THEN 'two'
        ELSE        'three'
 END
 
or of the type
 CASE WHEN x < 1  THEN 'one'
      WHEN x >= 2 THEN 'two'
      ELSE            'three'
 END
 
Instances of Case are created through the Factory.decode() method

Author:
Lukas Eder

Method Summary
<V> CaseValueStep<V>
value(Field<V> value)
          This construct can be used to create expressions of the type CASE value WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'three' END
<V> CaseValueStep<V>
value(V value)
          This construct can be used to create expressions of the type CASE value WHEN 1 THEN 'one' WHEN 2 THEN 'two' ELSE 'three' END
<T> CaseConditionStep<T>
when(Condition condition, Field<T> result)
          This construct can be used to create expressions of the type CASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END Instances of Case are created through the
<T> CaseConditionStep<T>
when(Condition condition, T result)
          This construct can be used to create expressions of the type CASE WHEN x < 1 THEN 'one' WHEN x >= 2 THEN 'two' ELSE 'three' END Instances of Case are created through the
 

Method Detail

value

<V> CaseValueStep<V> value(V value)
This construct can be used to create expressions of the type
 CASE value WHEN 1 THEN 'one'
            WHEN 2 THEN 'two'
            ELSE        'three'
 END
 

Type Parameters:
V - The generic value type parameter
Parameters:
value - The value to do the case statement on
Returns:
An intermediary step for case statement construction

value

<V> CaseValueStep<V> value(Field<V> value)
This construct can be used to create expressions of the type
 CASE value WHEN 1 THEN 'one'
            WHEN 2 THEN 'two'
            ELSE        'three'
 END
 

Type Parameters:
V - The generic value type parameter
Parameters:
value - The value to do the case statement on
Returns:
An intermediary step for case statement construction

when

<T> CaseConditionStep<T> when(Condition condition,
                              T result)
This construct can be used to create expressions of the type
 CASE WHEN x < 1  THEN 'one'
      WHEN x >= 2 THEN 'two'
      ELSE            'three'
 END
 
Instances of Case are created through the

Type Parameters:
T - The generic field type parameter
Parameters:
condition - A condition to check in the case statement
result - The result if the condition holds true
Returns:
An intermediary step for case statement construction

when

<T> CaseConditionStep<T> when(Condition condition,
                              Field<T> result)
This construct can be used to create expressions of the type
 CASE WHEN x < 1  THEN 'one'
      WHEN x >= 2 THEN 'two'
      ELSE            'three'
 END
 
Instances of Case are created through the

Type Parameters:
T - The generic field type parameter
Parameters:
condition - A condition to check in the case statement
result - The result if the condition holds true
Returns:
An intermediary step for case statement construction


Copyright © 2012. All Rights Reserved.