mondrian.olap4j
Class MondrianOlap4jConnection.Helper

java.lang.Object
  extended by mondrian.olap4j.MondrianOlap4jConnection.Helper
Enclosing class:
MondrianOlap4jConnection

static class MondrianOlap4jConnection.Helper
extends Object

Package-private helper class which encapsulates policies which are common throughout the driver. These policies include exception handling and factory methods.

 

Constructor Summary
MondrianOlap4jConnection.Helper()
           
 
Method Summary
(package private)  OlapException createException(Cell context, String msg)
          Creates an exception in the context of a particular Cell.
(package private)  OlapException createException(Cell context, String msg, Throwable cause)
          Creates an exception in the context of a particular Cell and with a given cause.
(package private)  OlapException createException(String msg)
           
(package private)  OlapException createException(String msg, Throwable cause)
          Creates an exception with a given cause.
 OlapException toOlapException(SQLException e)
          Converts a SQLException to an OlapException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MondrianOlap4jConnection.Helper

MondrianOlap4jConnection.Helper()
Method Detail

createException

OlapException createException(String msg)

createException

OlapException createException(Cell context,
                              String msg)
Creates an exception in the context of a particular Cell.

Parameters:
context - Cell context for exception
msg - Message
Returns:
New exception

createException

OlapException createException(Cell context,
                              String msg,
                              Throwable cause)
Creates an exception in the context of a particular Cell and with a given cause.

Parameters:
context - Cell context for exception
msg - Message
cause - Causing exception
Returns:
New exception

createException

OlapException createException(String msg,
                              Throwable cause)
Creates an exception with a given cause.

Parameters:
msg - Message
cause - Causing exception
Returns:
New exception

toOlapException

public OlapException toOlapException(SQLException e)
Converts a SQLException to an OlapException. Casts the exception if it is already an OlapException, wraps otherwise.

This method is typically used as an adapter for SQLException instances coming from a base class, where derived interface declares that it throws the more specific OlapException.

Parameters:
e - Exception
Returns:
Exception as an OlapException

SourceForge.net_Logo