org.apache.openjpa.persistence.query
Interface CaseExpression

All Known Implementing Classes:
CaseExpressionImpl

public interface CaseExpression

Interface for the construction of case expressions


Method Summary
 Expression elseCase(Calendar arg)
          Add else to a case expression.
 Expression elseCase(Class arg)
          Add else to a case expression.
 Expression elseCase(Date arg)
          Add else to a case expression.
 Expression elseCase(Enum<?> arg)
          Add else to a case expression.
 Expression elseCase(Expression arg)
          Add else to a case expression.
 Expression elseCase(Number arg)
          Add else to a case expression.
 Expression elseCase(String arg)
          Add else to a case expression.
 CaseExpression then(Calendar then)
          Add a then clause to a general or simple case expression.
 CaseExpression then(Class then)
          Add a then clause to a general or simple case expression.
 CaseExpression then(Date then)
          Add a then clause to a general or simple case expression.
 CaseExpression then(Enum<?> then)
          Add a then clause to a general or simple case expression.
 CaseExpression then(Expression then)
          Add a then clause to a general or simple case expression.
 CaseExpression then(Number then)
          Add a then clause to a general or simple case expression.
 CaseExpression then(String then)
          Add a then clause to a general or simple case expression.
 CaseExpression when(Calendar when)
          Add a when clause to a simple case expression.
 CaseExpression when(Class when)
          Add a when clause to a simple case expression.
 CaseExpression when(Date when)
          Add a when clause to a simple case expression.
 CaseExpression when(Enum<?> when)
          Add a when clause to a simple case expression.
 CaseExpression when(Expression when)
          Add a when clause to a simple case expression.
 CaseExpression when(Number when)
          Add a when clause to a simple case expression.
 CaseExpression when(Predicate pred)
          Add a when predicate clause to a general case expression.
 CaseExpression when(String when)
          Add a when clause to a simple case expression.
 

Method Detail

when

CaseExpression when(Predicate pred)
Add a when predicate clause to a general case expression. The when predicate must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added.

Parameters:
pred - - corresponds to the evaluation condition for the specific case
Returns:
CaseExpression corresponding to the case with the added when clause

when

CaseExpression when(Expression when)
Add a when clause to a simple case expression. The when case expression must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added

Parameters:
when - - corresponds to the value against which the case operand of the simple case is tested
Returns:
CaseExpression corresponding to the case with the added clause

when

CaseExpression when(Number when)
Add a when clause to a simple case expression. The when case expression must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added

Parameters:
when - - corresponds to the value against which the case operand of the simple case is tested
Returns:
CaseExpression corresponding to the case with the added clause

when

CaseExpression when(String when)
Add a when clause to a simple case expression. The when case expression must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added

Parameters:
when - - corresponds to the value against which the case operand of the simple case is tested
Returns:
CaseExpression corresponding to the case with the added clause

when

CaseExpression when(Date when)
Add a when clause to a simple case expression. The when case expression must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added

Parameters:
when - - corresponds to the value against which the case operand of the simple case is tested
Returns:
CaseExpression corresponding to the case with the added clause

when

CaseExpression when(Calendar when)
Add a when clause to a simple case expression. The when case expression must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added

Parameters:
when - - corresponds to the value against which the case operand of the simple case is tested
Returns:
CaseExpression corresponding to the case with the added clause

when

CaseExpression when(Class when)
Add a when clause to a simple case expression. The when case expression must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added

Parameters:
when - - corresponds to the value against which the case operand of the simple case is tested
Returns:
CaseExpression corresponding to the case with the added clause

when

CaseExpression when(Enum<?> when)
Add a when clause to a simple case expression. The when case expression must be followed by the corresponding then case expression that specifies the result of the specific case. Clauses are evaluated in the order added

Parameters:
when - - corresponds to the value against which the case operand of the simple case is tested
Returns:
CaseExpression corresponding to the case with the added clause

then

CaseExpression then(Expression then)
Add a then clause to a general or simple case expression. The then clause specifies the result corresponding to the immediately preceding when. Clauses are evaluated in the order added.

Parameters:
then - - corresponds to the result of the case expression if the when is satisfied
Returns:
CaseExpression corresponding to the case with the added then clause

then

CaseExpression then(Number then)
Add a then clause to a general or simple case expression. The then clause specifies the result corresponding to the immediately preceding when. Clauses are evaluated in the order added.

Parameters:
then - - corresponds to the result of the case expression if the when is satisfied
Returns:
CaseExpression corresponding to the case with the added then clause

then

CaseExpression then(String then)
Add a then clause to a general or simple case expression. The then clause specifies the result corresponding to the immediately preceding when. Clauses are evaluated in the order added.

Parameters:
then - - corresponds to the result of the case expression if the when is satisfied
Returns:
CaseExpression corresponding to the case with the added then clause

then

CaseExpression then(Date then)
Add a then clause to a general or simple case expression. The then clause specifies the result corresponding to the immediately preceding when. Clauses are evaluated in the order added.

Parameters:
then - - corresponds to the result of the case expression if the when is satisfied
Returns:
CaseExpression corresponding to the case with the added then clause

then

CaseExpression then(Calendar then)
Add a then clause to a general or simple case expression. The then clause specifies the result corresponding to the immediately preceding when. Clauses are evaluated in the order added.

Parameters:
then - - corresponds to the result of the case expression if the when is satisfied
Returns:
CaseExpression corresponding to the case with the added then clause

then

CaseExpression then(Class then)
Add a then clause to a general or simple case expression. The then clause specifies the result corresponding to the immediately preceding when. Clauses are evaluated in the order added.

Parameters:
then - - corresponds to the result of the case expression if the when is satisfied
Returns:
CaseExpression corresponding to the case with the added then clause

then

CaseExpression then(Enum<?> then)
Add a then clause to a general or simple case expression. The then clause specifies the result corresponding to the immediately preceding when. Clauses are evaluated in the order added.

Parameters:
then - - corresponds to the result of the case expression if the when is satisfied
Returns:
CaseExpression corresponding to the case with the added then clause

elseCase

Expression elseCase(Expression arg)
Add else to a case expression. A case expression must have an else clause.

Parameters:
arg - - corresponds to the result of the case expression if the when condition is not satisfied
Returns:
Expression corresponding to the case expression with the added clause

elseCase

Expression elseCase(String arg)
Add else to a case expression. A case expression must have an else clause.

Parameters:
arg - - corresponds to the result of the case expression if the when condition is not satisfied
Returns:
Expression corresponding to the case expression with the added clause

elseCase

Expression elseCase(Number arg)
Add else to a case expression. A case expression must have an else clause.

Parameters:
arg - - corresponds to the result of the case expression if the when condition is not satisfied
Returns:
Expression corresponding to the case expression with the added clause

elseCase

Expression elseCase(Date arg)
Add else to a case expression. A case expression must have an else clause.

Parameters:
arg - - corresponds to the result of the case expression if the when condition is not satisfied
Returns:
Expression corresponding to the case expression with the added clause

elseCase

Expression elseCase(Calendar arg)
Add else to a case expression. A case expression must have an else clause.

Parameters:
arg - - corresponds to the result of the case expression if the when condition is not satisfied
Returns:
Expression corresponding to the case expression with the added clause

elseCase

Expression elseCase(Class arg)
Add else to a case expression. A case expression must have an else clause.

Parameters:
arg - - corresponds to the result of the case expression if the when condition is not satisfied
Returns:
Expression corresponding to the case expression with the added clause

elseCase

Expression elseCase(Enum<?> arg)
Add else to a case expression. A case expression must have an else clause.

Parameters:
arg - - corresponds to the result of the case expression if the when condition is not satisfied
Returns:
Expression corresponding to the case expression with the added clause


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.