|
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.FunctionCondition
public final class FunctionCondition
A Condition that represents a condition that evaluates a FunctionArgument that produces a Boolean value. For example, the following code creates a FunctionCondition for the LNNVL function.
NumberExpression rhsArg = new NumberExpression(.2);
StringExpression lhsArg = new StringExpression("commission_pct");
ValueComparisonCondition funcArg =
new ValueComparisonCondition(lhsArg,
ValueComparisonCondition.LT,
rhsArg);
FunctionCondition fc = new FunctionCondition("LNNVL", funcArg);
The toSyntax method of the fc object returns a String that contains the following:
LNNVL('commission_pct' < 0.2)
You can create the same FunctionCondition by using the SyntaxObject.fromSyntax method, as in the following, where metadataProvider is an MdmMetadataProvider:
FunctionCondition fc = (FunctionCondition)
SyntaxObject.fromSyntax("LNNVL('commission_pct' < .2)",
metadataProvider);
| Constructor Summary | |
|---|---|
FunctionCondition(java.lang.String functionName)Creates a FunctionCondition that has the specified function, which requires no arguments. |
|
FunctionCondition(java.lang.String functionName, FunctionArgument arg1)Creates a FunctionCondition that has the specified function, which takes one argument. |
|
FunctionCondition(java.lang.String functionName, FunctionArgument[] args)Creates a FunctionCondition that has the specified function. |
|
FunctionCondition(java.lang.String functionName, FunctionArgument arg1, FunctionArgument arg2)Creates a FunctionCondition that has the specified function, which takes two arguments. |
|
FunctionCondition(java.lang.String functionName, FunctionArgument arg1, FunctionArgument arg2, FunctionArgument arg3)Creates a FunctionCondition that has the specified function, which takes three arguments. |
|
FunctionCondition(java.lang.String functionName, FunctionArgument arg1, FunctionArgument arg2, FunctionArgument arg3, FunctionArgument arg4)Creates a FunctionCondition that has the specified function, which takes four arguments. |
|
FunctionCondition(java.lang.String functionName, java.util.List<FunctionArgument> args) |
|
| Method Summary | |
|---|---|
FunctionArgument[] |
getArguments()Gets the arguments for this FunctionCondition. |
FunctionDescriptor |
getFunctionDescriptor()Gets the FunctionDescriptor for this FunctionCondition. |
java.lang.String |
getFunctionName()Gets the name of the function that this FunctionCondition represents. |
java.lang.Object |
visit(SyntaxObjectVisitor visitor, java.lang.Object context)Calls the visitFunctionCondition method of the SyntaxObjectVisitor and passes that method this FunctionCondition 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 |
| Constructor Detail |
|---|
public FunctionCondition(java.lang.String functionName,
FunctionArgument[] args)
FunctionCondition that has the specified function.
functionName - A String that contains the name of the function.args - An array of FunctionArgument objects that have the arguments required by the function.
public FunctionCondition(java.lang.String functionName,
java.util.List<FunctionArgument> args)
public FunctionCondition(java.lang.String functionName)
FunctionCondition that has the specified function, which requires no arguments.
functionName - A String that contains the name of the function.
public FunctionCondition(java.lang.String functionName,
FunctionArgument arg1)
FunctionCondition that has the specified function, which takes one argument.
functionName - A String that contains the name of the function.arg1 - A FunctionArgument that has the argument required by the function.
public FunctionCondition(java.lang.String functionName,
FunctionArgument arg1,
FunctionArgument arg2)
FunctionCondition that has the specified function, which takes two arguments.
functionName - A String that contains the name of the function.arg1 - A FunctionArgument that has the first argument required by the function.arg2 - A FunctionArgument that has the second argument required by the function.
public FunctionCondition(java.lang.String functionName,
FunctionArgument arg1,
FunctionArgument arg2,
FunctionArgument arg3)
FunctionCondition that has the specified function, which takes three arguments.
functionName - A String that contains the name of the function.arg1 - A FunctionArgument that has the first argument required by the function.arg2 - A FunctionArgument that has the second argument required by the function.arg3 - A FunctionArgument that has the third argument required by the function.
public FunctionCondition(java.lang.String functionName,
FunctionArgument arg1,
FunctionArgument arg2,
FunctionArgument arg3,
FunctionArgument arg4)
FunctionCondition that has the specified function, which takes four arguments.
functionName - A String that contains the name of the function.arg1 - A FunctionArgument that has the first argument required by the function.arg2 - A FunctionArgument that has the second argument required by the function.arg3 - A FunctionArgument that has the third argument required by the function.arg4 - A FunctionArgument that has the fourth argument required by the function.| Method Detail |
|---|
public java.lang.Object visit(SyntaxObjectVisitor visitor,
java.lang.Object context)
visitFunctionCondition method of the SyntaxObjectVisitor and passes that method this FunctionCondition and an Object.visit in class SyntaxObjectvisitor - A SyntaxObjectVisitor.context - An Object.Object returned by the visitFunctionCondition method.public FunctionArgument[] getArguments()
FunctionCondition.FunctionArgument objects that are the arguments for this FunctionCondition.public FunctionDescriptor getFunctionDescriptor()
FunctionDescriptor for this FunctionCondition.FunctionDescriptor for this FunctionCondition.public java.lang.String getFunctionName()
FunctionCondition represents.String that contains the name of the function.
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||