Copyright © 2011 Citra Technologies. All Rights Reserved.

com.citra.pivot.olap.mdx
Class MDXResolver

java.lang.Object
  extended by com.citra.pivot.olap.mdx.MDXResolver
Direct Known Subclasses:
Olap4jResolver

public abstract class MDXResolver
extends Object

MDXResolver is responsible for converting an OlapSelection to an MDX string statement, execute it on the database and return the result.


Constructor Summary
MDXResolver()
          Constructs an MDXResolver.
 
Method Summary
 String convertToMDX(OlapSelection selection, Connection connection, MDXDataSource source)
          Executes a StringSelection and returns the result as an TabularSet.
 AxisOlapSet executeAxis(AxisSelection selection, Connection connection, MDXDataSource source)
          Executes a AxisSelection and returns the result as an AxisOlapSet.
 Object executeCustom(CustomSelection selection, Connection connection, MDXDataSource source)
          Executes a CustomSelection and returns the result as an arbitray Java Object.
 Boolean executeLogical(LogicalSelection selection, Connection connection, MDXDataSource source)
          Executes a LogicalSelection and returns the result as a Boolean.
 OlapCellSet executeMDX(String mdx, OlapSelection selection, Connection connection, MDXDataSource source)
          Executes an MDX statement and returns the result as an OlapCellSet.
abstract  OlapCellSet executeMDXImpl(String mdx, OlapSelection selection, Connection connection, MDXDataSource source)
          Executes an MDX statement and returns the result as an OlapCellSet.
 OlapMember executeMember(MemberSelection selection, Connection connection, MDXDataSource source)
          Executes a MemberSelection and returns the result as an OlapMember.
 OlapCellSet executeQuery(QuerySelection selection, Connection connection, MDXDataSource source)
          Executes a QuerySelection and returns the result as an OlapCellSet.
 OlapSet executeSet(SetSelection selection, Connection connection, MDXDataSource source)
          Executes a SetSelection and returns the result as an OlapSet.
 String executeString(StringSelection selection, Connection connection, MDXDataSource source)
          Executes a StringSelection and returns the result as a String.
 TabularSet executeTabular(TabularSelection selection, Connection connection, MDXDataSource source)
          Executes a TabularSelection and returns the result as a TabularSet.
 OlapTuple executeTuple(TupleSelection selection, Connection connection, MDXDataSource source)
          Executes a TupleSelection and returns the result as an OlapTuple.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDXResolver

public MDXResolver()
Constructs an MDXResolver.

Method Detail

convertToMDX

public String convertToMDX(OlapSelection selection,
                           Connection connection,
                           MDXDataSource source)
                    throws DataSourceException
Executes a StringSelection and returns the result as an TabularSet.

Parameters:
selection - the tabular selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeAxis

public AxisOlapSet executeAxis(AxisSelection selection,
                               Connection connection,
                               MDXDataSource source)
                        throws DataSourceException
Executes a AxisSelection and returns the result as an AxisOlapSet.

Parameters:
selection - the axis selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeCustom

public Object executeCustom(CustomSelection selection,
                            Connection connection,
                            MDXDataSource source)
                     throws DataSourceException
Executes a CustomSelection and returns the result as an arbitray Java Object.

Parameters:
selection - the custom selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeLogical

public Boolean executeLogical(LogicalSelection selection,
                              Connection connection,
                              MDXDataSource source)
                       throws DataSourceException
Executes a LogicalSelection and returns the result as a Boolean.

Parameters:
selection - the logical selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeMDX

public final OlapCellSet executeMDX(String mdx,
                                    OlapSelection selection,
                                    Connection connection,
                                    MDXDataSource source)
                             throws DataSourceException
Executes an MDX statement and returns the result as an OlapCellSet.

Parameters:
mdx - the MDX statement to execute
selection - the selection that was converted to the MDX string
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeMDXImpl

public abstract OlapCellSet executeMDXImpl(String mdx,
                                           OlapSelection selection,
                                           Connection connection,
                                           MDXDataSource source)
                                    throws DataSourceException
Executes an MDX statement and returns the result as an OlapCellSet. This method should be implemented from MDXResolver subclasses.

Parameters:
mdx - the MDX statement to execute
selection - the selection that was converted to the MDX string
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeMember

public OlapMember executeMember(MemberSelection selection,
                                Connection connection,
                                MDXDataSource source)
                         throws DataSourceException
Executes a MemberSelection and returns the result as an OlapMember.

Parameters:
selection - the member selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeQuery

public OlapCellSet executeQuery(QuerySelection selection,
                                Connection connection,
                                MDXDataSource source)
                         throws DataSourceException
Executes a QuerySelection and returns the result as an OlapCellSet.

Parameters:
selection - the query selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeSet

public OlapSet executeSet(SetSelection selection,
                          Connection connection,
                          MDXDataSource source)
                   throws DataSourceException
Executes a SetSelection and returns the result as an OlapSet.

Parameters:
selection - the set selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeString

public String executeString(StringSelection selection,
                            Connection connection,
                            MDXDataSource source)
                     throws DataSourceException
Executes a StringSelection and returns the result as a String.

Parameters:
selection - the string selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeTabular

public TabularSet executeTabular(TabularSelection selection,
                                 Connection connection,
                                 MDXDataSource source)
                          throws DataSourceException
Executes a TabularSelection and returns the result as a TabularSet.

Parameters:
selection - the tabular selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

executeTuple

public OlapTuple executeTuple(TupleSelection selection,
                              Connection connection,
                              MDXDataSource source)
                       throws DataSourceException
Executes a TupleSelection and returns the result as an OlapTuple.

Parameters:
selection - the tuple selection
connection - the underlying connection to use
source - the MDXDataSource used
Returns:
the result from executing the selection
Throws:
DataSourceException

Copyright © 2011 Citra Technologies. All Rights Reserved.