Skip navigation links


com.essbase.api.datasource
Interface IEssMaxlSession

All Superinterfaces:
IEssBaseObject

public interface IEssMaxlSession
extends IEssBaseObject

The IEssMaxlSession interface.

Version:
1.0, 10/11/2004
Author:
Abhijeet Katariya

Field Summary
static int PROP_NAME
           
static int s_countProperties
           
static IEssValueAny.EEssDataType[] s_propDataTypes
           
static IEssProperties.EEssPropertyMode[] s_propModes
           
static java.lang.String[] s_propNames
           

 

Method Summary
 void close()
          Disconnects the maxl session from the olap server.
 void enablePaging(boolean enable)
          Indicates that the results should be transfered to the client system.
 boolean execute(java.lang.String maxlStatement)
          Executes the given maxl script statement.
 java.util.ArrayList getMessages()
          Returns the messages generated during the execution of the statement and retrieving the result.
 java.lang.String getName()
          Gets the name of this maxl session.
 IEssMaxlResultSet getResultSet()
          Gets the result of the last maxl statement executed.
 void setDelimiter(char delimiter)
          Characted to be used as delimiter while writing output to file.
 void setExternalTypes(java.util.HashMap typesMap)
          Allows specifying custom data types.
 void setResultSetFetchSize(int size)
          Gives the MAXL statement engine a hint as to the number of rows that should be fetched from the Essbase when more rows are needed for this ResultSet object.
 void updateMaxLOptions()
          Sends the additional options to the server.
 void writeToFile(java.io.File localfile)
          Writes output to the specified local file in UTF-8 format.

 

Field Detail

PROP_NAME

static final int PROP_NAME
See Also:
Constant Field Values

s_countProperties

static final int s_countProperties
See Also:
Constant Field Values

s_propNames

static final java.lang.String[] s_propNames

s_propDataTypes

static final IEssValueAny.EEssDataType[] s_propDataTypes

s_propModes

static final IEssProperties.EEssPropertyMode[] s_propModes

Method Detail

getName

java.lang.String getName()
                         throws com.essbase.api.base.EssException
Gets the name of this maxl session.
Returns:
The application name.
Throws:
com.essbase.api.base.EssException - if an error occur.

execute

boolean execute(java.lang.String maxlStatement)
                throws com.essbase.api.base.EssException
Executes the given maxl script statement.
Parameters:
maxlStatement - The maxl script statement that has to be executed.
Returns:
true if successful; false otherwise.
Throws:
com.essbase.api.base.EssException - if an error occurs.

getResultSet

IEssMaxlResultSet getResultSet()
                               throws com.essbase.api.base.EssException
Gets the result of the last maxl statement executed. This method is not supported in this version and will throw an exception.
Returns:
An instance of IEssMaxlResultSet interface.
Throws:
com.essbase.api.base.EssException - if an error occurs.

setResultSetFetchSize

void setResultSetFetchSize(int size)
Gives the MAXL statement engine a hint as to the number of rows that should be fetched from the Essbase when more rows are needed for this ResultSet object. If the fetch size specified is zero, the MAXL Engine ignores the value set and uses a default value of 256. The fetch size may be changed at any time.
Parameters:
size - Max No. of rows to be fetched from the Essbase.

close

void close()
           throws com.essbase.api.base.EssException
Disconnects the maxl session from the olap server.
Throws:
com.essbase.api.base.EssException - if an error occurs.

enablePaging

void enablePaging(boolean enable)
                  throws com.essbase.api.base.EssException
Indicates that the results should be transfered to the client system. This is effective for MaxL queries that result in rows more than that defined as FetchSize. The execution retrieves the result in chunks of FetchSize and transfers the result to the client before building and returning the complete result set. This is effective only when followed by updateMaxLOptions() for the property to get set.
Parameters:
enable - - boolean, true to enable paging, default is false
Throws:
com.essbase.api.base.EssException

writeToFile

void writeToFile(java.io.File localfile)
                 throws com.essbase.api.base.EssException
Writes output to the specified local file in UTF-8 format. This is useful when the query results in a huge response. The first row is the column header, followed by data. The columns are separated with the specified delimiter. Invoke this API before using the execute(String)().
Parameters:
localfile - - java.io.File instance for the output
Throws:
com.essbase.api.base.EssException

setDelimiter

void setDelimiter(char delimiter)
                  throws com.essbase.api.base.EssException
Characted to be used as delimiter while writing output to file. This should be followed by updateMaxLOptions() for the property to get set.
Parameters:
delimiter -
Throws:
com.essbase.api.base.EssException

updateMaxLOptions

void updateMaxLOptions()
                       throws com.essbase.api.base.EssException
Sends the additional options to the server.
Throws:
com.essbase.api.base.EssException

setExternalTypes

void setExternalTypes(java.util.HashMap typesMap)
                      throws com.essbase.api.base.EssException
Allows specifying custom data types. Entries for both key and value types should be instances of Integer. One entry per internal type is a required. The keys are internal types and the mapping values are the expected external types. Ex shows the mapping for the defaults : new Integer(MaxlConstants.MAXL_DTINT_BOOL) - new Integer(MaxlConstants.MAXL_DTEXT_BOOL) new Integer(MaxlConstants.MAXL_DTINT_NUMBER) - new Integer(MaxlConstants.MAXL_DTEXT_DOUBLE) new Integer(MaxlConstants.MAXL_DTINT_DOUBLE) - new Integer(MaxlConstants.MAXL_DTINT_DOUBLE) new Integer(MaxlConstants.MAXL_DTINT_CHAR) - new Integer(MaxlConstants.MAXL_DTINT_STRING) This should be followed by updateMaxLOptions() for the property to get set.
Parameters:
typesMap -
Throws:
com.essbase.api.base.EssException

getMessages

java.util.ArrayList getMessages()
                                throws com.essbase.api.base.EssException
Returns the messages generated during the execution of the statement and retrieving the result.
Returns:
ArrayList - list of messages of type String
Throws:
com.essbase.api.base.EssException

Skip navigation links