Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot.olap.data
Interface Connection

All Known Implementing Classes:
TableConnection

public interface Connection

This class represents a connection to an underlying DataSource.


Method Summary
 void close()
          Closes the connection to the underlying datasource.
 Object execute(OlapSelection selection)
          Evaluates the selection passed as argument and returns the result.
 OlapCube getCube()
          Returns the connection's associated cube.
 Locale getLocale()
          Retrieves the java locale currently in use.
 OlapSchema getSchema()
          Retrieves the schema of the connection.
 void setCube(OlapCube cube)
          Assigns the connection's cube.
 void setLocale(Locale locale)
          Assigns the java locale to use.
 

Method Detail

close

void close()
           throws DataSourceException
Closes the connection to the underlying datasource.

Throws:
DataSourceException

execute

Object execute(OlapSelection selection)
               throws DataSourceException
Evaluates the selection passed as argument and returns the result. The value and the type returned depends on the selection argument.

Parameters:
selection - defines what to select from the datasource
Returns:
the selection's evaluated result
Throws:
DataSourceException

getCube

OlapCube getCube()
Returns the connection's associated cube.

Returns:
the cube

getLocale

Locale getLocale()
Retrieves the java locale currently in use. The locale is applied to members and measure values returned.

Returns:
the currently assigned locale

getSchema

OlapSchema getSchema()
Retrieves the schema of the connection. The schema serves as a starting point for getting members and making queries.

Returns:
the datasource's connection

setCube

void setCube(OlapCube cube)
Assigns the connection's cube.

Parameters:
cube - the cube to assign

setLocale

void setLocale(Locale locale)
Assigns the java locale to use. The locale is applied to members and measure values returned.

Parameters:
locale - the locale to assign

Copyright © 2011 Citra Technologies. All Rights Reserved.