-
- Type Parameters:
V
- The type of values being compared in this case statementT
- 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 CaseWhenStep<V,T> extends Field<T>
The final step in creating a case statement of the typeCASE 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 Field<T>
else_(Field<T> result)
Add an else clause to the already constructed case statementField<T>
else_(T result)
Add an else clause to the already constructed case statementCaseWhenStep<V,T>
mapFields(Map<? extends Field<V>,? extends Field<T>> fields)
CreateWHEN ..
CaseWhenStep<V,T>
mapValues(Map<V,T> values)
CreateWHEN ..
Field<T>
otherwise(Field<T> result)
Add an else clause to the already constructed case statementField<T>
otherwise(T result)
Add an else clause to the already constructed case statementCaseWhenStep<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, as, as, as, asc, ascii, asin, atan, atan2, atan2, avg, avgOver, between, between, between, between, betweenSymmetric, betweenSymmetric, betweenSymmetric, betweenSymmetric, bitAnd, bitAnd, bitLength, bitNand, bitNand, bitNor, bitNor, bitNot, bitOr, bitOr, bitXNor, bitXNor, bitXor, bitXor, cast, cast, cast, ceil, changed, charLength, coalesce, coalesce, coerce, coerce, coerce, collate, collate, collate, compare, compare, compare, compare, concat, concat, concat, contains, contains, containsIgnoreCase, containsIgnoreCase, cos, cosh, cot, coth, count, countDistinct, countOver, decode, decode, decode, decode, deg, desc, div, div, divide, divide, endsWith, endsWith, endsWithIgnoreCase, endsWithIgnoreCase, eq, eq, eq, eq, equal, equal, equal, equal, equalIgnoreCase, equalIgnoreCase, equals, exp, extract, field, firstValue, floor, from, ge, ge, ge, ge, get, getComment, getName, getValue, greaterOrEqual, greaterOrEqual, greaterOrEqual, greaterOrEqual, greaterThan, greaterThan, greaterThan, greaterThan, greatest, greatest, gt, gt, gt, gt, in, in, in, in, in, isDistinctFrom, isDistinctFrom, isFalse, isJson, isNotDistinctFrom, isNotDistinctFrom, isNotJson, isNotNull, isNull, isTrue, lag, lag, lag, lag, lastValue, le, le, le, le, lead, lead, lead, lead, least, least, length, lessOrEqual, lessOrEqual, lessOrEqual, lessOrEqual, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, likeIgnoreCase, likeIgnoreCase, likeIgnoreCase, likeIgnoreCase, likeRegex, likeRegex, ln, log, lower, lpad, lpad, lpad, lpad, lt, lt, lt, lt, ltrim, max, maxOver, median, min, minOver, minus, minus, mod, mod, modulo, modulo, mul, mul, multiply, multiply, ne, ne, ne, ne, neg, notBetween, notBetween, notBetween, notBetween, notBetweenSymmetric, notBetweenSymmetric, notBetweenSymmetric, notBetweenSymmetric, notContains, notContains, notContainsIgnoreCase, notContainsIgnoreCase, notEqual, notEqual, notEqual, notEqual, notEqualIgnoreCase, notEqualIgnoreCase, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notLike, notLike, notLike, notLikeIgnoreCase, notLikeIgnoreCase, notLikeIgnoreCase, notLikeIgnoreCase, notLikeRegex, notLikeRegex, notSimilarTo, notSimilarTo, notSimilarTo, notSimilarTo, nullif, nullif, nvl, nvl, nvl2, nvl2, octetLength, original, plus, plus, plus, position, position, pow, pow, power, power, rad, rem, rem, repeat, repeat, replace, replace, replace, replace, reset, round, round, rpad, rpad, rpad, rpad, rtrim, shl, shl, shr, shr, sign, similarTo, similarTo, similarTo, similarTo, sin, sinh, sort, sort, sortAsc, sortAsc, sortDefault, sortDesc, sortDesc, sqrt, startsWith, startsWith, startsWithIgnoreCase, startsWithIgnoreCase, stddevPop, stddevPopOver, stddevSamp, stddevSampOver, sub, sub, substring, substring, substring, substring, subtract, subtract, sum, sumOver, tan, tanh, times, times, trim, unaryMinus, unaryPlus, upper, varPop, varPopOver, varSamp, varSampOver
-
Methods inherited from interface org.jooq.Named
getQualifiedName, getUnqualifiedName
-
Methods inherited from interface org.jooq.Typed
getBinding, getConverter, getDataType, getDataType, getType
-
-
-
-
Method Detail
-
when
@Support 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 statementresult
- The result value if values are equal- Returns:
- An intermediary step for case statement construction
-
when
@Support 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 statementresult
- The result value if values are equal- Returns:
- An intermediary step for case statement construction
-
when
@Support 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 statementresult
- The result value if values are equal- Returns:
- An intermediary step for case statement construction
-
when
@Support 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 statementresult
- The result value if values are equal- Returns:
- An intermediary step for case statement construction
-
mapValues
@Support CaseWhenStep<V,T> mapValues(Map<V,T> values)
CreateWHEN .. THEN
expressions from aMap
.This will iterate over the map's entries to create individual
WHEN .. THEN
expressions for each map entry.
-
mapFields
@Support CaseWhenStep<V,T> mapFields(Map<? extends Field<V>,? extends Field<T>> fields)
CreateWHEN .. THEN
expressions from aMap
.This will iterate over the map's entries to create individual
WHEN .. THEN
expressions for each map entry.
-
otherwise
@Support 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
@Support 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
-
else_
@Support 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
-
-