com.tonbeller.jpivot.xmla
Class XMLA_Model

java.lang.Object
  extended by com.tonbeller.jpivot.core.ModelSupport
      extended by com.tonbeller.jpivot.olap.query.MdxOlapModel
          extended by com.tonbeller.jpivot.xmla.XMLA_Model
All Implemented Interfaces:
Model, OlapModel, QueryAdapter.QueryAdapterHolder, com.tonbeller.wcf.bookmarks.Bookmarkable

public class XMLA_Model
extends MdxOlapModel
implements OlapModel, QueryAdapter.QueryAdapterHolder

Model for XMLA


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.tonbeller.jpivot.olap.model.OlapModel
OlapModel.EmptyCubeException, OlapModel.ResultTooLargeException
 
Field Summary
 
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
EXTENSIONAL, INTENSIONAL
 
Constructor Summary
XMLA_Model()
          default constructor
 
Method Summary
protected  ExpBean createBeanFromExp(java.lang.Object exp)
           
protected  java.lang.Object createExpFromBean(ExpBean expBean)
           
 void destroy()
          session terminated, closing connections etc
 java.lang.Object getBookmarkState(int levelOfDetail)
          create a Memento bean object holding current state.
 java.util.Map getCalcMeasurePropMap()
           
 java.lang.String getCatalog()
          Returns the catalog.
 java.lang.String getCube()
           
 java.lang.String getCurrentMdx()
          get the MDX for the user to edit
 java.lang.String getDataSource()
          Returns the dataSource.
 Dimension[] getDimensions()
           
 Result getDrillResult()
           
 java.lang.String getID()
           
 Member[] getMeasures()
           
 java.lang.String getPassword()
           
 ParsedQuery getPQuery()
          Returns the pQuery.
 QueryAdapter getQueryAdapter()
          Returns the queryAdapter.
 Result getResult()
          Let Mondrian parse and execute the query
 java.lang.Object getRootDecoree()
           
 java.lang.String getUri()
          Returns the uri.
 java.lang.String getUser()
           
 void initialize()
          called once after creation.
 boolean isMemberInFormulas(java.lang.String uName)
          find out, whether a member is in the formulas
 boolean isMicrosoft()
           
 boolean isMondrian()
           
 boolean isSAP()
           
 Member lookupMemberByUName(java.lang.String uName)
          lookup member by unique name
 void removeMember(XMLA_Member mem)
          remove single member
 void retrieveMember(java.lang.String uniqueName)
          retrieve a member by unique name
 void setBookmarkState(java.lang.Object state)
          restore state from Memento.
 void setCatalog(java.lang.String catalog)
          Sets the catalog.
 void setDataSource(java.lang.String dataSource)
          Sets the dataSource.
 void setID(java.lang.String string)
          sets an ID string for this model
 void setMdxQuery(java.lang.String mdxQuery)
          Sets the mdxQuery.
 void setPassword(java.lang.String string)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
          store a servlet context to the model
 void setUri(java.lang.String uri)
          Sets the uri.
 void setUser(java.lang.String string)
           
 void setUserMdx(java.lang.String mdxQuery)
          set the mdx entered by the user.
 
Methods inherited from class com.tonbeller.jpivot.olap.query.MdxOlapModel
beanFromQuax, quaxesFromBeans, restoreSort, storeSort
 
Methods inherited from class com.tonbeller.jpivot.core.ModelSupport
addExtension, addModelChangeListener, fireModelChanged, fireModelChanged, fireStructureChanged, fireStructureChanged, getExtension, getExtensions, getLocale, getRootModel, getTopDecorator, removeModelChangeListener, setLocale
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tonbeller.jpivot.core.Model
addExtension, addModelChangeListener, getExtension, getExtensions, getRootModel, getTopDecorator, removeModelChangeListener, setLocale
 

Constructor Detail

XMLA_Model

public XMLA_Model()
default constructor

Method Detail

initialize

public void initialize()
                throws OlapException
Description copied from interface: OlapModel
called once after creation. E.g. open DB connection

Specified by:
initialize in interface OlapModel
Throws:
OlapException
See Also:
HttpSessionBindingListener.valueBound(HttpSessionBindingEvent)

setMdxQuery

public void setMdxQuery(java.lang.String mdxQuery)
Sets the mdxQuery.

Parameters:
mdxQuery - The mdxQuery to set

getResult

public Result getResult()
                 throws OlapException
Let Mondrian parse and execute the query

Specified by:
getResult in interface OlapModel
Returns:
Result of Query Execution
Throws:
OlapException
See Also:
OlapModel.getResult()

getDrillResult

public Result getDrillResult()
                      throws OlapException
Throws:
OlapException

getCurrentMdx

public java.lang.String getCurrentMdx()
get the MDX for the user to edit

Specified by:
getCurrentMdx in class MdxOlapModel
Returns:
current MDX statement
See Also:
MdxOlapModel.getCurrentMdx()

setUserMdx

public void setUserMdx(java.lang.String mdxQuery)
                throws OlapException
set the mdx entered by the user.

Parameters:
mdxQuery -
Throws:
OlapException - if the syntax is invalid

getDimensions

public Dimension[] getDimensions()
Specified by:
getDimensions in interface OlapModel
Returns:
all dimensions of the cube for navigation
See Also:
OlapModel.getDimensions()

getMeasures

public Member[] getMeasures()
Specified by:
getMeasures in interface OlapModel
Returns:
all measures of the cube for navigation
See Also:
OlapModel.getMeasures()

destroy

public void destroy()
session terminated, closing connections etc

Specified by:
destroy in interface OlapModel
Overrides:
destroy in class ModelSupport

getRootDecoree

public java.lang.Object getRootDecoree()

lookupMemberByUName

public Member lookupMemberByUName(java.lang.String uName)
lookup member by unique name

Specified by:
lookupMemberByUName in class MdxOlapModel
Parameters:
name -
Returns:
Member

removeMember

public void removeMember(XMLA_Member mem)
remove single member


getBookmarkState

public java.lang.Object getBookmarkState(int levelOfDetail)
create a Memento bean object holding current state.

Specified by:
getBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable
Overrides:
getBookmarkState in class ModelSupport
Returns:
Memento current state

setBookmarkState

public void setBookmarkState(java.lang.Object state)
restore state from Memento.

Specified by:
setBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable
Overrides:
setBookmarkState in class ModelSupport
Parameters:
Object - state bean to be restored

createExpFromBean

protected java.lang.Object createExpFromBean(ExpBean expBean)
                                      throws OlapException
Specified by:
createExpFromBean in class MdxOlapModel
Parameters:
expBean -
Returns:
Throws:
OlapException

createBeanFromExp

protected ExpBean createBeanFromExp(java.lang.Object exp)
                             throws OlapException
Specified by:
createBeanFromExp in class MdxOlapModel
Throws:
OlapException

retrieveMember

public void retrieveMember(java.lang.String uniqueName)
                    throws OlapException
retrieve a member by unique name

Throws:
OlapException

isMemberInFormulas

public boolean isMemberInFormulas(java.lang.String uName)
find out, whether a member is in the formulas

Parameters:
uName - - unique name
Returns:

getCatalog

public java.lang.String getCatalog()
Returns the catalog.

Returns:
String

getUri

public java.lang.String getUri()
Returns the uri.

Returns:
String

setCatalog

public void setCatalog(java.lang.String catalog)
Sets the catalog.

Parameters:
catalog - The catalog to set

getDataSource

public java.lang.String getDataSource()
Returns the dataSource.

Returns:
String

setDataSource

public void setDataSource(java.lang.String dataSource)
Sets the dataSource.

Parameters:
dataSource - The dataSource to set

setUri

public void setUri(java.lang.String uri)
Sets the uri.

Parameters:
uri - The uri to set

getPQuery

public ParsedQuery getPQuery()
Returns the pQuery.

Returns:
ParsedQuery

getQueryAdapter

public QueryAdapter getQueryAdapter()
Returns the queryAdapter.

Specified by:
getQueryAdapter in interface QueryAdapter.QueryAdapterHolder
Returns:
XMLA_QueryAdapter

getID

public java.lang.String getID()
Specified by:
getID in interface OlapModel
Returns:
ID

setID

public void setID(java.lang.String string)
Description copied from interface: OlapModel
sets an ID string for this model

Specified by:
setID in interface OlapModel
Parameters:
ID -

getUser

public java.lang.String getUser()
Returns:
user

setUser

public void setUser(java.lang.String string)
Parameters:
user -

getPassword

public java.lang.String getPassword()
Returns:

setPassword

public void setPassword(java.lang.String string)
Parameters:
string -

isSAP

public boolean isSAP()

isMicrosoft

public boolean isMicrosoft()

isMondrian

public boolean isMondrian()

getCube

public java.lang.String getCube()
Returns:
cube name

getCalcMeasurePropMap

public java.util.Map getCalcMeasurePropMap()
Returns:
calcMeasurePropMap

setServletContext

public void setServletContext(javax.servlet.ServletContext servletContext)
Description copied from interface: OlapModel
store a servlet context to the model

Specified by:
setServletContext in interface OlapModel