public class CaseExpressionImpl extends java.lang.Object implements CaseExpression, Visitable
Constructor and Description |
---|
CaseExpressionImpl() |
CaseExpressionImpl(java.lang.Object caseOperand) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asExpression(org.apache.openjpa.persistence.query.AliasContext ctx)
Get a JPQL fragment as used in WHERE clause.
|
java.lang.String |
asJoinable(org.apache.openjpa.persistence.query.AliasContext ctx)
Gets the string representation in FROM clause.
|
java.lang.String |
asProjection(org.apache.openjpa.persistence.query.AliasContext ctx)
Gets the string representation in SELECT projection.
|
Expression |
elseCase(java.util.Calendar arg)
Add else to a case expression.
|
Expression |
elseCase(java.lang.Class arg)
Add else to a case expression.
|
Expression |
elseCase(java.util.Date arg)
Add else to a case expression.
|
Expression |
elseCase(java.lang.Enum<?> arg)
Add else to a case expression.
|
Expression |
elseCase(Expression arg)
Add else to a case expression.
|
Expression |
elseCase(java.lang.Number arg)
Add else to a case expression.
|
Expression |
elseCase(java.lang.String arg)
Add else to a case expression.
|
java.lang.String |
getAliasHint(org.apache.openjpa.persistence.query.AliasContext ctx)
Gets the hint to be used while creating alias.
|
CaseExpression |
then(java.util.Calendar then)
Add a then clause to a general or simple case expression.
|
CaseExpression |
then(java.lang.Class then)
Add a then clause to a general or simple case expression.
|
CaseExpression |
then(java.util.Date then)
Add a then clause to a general or simple case expression.
|
CaseExpression |
then(java.lang.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(java.lang.Number then)
Add a then clause to a general or simple case expression.
|
CaseExpression |
then(java.lang.String then)
Add a then clause to a general or simple case expression.
|
CaseExpression |
when(java.util.Calendar when)
Add a when clause to a simple case expression.
|
CaseExpression |
when(java.lang.Class when)
Add a when clause to a simple case expression.
|
CaseExpression |
when(java.util.Date when)
Add a when clause to a simple case expression.
|
CaseExpression |
when(java.lang.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(java.lang.Number when)
Add a when clause to a simple case expression.
|
CaseExpression |
when(Predicate when)
Add a when predicate clause to a general case expression.
|
CaseExpression |
when(java.lang.String when)
Add a when clause to a simple case expression.
|
public CaseExpressionImpl()
public CaseExpressionImpl(java.lang.Object caseOperand)
public Expression elseCase(Expression arg)
CaseExpression
elseCase
in interface CaseExpression
arg
- -
corresponds to the result of the case expression if the when
condition is not satisfiedpublic Expression elseCase(java.lang.String arg)
CaseExpression
elseCase
in interface CaseExpression
arg
- -
corresponds to the result of the case expression if the when
condition is not satisfiedpublic Expression elseCase(java.lang.Number arg)
CaseExpression
elseCase
in interface CaseExpression
arg
- -
corresponds to the result of the case expression if the when
condition is not satisfiedpublic Expression elseCase(java.util.Date arg)
CaseExpression
elseCase
in interface CaseExpression
arg
- -
corresponds to the result of the case expression if the when
condition is not satisfiedpublic Expression elseCase(java.util.Calendar arg)
CaseExpression
elseCase
in interface CaseExpression
arg
- -
corresponds to the result of the case expression if the when
condition is not satisfiedpublic Expression elseCase(java.lang.Class arg)
CaseExpression
elseCase
in interface CaseExpression
arg
- -
corresponds to the result of the case expression if the when
condition is not satisfiedpublic Expression elseCase(java.lang.Enum<?> arg)
CaseExpression
elseCase
in interface CaseExpression
arg
- -
corresponds to the result of the case expression if the when
condition is not satisfiedpublic CaseExpression then(Expression then)
CaseExpression
then
in interface CaseExpression
then
- -
corresponds to the result of the case expression if the when
is satisfiedpublic CaseExpression then(java.lang.Number then)
CaseExpression
then
in interface CaseExpression
then
- -
corresponds to the result of the case expression if the when
is satisfiedpublic CaseExpression then(java.lang.String then)
CaseExpression
then
in interface CaseExpression
then
- -
corresponds to the result of the case expression if the when
is satisfiedpublic CaseExpression then(java.util.Date then)
CaseExpression
then
in interface CaseExpression
then
- -
corresponds to the result of the case expression if the when
is satisfiedpublic CaseExpression then(java.util.Calendar then)
CaseExpression
then
in interface CaseExpression
then
- -
corresponds to the result of the case expression if the when
is satisfiedpublic CaseExpression then(java.lang.Class then)
CaseExpression
then
in interface CaseExpression
then
- -
corresponds to the result of the case expression if the when
is satisfiedpublic CaseExpression then(java.lang.Enum<?> then)
CaseExpression
then
in interface CaseExpression
then
- -
corresponds to the result of the case expression if the when
is satisfiedpublic CaseExpression when(Predicate when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the evaluation condition for the specific casepublic CaseExpression when(Expression when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the value against which the case operand of
the simple case is testedpublic CaseExpression when(java.lang.Number when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the value against which the case operand of
the simple case is testedpublic CaseExpression when(java.lang.String when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the value against which the
case operand of the simple case is testedpublic CaseExpression when(java.util.Date when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the value against which the case operand of
the simple case is testedpublic CaseExpression when(java.util.Calendar when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the value against which the case operand of
the simple case is testedpublic CaseExpression when(java.lang.Class when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the value against which the case operand of
the simple case is testedpublic CaseExpression when(java.lang.Enum<?> when)
CaseExpression
when
in interface CaseExpression
when
- -
corresponds to the value against which the case operand of
the simple case is testedpublic java.lang.String asExpression(org.apache.openjpa.persistence.query.AliasContext ctx)
Visitable
asExpression
in interface Visitable
public java.lang.String asProjection(org.apache.openjpa.persistence.query.AliasContext ctx)
Visitable
asProjection
in interface Visitable
public java.lang.String asJoinable(org.apache.openjpa.persistence.query.AliasContext ctx)
Visitable
asJoinable
in interface Visitable
public java.lang.String getAliasHint(org.apache.openjpa.persistence.query.AliasContext ctx)
Visitable
getAliasHint
in interface Visitable