org.jooq
Interface CaseWhenStep<V,T>

Type Parameters:
V - The type of values being compared in this case statement
T - The type returned by this case statement
All Superinterfaces:
Adapter, AliasProvider<Field<T>>, Attachable, Comparable<NamedQueryPart>, Field<T>, NamedQueryPart, NamedTypeProviderQueryPart<T>, QueryPart, Serializable

public interface CaseWhenStep<V,T>
extends Field<T>

The final 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
 Field<T> otherwise(Field<T> result)
          Add an else clause to the already constructed case statement
 Field<T> otherwise(T result)
          Add an else clause to the already constructed case statement
 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.
 CaseWhenStep<V,T> when(Field<V> compareValue, T result)
          Compare a value to the already constructed case statement, return result if values are equal.
 CaseWhenStep<V,T> when(V compareValue, Field<T> result)
          Compare a value to the already constructed case statement, return result if values are equal.
 CaseWhenStep<V,T> when(V compareValue, T result)
          Compare a value to the already constructed case statement, return result if values are equal.
 
Methods inherited from interface org.jooq.Field
abs, acos, add, add, as, asc, ascii, asin, atan, atan2, atan2, avg, avgOver, between, between, bitLength, cast, cast, cast, ceil, charLength, coalesce, coalesce, concat, concat, contains, contains, cos, cosh, cot, coth, count, countDistinct, countOver, decode, decode, decode, decode, deg, desc, div, div, endsWith, endsWith, equal, equal, equal, equalAll, equalAll, equalAll, equalAny, equalAny, equalAny, equalIgnoreCase, equalIgnoreCase, equals, equalSome, exp, extract, firstValue, floor, getName, getType, greaterOrEqual, greaterOrEqual, greaterOrEqual, greaterOrEqualAll, greaterOrEqualAll, greaterOrEqualAll, greaterOrEqualAny, greaterOrEqualAny, greaterOrEqualAny, greaterOrEqualSome, greaterThan, greaterThan, greaterThan, greaterThanAll, greaterThanAll, greaterThanAll, greaterThanAny, greaterThanAny, greaterThanAny, greaterThanSome, greatest, greatest, in, in, in, in, isFalse, isNotNull, isNull, isNullLiteral, isTrue, lag, lag, lag, lag, lastValue, lead, lead, lead, lead, least, least, length, lessOrEqual, lessOrEqual, lessOrEqual, lessOrEqualAll, lessOrEqualAll, lessOrEqualAll, lessOrEqualAny, lessOrEqualAny, lessOrEqualAny, lessOrEqualSome, lessThan, lessThan, lessThan, lessThanAll, lessThanAll, lessThanAll, lessThanAny, lessThanAny, lessThanAny, lessThanSome, like, like, like, like, ln, log, lower, lpad, lpad, lpad, lpad, ltrim, max, maxOver, median, min, minOver, mod, mod, mul, mul, neg, notBetween, notBetween, notEqual, notEqual, notEqual, notEqualAll, notEqualAll, notEqualAll, notEqualAny, notEqualAny, notEqualAny, notEqualIgnoreCase, notEqualIgnoreCase, notEqualSome, notIn, notIn, notIn, notIn, notLike, notLike, notLike, notLike, nullif, nullif, nvl, nvl, nvl2, nvl2, octetLength, position, position, power, rad, repeat, repeat, replace, replace, replace, replace, round, round, rpad, rpad, rpad, rpad, rtrim, sign, sin, sinh, sort, sortAsc, sortAsc, sortDesc, sortDesc, sqrt, startsWith, startsWith, stddevPop, stddevPopOver, stddevSamp, stddevSampOver, sub, sub, substring, substring, substring, substring, sum, sumOver, tan, tanh, trim, upper, varPop, varPopOver, varSamp, varSampOver
 
Methods inherited from interface org.jooq.NamedTypeProviderQueryPart
getDataType, getDataType
 
Methods inherited from interface org.jooq.Attachable
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

when

CaseWhenStep<V,T> when(V compareValue,
                       T result)
Compare a value to the already constructed case statement, return result if values are equal.

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

CaseWhenStep<V,T> when(V compareValue,
                       Field<T> result)
Compare a value to the already constructed case statement, return result if values are equal.

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

CaseWhenStep<V,T> when(Field<V> compareValue,
                       T result)
Compare a value to the already constructed case statement, return result if values are equal.

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

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.

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

otherwise

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

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


Copyright © 2012. All Rights Reserved.