Skip navigation links

Oracle® OLAP Java API Reference
11g Release 2 (11.2)

E10794-05


oracle.olapi.syntax
Class IsCondition

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.Condition
                  extended by oracle.olapi.syntax.IsCondition

All Implemented Interfaces:
FunctionArgument

public final class IsCondition
extends Condition

A Condition that represents a special condition. An IsCondition determines whether an expression evaluates to null or to the special values INFINITE or NAN (not a number), which is the undefined result of an operation. The INFINITE and NAN conditions are the SQL floating-point conditions.

An IsCondition has the following associations:

The following table lists the possible combinations of comparison values and negation values, describes the results of operation that the comparison performs, and provides an example of the syntax for the condition. In the syntax, the value of the base expression is 'comm_pct'. If you passed the syntax to the SyntaxObject.fromSyntax method, then the method would return an IsCondition object that specifies the operation described.

An example of creating an IsCondition from a syntax example is the following, where metadataProvider is an MdmMetadataProvider:

 IsCondition ic = (IsCondition) SyntaxObject.fromSyntax("'com_pct' IS NAN",
                                                         metadataProvider);
Type of Comparison isNegated
Value
Operation Result Syntax Example
IS_INFINITE false Evaluates to true if the base expression is the special infinite value or to false it is not. 'com_pct' IS INFINITE
IS_INFINITE true Evaluates to true if the base expression is not the special infinite value or to false it is. 'com_pct' IS NOT INFINITE
IS_NAN false Evaluates to true if the base expression is the special not-a-number value or to false it is not. 'com_pct' IS NAN
IS_NAN true Evaluates to true if the base expression is not the special not-a-number value or to false it is. 'com_pct' IS NOT NAN
IS_NULL false Evaluates to true if the base expression is null or to false it is not. 'com_pct' IS NULL
IS_NULL true Evaluates to true if the base expression is not null or to false it is. 'com_pct' IS NOT NULL

Field Summary
static java.lang.String IS_INFINITE
          A constant for an operator that tests whether the value is infinite.
static java.lang.String IS_NAN
          A constant for an operator that tests whether the value is not a number.
static java.lang.String IS_NULL
          A constant for an operator that tests whether the value is null.

 

Constructor Summary
IsCondition(TypedExpression argument)
          Creates an IsCondition that has the specified argument, has a comparison type of IS_NULL, and does not include the NOT operator.
IsCondition(TypedExpression argument, boolean negate)
          Creates an IsCondition that has the specified argument and negation indicator, and has a comparison type of IS_NULL.
IsCondition(TypedExpression argument, java.lang.String comparisonType, boolean negate)
          Creates an IsCondition that has the specified argument, comparison type, and negation indicator.

 

Method Summary
 TypedExpression getBaseExpression()
          Gets the expression that is the basis of the condition determination.
 java.lang.String getComparison()
          Gets the comparison type, which can be one of the IsCondition constants.
 boolean isNegated()
          Indicates whether this IsCondition includes the NOT operator.
 java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
          Calls the visitIsCondition method of the SyntaxObjectVisitor and passes that method this IsCondition and an Object.

 

Methods inherited from class oracle.olapi.syntax.Condition
and, isCompositeObject, not, or

 

Methods inherited from class oracle.olapi.syntax.SyntaxObject
equals, equals, fromSyntax, fromSyntax, fromSyntax, fromSyntax, fromSyntax, isValid, toSyntax, 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

IS_NULL

public static final java.lang.String IS_NULL
A constant for an operator that tests whether the value is null.
See Also:
Constant Field Values

IS_NAN

public static final java.lang.String IS_NAN
A constant for an operator that tests whether the value is not a number.
See Also:
Constant Field Values

IS_INFINITE

public static final java.lang.String IS_INFINITE
A constant for an operator that tests whether the value is infinite.
See Also:
Constant Field Values

Constructor Detail

IsCondition

public IsCondition(TypedExpression argument,
                   java.lang.String comparisonType,
                   boolean negate)
Creates an IsCondition that has the specified argument, comparison type, and negation indicator.
Parameters:
argument - A TypedExpression that has the value to compare.
comparisonType - A String that specifies the comparison type, which can be one of the IsCondition constants.
negate - A boolean that specifies whether to include the NOT operator in the condition.

IsCondition

public IsCondition(TypedExpression argument,
                   boolean negate)
Creates an IsCondition that has the specified argument and negation indicator, and has a comparison type of IS_NULL.
Parameters:
argument - A TypedExpression that has the value to compare.
negate - A boolean that specifies whether to include the NOT operator in the condition.

IsCondition

public IsCondition(TypedExpression argument)
Creates an IsCondition that has the specified argument, has a comparison type of IS_NULL, and does not include the NOT operator.
Parameters:
argument - A TypedExpression that has the value to compare.

Method Detail

visit

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

getComparison

public java.lang.String getComparison()
Gets the comparison type, which can be one of the IsCondition constants.
Returns:
A String that has the comparison type.

isNegated

public boolean isNegated()
Indicates whether this IsCondition includes the NOT operator.
Returns:
A boolean that is true if this IsCondition includes the NOT operator or false if it does not.

getBaseExpression

public TypedExpression getBaseExpression()
Gets the expression that is the basis of the condition determination.
Returns:
A TypedExpression that has the value that is the basis of the test of the condition.

Skip navigation links

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