javax.persistence.criteria
Interface CriteriaBuilder.Case<R>

All Superinterfaces:
Expression<R>, Selection<R>, TupleElement<R>
Enclosing interface:
CriteriaBuilder

public static interface CriteriaBuilder.Case<R>
extends Expression<R>

Interface used to build general case expressions. Case conditions are evaluated in the order in which they are specified.


Method Summary
 Expression<R> otherwise(Expression<? extends R> result)
          Add an "else" clause to the case expression.
 Expression<R> otherwise(R result)
          Add an "else" clause to the case expression.
 CriteriaBuilder.Case<R> when(Expression<java.lang.Boolean> condition, Expression<? extends R> result)
          Add a when/then clause to the case expression.
 CriteriaBuilder.Case<R> when(Expression<java.lang.Boolean> condition, R result)
          Add a when/then clause to the case expression.
 
Methods inherited from interface javax.persistence.criteria.Expression
as, in, in, in, in, isNotNull, isNull
 
Methods inherited from interface javax.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelection
 
Methods inherited from interface javax.persistence.TupleElement
getAlias, getJavaType
 

Method Detail

when

CriteriaBuilder.Case<R> when(Expression<java.lang.Boolean> condition,
                             R result)
Add a when/then clause to the case expression.

Parameters:
condition - "when" condition
result - "then" result value
Returns:
general case expression

when

CriteriaBuilder.Case<R> when(Expression<java.lang.Boolean> condition,
                             Expression<? extends R> result)
Add a when/then clause to the case expression.

Parameters:
condition - "when" condition
result - "then" result expression
Returns:
general case expression

otherwise

Expression<R> otherwise(R result)
Add an "else" clause to the case expression.

Parameters:
result - "else" result
Returns:
expression

otherwise

Expression<R> otherwise(Expression<? extends R> result)
Add an "else" clause to the case expression.

Parameters:
result - "else" result expression
Returns:
expression


Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41