|
Oracle® OLAP Java API Reference 12c Release 1 (12.1) E17708-05 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
oracle.olapi.syntax.SyntaxObject
oracle.olapi.syntax.DataObject
oracle.olapi.syntax.Expression
oracle.olapi.syntax.Condition
oracle.olapi.syntax.LikeCondition
public final class LikeCondition
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 |
LIKEA constant for an operator that tests characters in the input character set. |
static java.lang.String |
LIKE2A constant for an operator that tests UCS2 code points. |
static java.lang.String |
LIKE4A constant for an operator that tests UCS4 code points. |
static java.lang.String |
LIKECA 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 |
|---|
public static final java.lang.String LIKE
public static final java.lang.String LIKEC
public static final java.lang.String LIKE2
public static final java.lang.String LIKE4
| Constructor Detail |
|---|
public LikeCondition(TypedExpression lhsExpression,
java.lang.String operator,
TypedExpression rhsExpression,
TypedExpression escapeExpression,
boolean negate)
LikeCondition that has the specified left-hand-side expression, operator, right-hand-side expression, escape character, and negation indicator.
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.
public LikeCondition(TypedExpression lhsExpression,
java.lang.String operator,
TypedExpression rhsExpression)
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.
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 |
|---|
public java.lang.Object visit(SyntaxObjectVisitor visitor,
java.lang.Object context)
visitLikeCondition method of the SyntaxObjectVisitor and passes that method this LikeCondition and an Object.visit in class SyntaxObjectvisitor - A SyntaxObjectVisitor.context - An Object.Object returned by the visitLikeCondition method.public boolean isNegated()
LikeCondition includes the NOT operator.boolean that is true if this LikeCondition includes the NOT operator or false if it does not.public java.lang.String getOperator()
LikeCondition, which is one of the constants of this class.String that contains the operator for this LikeCondition.public TypedExpression getEscapeExpression()
LikeCondition.String that contains the escape expression for this LikeCondition.public TypedExpression getLhsExpression()
LikeCondition, which contains the text to search.TypedExpression that is the left-hand-side argument of this LikeCondition.public TypedExpression getRhsExpression()
LikeCondition, which contains the text pattern to search for.TypedExpression that is the right-hand-side argument of this LikeCondition.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||