Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

oracle.express.spl
Class SPLExecutor

java.lang.Object
  |
  +--oracle.express.spl.SPLExecutor

public class SPLExecutor
extends java.lang.Object

An object that accepts a String and sends it to Oracle OLAP for internal execution or evaluation.

Using an SPLExecutor, an application can execute a command in an the OLAP Data Manipulation Language (DML), which is also referred to as a Stored Procedure Language (SPL). Alternatively, an application can evaluate an expression in that language.

Depending on the evaluation method that you use, the return value of the method is a boolean, int, double, or other data type. An executed command always returns a String.

For more information about the DML, see the Oracle OLAP DML Reference.


Constructor Summary
SPLExecutor(oracle.jdbc.OracleConnection connection)
          Creates a new SPLExecutor object.

 

Method Summary
 boolean evaluateBooleanExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML BOOLEAN expression, evaluates it in Oracle OLAP, and returns the result as a boolean value.
 java.util.Date evaluateDateExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML DATE expression, evaluates it in Oracle OLAP, and returns the result as a Date.
 double evaluateDecimalExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP to a DML DECIMAL, and returns the result as a double value.
 int evaluateIntegerExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP as a DML INTEGER, and returns the result as an int value.
 float evaluateShortDecimalExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP as a DML SHORTDECIMAL, and returns the result as a float value.
 short evaluateShortIntegerExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP to a DML SHORTINTEGER, and returns the result as a short value.
 java.lang.String evaluateStringExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML TEXT expression, evaluates it in Oracle OLAP, and returns the result as a String.
 java.lang.String[] evaluateStringListExpression(java.lang.String expr)
          Interprets the String specified in expr as a DML TEXT expression, evaluates it in Oracle OLAP, and returns the result as an array of String objects.
 java.lang.String executeCommand(java.lang.String command)
          Interprets the String specified in command as a DML command, executes it in Oracle OLAP, and returns the result of the command.
 void initialize()
          Initializes the SPLExecutor.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SPLExecutor

public SPLExecutor(oracle.jdbc.OracleConnection connection)
Creates a new SPLExecutor object. After creating an SPLExecutor, call its initialize method.
Parameters:
connection - The oracle.jdbc.OracleConnection that you used to connect to the Oracle database.
Method Detail

initialize

public void initialize()
                throws java.sql.SQLException
Initializes the SPLExecutor. Always call this method after creating a new SPLExecutor object. This method throws a java.sql.SQLException if an error occurs when OLAP OLAP is preparing for its OLAP DML interactions.

executeCommand

public java.lang.String executeCommand(java.lang.String command)
                                throws ObjectClosedException,
ExpressServerException
Interprets the String specified in command as a DML command, executes it in Oracle OLAP, and returns the result of the command.
Parameters:
command - A String containing the DML command to execute.
Returns:
A String containing the exectution log that results from the execution of the specified DML command. If the command was successful, then the log contains the return value of the command as a String. If the command was unsuccessful, then the String contains the resulting error report.

evaluateIntegerExpression

public int evaluateIntegerExpression(java.lang.String expr)
                              throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP as a DML INTEGER, and returns the result as an int value.
Parameters:
expr - A String that can be interpreted as a numeric expression by Oracle OLAP.
Returns:
The int value to which the expression evaluated.

evaluateShortIntegerExpression

public short evaluateShortIntegerExpression(java.lang.String expr)
                                     throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP to a DML SHORTINTEGER, and returns the result as a short value.
Parameters:
expr - A String that can be interpreted as a numeric expression by Oracle OLAP.
Returns:
The short value to which the expression evaluated.

evaluateDecimalExpression

public double evaluateDecimalExpression(java.lang.String expr)
                                 throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP to a DML DECIMAL, and returns the result as a double value.
Parameters:
expr - A String that can be interpreted as a numeric expression by Oracle OLAP.
Returns:
The double value to which the expression evaluated.

evaluateShortDecimalExpression

public float evaluateShortDecimalExpression(java.lang.String expr)
                                     throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML numeric expression, evaluates it in Oracle OLAP as a DML SHORTDECIMAL, and returns the result as a float value.
Parameters:
expr - A String that can be interpreted as a numeric expression by Oracle OLAP.
Returns:
The float value to which the expression evaluated.

evaluateStringExpression

public java.lang.String evaluateStringExpression(java.lang.String expr)
                                          throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML TEXT expression, evaluates it in Oracle OLAP, and returns the result as a String.
Parameters:
expr - A String that can be interpreted as a TEXT expression by Oracle OLAP.
Returns:
The String to which the expression evaluated.

evaluateStringListExpression

public java.lang.String[] evaluateStringListExpression(java.lang.String expr)
                                                throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML TEXT expression, evaluates it in Oracle OLAP, and returns the result as an array of String objects.
Parameters:
expr - A String that can be interpreted as a TEXT expression by Oracle OLAP.
Returns:
The array of String objects to which the expression evaluated.

evaluateBooleanExpression

public boolean evaluateBooleanExpression(java.lang.String expr)
                                  throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML BOOLEAN expression, evaluates it in Oracle OLAP, and returns the result as a boolean value.
Parameters:
expr - A String that can be interpreted as a BOOLEAN expression by Oracle OLAP.
Returns:
The boolean value to which the expression evaluated.

evaluateDateExpression

public java.util.Date evaluateDateExpression(java.lang.String expr)
                                      throws NAValueException,
ObjectClosedException,
ExpressServerException
Interprets the String specified in expr as a DML DATE expression, evaluates it in Oracle OLAP, and returns the result as a Date.
Parameters:
expr - A String that can be interpreted as a DATE expression by Oracle OLAP.
Returns:
The Date to which the expression evaluated.

Oracle OLAP Java API Reference
10g Release 1 (10.1)

B10994-01

Copyright © 2002, 2003, Oracle. All Rights Reserved.