Package mondrian.olap4j
Class MondrianOlap4jConnection.Helper
- java.lang.Object
-
- 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
Constructors Constructor Description Helper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) OlapException
createException(String msg)
(package private) OlapException
createException(String msg, Throwable cause)
Creates an exception with a given cause.(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.OlapException
toOlapException(SQLException e)
Converts a SQLException to an OlapException.
-
-
-
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 exceptionmsg
- 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 exceptionmsg
- Messagecause
- Causing exception- Returns:
- New exception
-
createException
OlapException createException(String msg, Throwable cause)
Creates an exception with a given cause.- Parameters:
msg
- Messagecause
- 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
-
-