Class CaseExpressionImpl

java.lang.Object
org.apache.openjpa.persistence.query.CaseExpressionImpl
All Implemented Interfaces:
Serializable, CaseExpression, Visitable

public class CaseExpressionImpl extends Object implements CaseExpression, Visitable
See Also:
  • Constructor Details

    • CaseExpressionImpl

      public CaseExpressionImpl()
    • CaseExpressionImpl

      public CaseExpressionImpl(Object caseOperand)
  • Method Details

    • elseCase

      public Expression elseCase(Expression arg)
      Description copied from interface: CaseExpression
      Add else to a case expression. A case expression must have an else clause.
      Specified by:
      elseCase in interface CaseExpression
      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

      public Expression elseCase(String arg)
      Description copied from interface: CaseExpression
      Add else to a case expression. A case expression must have an else clause.
      Specified by:
      elseCase in interface CaseExpression
      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

      public Expression elseCase(Number arg)
      Description copied from interface: CaseExpression
      Add else to a case expression. A case expression must have an else clause.
      Specified by:
      elseCase in interface CaseExpression
      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

      public Expression elseCase(Date arg)
      Description copied from interface: CaseExpression
      Add else to a case expression. A case expression must have an else clause.
      Specified by:
      elseCase in interface CaseExpression
      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

      public Expression elseCase(Calendar arg)
      Description copied from interface: CaseExpression
      Add else to a case expression. A case expression must have an else clause.
      Specified by:
      elseCase in interface CaseExpression
      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

      public Expression elseCase(Class arg)
      Description copied from interface: CaseExpression
      Add else to a case expression. A case expression must have an else clause.
      Specified by:
      elseCase in interface CaseExpression
      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

      public Expression elseCase(Enum<?> arg)
      Description copied from interface: CaseExpression
      Add else to a case expression. A case expression must have an else clause.
      Specified by:
      elseCase in interface CaseExpression
      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
    • then

      public CaseExpression then(Expression then)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      then in interface CaseExpression
      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

      public CaseExpression then(Number then)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      then in interface CaseExpression
      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

      public CaseExpression then(String then)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      then in interface CaseExpression
      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

      public CaseExpression then(Date then)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      then in interface CaseExpression
      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

      public CaseExpression then(Calendar then)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      then in interface CaseExpression
      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

      public CaseExpression then(Class then)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      then in interface CaseExpression
      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

      public CaseExpression then(Enum<?> then)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      then in interface CaseExpression
      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
    • when

      public CaseExpression when(Predicate when)
      Description copied from interface: CaseExpression
      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.
      Specified by:
      when in interface CaseExpression
      Parameters:
      when - - corresponds to the evaluation condition for the specific case
      Returns:
      CaseExpression corresponding to the case with the added when clause
    • when

      public CaseExpression when(Expression when)
      Description copied from interface: CaseExpression
      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
      Specified by:
      when in interface CaseExpression
      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

      public CaseExpression when(Number when)
      Description copied from interface: CaseExpression
      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
      Specified by:
      when in interface CaseExpression
      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

      public CaseExpression when(String when)
      Description copied from interface: CaseExpression
      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
      Specified by:
      when in interface CaseExpression
      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

      public CaseExpression when(Date when)
      Description copied from interface: CaseExpression
      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
      Specified by:
      when in interface CaseExpression
      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

      public CaseExpression when(Calendar when)
      Description copied from interface: CaseExpression
      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
      Specified by:
      when in interface CaseExpression
      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

      public CaseExpression when(Class when)
      Description copied from interface: CaseExpression
      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
      Specified by:
      when in interface CaseExpression
      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

      public CaseExpression when(Enum<?> when)
      Description copied from interface: CaseExpression
      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
      Specified by:
      when in interface CaseExpression
      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
    • asExpression

      public String asExpression(org.apache.openjpa.persistence.query.AliasContext ctx)
      Description copied from interface: Visitable
      Get a JPQL fragment as used in WHERE clause.
      Specified by:
      asExpression in interface Visitable
    • asProjection

      public String asProjection(org.apache.openjpa.persistence.query.AliasContext ctx)
      Description copied from interface: Visitable
      Gets the string representation in SELECT projection.
      Specified by:
      asProjection in interface Visitable
    • asJoinable

      public String asJoinable(org.apache.openjpa.persistence.query.AliasContext ctx)
      Description copied from interface: Visitable
      Gets the string representation in FROM clause.
      Specified by:
      asJoinable in interface Visitable
    • getAliasHint

      public String getAliasHint(org.apache.openjpa.persistence.query.AliasContext ctx)
      Description copied from interface: Visitable
      Gets the hint to be used while creating alias.
      Specified by:
      getAliasHint in interface Visitable