Skip navigation links

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

B28128-03


oracle.olapi.syntax
Class IntervalExpression

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.IntervalExpression

All Implemented Interfaces:
FunctionArgument

public final class IntervalExpression
extends RowExpression

A RowExpression that represents an interval expression, which is similar to a SQL interval expression. An IntervalExpression resolves to a value that has a data type of INTERVAL_YEAR_TO_MONTH or INTERVAL_DAY_TO_SECOND. For more information, see Interval Expressions in Oracle Database SQL Language Reference.


Field Summary
static java.lang.String DAY_TO_SECOND
          A constant that represents the DAY_TO_SECOND operator for an IntervalExpression.
static java.lang.String YEAR_TO_MONTH
          A constant that represents the YEAR_TO_MONTH operator for an IntervalExpression.

 

Constructor Summary
IntervalExpression(TypedExpression base, java.lang.String operator, TypedExpression firstPrecision, TypedExpression secondPrecision)
          Creates an IntervalExpression with the specified base expression, operator, and precision values.

 

Method Summary
 TypedExpression getBaseExpression()
          Gets the base expression of this IntervalExpression.
 TypedExpression getFirstPrecisionExpression()
          Gets the first, or leading field, precision value of this IntervalExpression.
 java.lang.String getOperator()
          Gets the operator for this IntervalExpression.
 TypedExpression getSecondPrecisionExpression()
          Gets the second, or fractional second, precision value of this IntervalExpression.
 java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
          Calls the visitIntervalExpression method of the SyntaxObjectVisitor and passes that method this IntervalExpression and an Object.

 

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

 

Field Detail

DAY_TO_SECOND

public static final java.lang.String DAY_TO_SECOND
A constant that represents the DAY_TO_SECOND operator for an IntervalExpression.
See Also:
Constant Field Values

YEAR_TO_MONTH

public static final java.lang.String YEAR_TO_MONTH
A constant that represents the YEAR_TO_MONTH operator for an IntervalExpression.
See Also:
Constant Field Values

Constructor Detail

IntervalExpression

public IntervalExpression(TypedExpression base,
                          java.lang.String operator,
                          TypedExpression firstPrecision,
                          TypedExpression secondPrecision)
Creates an IntervalExpression with the specified base expression, operator, and precision values.
Parameters:
base - A TypedExpression that is the base of the interval expression. In the SQL language reference, this is the interval_value_expr expression.
operator - One of the constants of this class.
firstPrecision - A TypedExpression that resolves to an integer value from 0 to 9. In the SQL language reference, this is the leading_field_precision value.
secondPrecision - A TypedExpression that resolves to an integer value from 0 to 9. In the SQL language reference, this is the fractional_second_precision value. Use this parameter only with the DAY_TO_SECOND operator. If the operator is MONTH_TO_YEAR, then specify null for this parameter.

Method Detail

visit

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

getOperator

public java.lang.String getOperator()
Gets the operator for this IntervalExpression.
Returns:
A String that contains the operator for this IntervalExpression, which is the value of one of the constants of this class.

getBaseExpression

public TypedExpression getBaseExpression()
Gets the base expression of this IntervalExpression.
Returns:
A TypedExpression that resolves to an interval value expression.

getFirstPrecisionExpression

public TypedExpression getFirstPrecisionExpression()
Gets the first, or leading field, precision value of this IntervalExpression.
Returns:
A TypedExpression that resolves to an integer value.

getSecondPrecisionExpression

public TypedExpression getSecondPrecisionExpression()
Gets the second, or fractional second, precision value of this IntervalExpression. This parameter is valid only for an interval expression with the DAY_TO_SECOND operator.
Returns:
A TypedExpression that resolves to an integer value.

Skip navigation links

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