Skip navigation links

Oracle® OLAP Java API Reference
11g Release 1 (11.1)

B28128-03


oracle.olapi.syntax
Class SimpleCaseExpression

java.lang.Object
  extended by oracle.olapi.syntax.SyntaxObject
      extended by oracle.olapi.syntax.DataObject
          extended by oracle.olapi.syntax.Expression
              extended by oracle.olapi.syntax.TypedExpression
                  extended by oracle.olapi.syntax.RowExpression
                      extended by oracle.olapi.syntax.CaseExpression
                          extended by oracle.olapi.syntax.SimpleCaseExpression

All Implemented Interfaces:
FunctionArgument

public final class SimpleCaseExpression
extends CaseExpression

A CaseExpression that represents an expression that is similar to the simple case expression and the ELSE clauses of a CASE expression in SQL. A SimpleCaseExpression has a TypedExpression as the expression of the simple case expression, SimpleCase objects as the WHEN and THEN expressions of the simple case expression, and a TypedExpression as the ELSE clause.

When Oracle Database resolves a CASE expression with a simple case expression clause, it searches for the first WHEN expression that is equal to the expression of the simple case expression clause and returns the THEN expression that is associated with that WHEN expression.. If none of the WHEN expressions meets this condition, and an ELSE expression exists, then Oracle returns the ELSE expression. Otherwise, Oracle returns null. The value of every THEN expression and the ELSE expression cannot be null.


Constructor Summary
SimpleCaseExpression(TypedExpression switchExpression, java.util.List<SimpleCase> cases, TypedExpression elseExpression)
          Creates a SimpleCaseExpression that has a TypedExpression as the switch expression of the simple case expression clause of a CASE expression, a List of SimpleCase objects that contain the WHEN and THEN expressions of the simple case expression clause, and a TypedExpression as the ELSE clause of the CASE expression.
SimpleCaseExpression(TypedExpression switchExpression, SimpleCase[] cases, TypedExpression elseExpression)
          Creates a SimpleCaseExpression that has a TypedExpression as the switch expression of the simple case expression clause of a CASE expression, an array of SimpleCase objects that contain the WHEN and THEN expressions of the simple case expression clause, and a TypedExpression as the ELSE clause of the CASE expression.

 

Method Summary
 SimpleCase[] getCases()
          Gets the SimpleCase objects that contain the WHEN and THEN expressions of the simple case expression clause for this SimpleCaseExpression.
 TypedExpression getSwitchExpression()
          Gets the TypedExpression that resolves to the expression to which Oracle Database compares the THEN expressions of the SimpleCase objects of this SimpleCaseExpression.
 java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
          Calls the visitSimpleCaseExpression method of the SyntaxObjectVisitor and passes that method this SimpleCaseExpression and an Object.

 

Methods inherited from class oracle.olapi.syntax.CaseExpression
getElseExpression

 

Methods inherited from class oracle.olapi.syntax.RowExpression
isCompositeObject

 

Methods inherited from class oracle.olapi.syntax.TypedExpression
abs, acos, addMonths, addMonths, ascii, asciiStr, asin, atan, atan2, between, bFileName, binToNum, bitAnd, cast, ceil, charToROWID, chr, chr, coalesce, compose, concat, concat, convert, convert, cos, cosh, currentDate, currentTime, dbTimeZone, decode, decompose, deref, div, div, div, div, div, dump, emptyBLOB, emptyCLOB, eq, eq, eq, eq, eq, existsNode, exp, extractDay, extractHour, extractMinute, extractMonth, extractSecond, extractTimeZoneAbbr, extractTimeZoneHour, extractTimeZoneMinute, extractTimeZoneRegion, extractXML, extractYear, floor, fromTZ, ge, ge, ge, ge, ge, getDataType, greatest, gt, gt, gt, gt, gt, hexToRAW, in, initcap, instr, instr2, instr4, instrB, instrC, isInfinite, isNAN, isNotNull, isNull, lastDay, le, le, le, le, le, least, length, length2, length4, lengthB, lengthC, like, like, like2, like4, likeC, ln, localTimestamp, log, lower, lpad, lt, lt, lt, lt, lt, ltrim, minus, minus, minus, minus, minus, minus, mod, monthsBetween, nanvl, ne, ne, ne, ne, ne, newTime, nextDay, nlsCharsetDeclLen, nlsCharsetID, nlsCharsetName, nlsInitcap, nlsLower, nlsSort, nlsUpper, notIn, nullIf, numToDSInterval, numToYMInterval, nvl, nvl2, oraHash, plus, plus, plus, plus, plus, power, rawToHex, rawToNHex, regexpInstr, regexpReplace, regexpSubstr, remainder, replace, round, rowIDToChar, rowIDToNChar, rpad, rtrim, scnToTimestamp, sessionTimeZone, sign, sin, sinh, soundex, sqrt, substr, substr2, substr4, substrB, substrC, sysContext, sysDate, sysExtractUTC, sysGUID, sysTimestamp, sysTypeID, tan, tanh, times, times, times, times, times, timestampToSCN, toBinaryDouble, toBinaryFloat, toChar, toChar, toCLOB, toDate, toDate, toDSInterval, toLOB, toMultiByte, toNChar, toNChar, toNCLOB, toNumber, toNumber, toNumber, toSingleByte, toTimestamp, toTimestampTZ, toYMInterval, translate, translateUsingCharCS, translateUsingNCharCS, treat, trim, trimLeading, trimTrailing, trunc, tzOffset, UID, unistr, upper, USER, userEnv, vsize, widthBucket

 

Methods inherited from class oracle.olapi.syntax.SyntaxObject
equals, equals, fromSyntax, fromSyntax, fromSyntax, fromSyntax, fromSyntax, isValid, toSyntax, toSyntax, toSyntax, toSyntax, toSyntax

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SimpleCaseExpression

public SimpleCaseExpression(TypedExpression switchExpression,
                            SimpleCase[] cases,
                            TypedExpression elseExpression)
Creates a SimpleCaseExpression that has a TypedExpression as the switch expression of the simple case expression clause of a CASE expression, an array of SimpleCase objects that contain the WHEN and THEN expressions of the simple case expression clause, and a TypedExpression as the ELSE clause of the CASE expression.
Parameters:
switchExpression - A TypedExpression that resolves to the switch expression of the simple case expression of a CASE expression.
cases - An array of SimpleCase objects that resolve to the WHEN and THEN expressions of the simple case expression clause.
elseExpression - A TypedExpression that resolves to the ELSE expression of the CASE expression.

SimpleCaseExpression

public SimpleCaseExpression(TypedExpression switchExpression,
                            java.util.List<SimpleCase> cases,
                            TypedExpression elseExpression)
Creates a SimpleCaseExpression that has a TypedExpression as the switch expression of the simple case expression clause of a CASE expression, a List of SimpleCase objects that contain the WHEN and THEN expressions of the simple case expression clause, and a TypedExpression as the ELSE clause of the CASE expression.
Parameters:
switchExpression - A TypedExpression that resolves to the switch expression of the simple case expression of a CASE expression.
cases - A List of SimpleCase objects that resolve to the WHEN and THEN expressions of the simple case expression clause.
elseExpression - A TypedExpression that resolves to the ELSE expression of the CASE expression.

Method Detail

visit

public java.lang.Object visit(SyntaxObjectVisitor visitor,
                              java.lang.Object context)
Calls the visitSimpleCaseExpression method of the SyntaxObjectVisitor and passes that method this SimpleCaseExpression and an Object.
Specified by:
visit in class SyntaxObject
Parameters:
visitor - A SyntaxObjectVisitor.
context - An Object.
Returns:
The Object returned by the visitSimpleCaseExpression method.

getCases

public SimpleCase[] getCases()
Gets the SimpleCase objects that contain the WHEN and THEN expressions of the simple case expression clause for this SimpleCaseExpression.
Returns:
An array of the SimpleCase objects associated with this SimpleCaseExpression.

getSwitchExpression

public TypedExpression getSwitchExpression()
Gets the TypedExpression that resolves to the expression to which Oracle Database compares the THEN expressions of the SimpleCase objects of this SimpleCaseExpression.
Returns:
A String that contains the switch expression of the simple case expression clause of the Case expression.

Skip navigation links

Copyright © 2002, 2008, Oracle. All rights reserved.