Skip navigation links

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

E10794-05


oracle.olapi.syntax
Class LikeCondition

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

All Implemented Interfaces:
FunctionArgument

public final class LikeCondition
extends Condition

A Condition that represents a pattern-matching condition that compares the values of StringExpression objects. The operators of a LikeCondition specify a test that can match patterns defined by special pattern-matching ("wildcard") characters.

The left-hand-side expression of a LikeCondition specifies the text expression to search.

The operator is one of the constants of the class, which are LIKE, LIKEC, LIKE2, and LIKE4.

The right-hand-side expression specifies the pattern to search for. The pattern can contain these wildcard characters:

The escape expression is a text expression, usually a literal, that is one character long. This escape character identifies an underscore or a percent sign in the pattern as a literal character instead of a wildcard character. You can also search for the escape character itself by repeating it. For example, if @ is the escape character, then you can use @% to search for % and @@ to search for @.


Field Summary
static java.lang.String LIKE
          A constant for an operator that tests characters in the input character set.
static java.lang.String LIKE2
          A constant for an operator that tests UCS2 code points.
static java.lang.String LIKE4
          A constant for an operator that tests UCS4 code points.
static java.lang.String LIKEC
          A constant for an operator that tests Unicode complete characters.

 

Constructor Summary
LikeCondition(TypedExpression lhsExpression, java.lang.String operator, TypedExpression rhsExpression)
          Creates a LikeCondition that has the specified left-hand-side expression, operator, and right-hand-side expression, does not have an escape character, and is not negated.
LikeCondition(TypedExpression lhsExpression, java.lang.String operator, TypedExpression rhsExpression, TypedExpression escapeExpression, boolean negate)
          Creates a LikeCondition that has the specified left-hand-side expression, operator, right-hand-side expression, escape character, and negation indicator.

 

Method Summary
 TypedExpression getEscapeExpression()
          Gets the escape expression for this LikeCondition.
 TypedExpression getLhsExpression()
          Gets the expression that is the left-hand-side argument of this LikeCondition, which contains the text to search.
 java.lang.String getOperator()
          Gets the operator for this LikeCondition, which is one of the constants of this class.
 TypedExpression getRhsExpression()
          Gets the expression that is the right-hand-side argument of this LikeCondition, which contains the text pattern to search for.
 boolean isNegated()
          Indicates whether this LikeCondition includes the NOT operator.
 java.lang.Object visit(SyntaxObjectVisitor visitor, java.lang.Object context)
          Calls the visitLikeCondition method of the SyntaxObjectVisitor and passes that method this LikeCondition 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

LIKE

public static final java.lang.String LIKE
A constant for an operator that tests characters in the input character set.
See Also:
Constant Field Values

LIKEC

public static final java.lang.String LIKEC
A constant for an operator that tests Unicode complete characters. It treats a Unicode supplementary character as two characters.
See Also:
Constant Field Values

LIKE2

public static final java.lang.String LIKE2
A constant for an operator that tests UCS2 code points. It treats a Unicode supplementary character as one character.
See Also:
Constant Field Values

LIKE4

public static final java.lang.String LIKE4
A constant for an operator that tests UCS4 code points. It treats a composite character as one character.
See Also:
Constant Field Values

Constructor Detail

LikeCondition

public LikeCondition(TypedExpression lhsExpression,
                     java.lang.String operator,
                     TypedExpression rhsExpression,
                     TypedExpression escapeExpression,
                     boolean negate)
Creates a LikeCondition that has the specified left-hand-side expression, operator, right-hand-side expression, escape character, and negation indicator.
Parameters:
lhsExpression - A TypedExpression that has the text expression for the search value.
operator - A LikeCondition constant that specifies the opeator for the condition test.
rhsExpression - A TypedExpression that has the text expression for the pattern.
escapeExpression - A TypedExpression that has the text expression to use as the escape character.
negate - A boolean that if true adds NOT to the operator or if false does not add NOT to the operator.

LikeCondition

public LikeCondition(TypedExpression lhsExpression,
                     java.lang.String operator,
                     TypedExpression rhsExpression)
Creates a LikeCondition that has the specified left-hand-side expression, operator, and right-hand-side expression, does not have an escape character, and is not negated. For a LikeCondition created by this constructor, the getEscapeExpression method returns null and the isNegated method returns false.
Parameters:
lhsExpression - A TypedExpression that has the text expression for the search value.
operator - A LikeCondition constant that specifies the opeator for the condition test.
rhsExpression - A TypedExpression that has the text expression for the pattern.

Method Detail

visit

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

isNegated

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

getOperator

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

getEscapeExpression

public TypedExpression getEscapeExpression()
Gets the escape expression for this LikeCondition.
Returns:
A String that contains the escape expression for this LikeCondition.

getLhsExpression

public TypedExpression getLhsExpression()
Gets the expression that is the left-hand-side argument of this LikeCondition, which contains the text to search.
Returns:
A TypedExpression that is the left-hand-side argument of this LikeCondition.

getRhsExpression

public TypedExpression getRhsExpression()
Gets the expression that is the right-hand-side argument of this LikeCondition, which contains the text pattern to search for.
Returns:
A TypedExpression that is the right-hand-side argument of this LikeCondition.

Skip navigation links

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