|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.tonbeller.jpivot.core.ModelSupport com.tonbeller.jpivot.olap.query.MdxOlapModel com.tonbeller.jpivot.mondrian.MondrianModel
public class MondrianModel
The Model represents all (meta-)data for an MDX query.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.tonbeller.jpivot.olap.model.OlapModel |
---|
OlapModel.EmptyCubeException, OlapModel.ResultTooLargeException |
Field Summary | |
---|---|
static java.lang.Integer |
CELL_LIMIT_DEFAULT
The default value of the cell limit, 0 means that there is no limit. |
static java.lang.String |
CELL_LIMIT_PROP
The maximum number of cells a given request can return. |
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable |
---|
EXTENSIONAL, INTENSIONAL |
Constructor Summary | |
---|---|
MondrianModel()
constructor must be "default" |
Method Summary | |
---|---|
protected void |
addLevel(mondrian.olap.Level monLevel,
MondrianHierarchy hierarchy)
add Level to Hashtable, if not already there |
MondrianMember |
addMember(mondrian.olap.Member monMember)
add Member to Hashtable, if not already there |
protected ExpBean |
createBeanFromExp(java.lang.Object exp)
|
protected java.lang.Object |
createExpFromBean(ExpBean expBean)
create Mondrian exp from expBean |
void |
destroy()
session terminated, closing connections etc |
java.lang.Object |
getBookmarkState(int levelOfDetail)
create a Memento bean object holding current state. |
mondrian.olap.Connection |
getConnection()
get the Mondrian Connection |
protected mondrian.olap.Util.PropertyList |
getConnectProperties()
Get connectProperties |
protected java.lang.String |
getConnectString()
Get connectString. |
java.lang.String |
getCurrentMdx()
get the MDX for the user to edit |
java.lang.String |
getDataSourceChangeListener()
Getter for property dataSourceChangeListener. |
Dimension[] |
getDimensions()
|
java.lang.String |
getDynLocale()
Getter for property dynLocale. |
java.lang.String |
getDynresolver()
|
javax.sql.DataSource |
getExternalDataSource()
get the external DataSource to be used by Mondrian |
java.lang.String |
getID()
|
protected java.lang.String |
getJdbcDriver()
Get jdbcDriver. |
protected java.lang.String |
getMdxQuery()
Returns the mdxQuery. |
Member[] |
getMeasures()
|
protected mondrian.olap.Connection |
getMonConnection()
Returns the monConnection. |
QueryAdapter |
getQueryAdapter()
Returns the queryAdapter. |
Result |
getResult()
Let Mondrian parse and execute the query |
mondrian.olap.Role |
getRole()
|
java.lang.Object |
getRootDecoree()
|
mondrian.olap.SchemaReader |
getSchemaReader()
Attempts to use the Query object's SchemaReader because this is based upon the Cube (calculated Memember) and not just the Connection. |
javax.sql.DataSource |
getSqlDataSource()
|
void |
initialize()
complete the initilization. |
boolean |
isAtSameLevel(java.lang.String memberName,
java.lang.String logicalName)
Checks if 2 members are at the same level by comparing the no. of "." |
boolean |
isConnectionPooling()
get Mondrian Connection Pooling property |
MondrianDimension |
lookupDimension(java.lang.String uniqueName)
find the Dimension. |
MondrianHierarchy |
lookupHierarchy(java.lang.String uniqueName)
find the Hierarchy in the dimensions. |
MondrianLevel |
lookupLevel(java.lang.String uniqueName)
find level in the Olap Hierarchy. |
Member |
lookupMemberByUName(java.lang.String uniqueName)
find member in the Olap Hierarchy. |
protected void |
removeLogicalNameFromList(java.lang.String hierName)
sets the dirty hierarchy whose logical representation needs to be removed |
void |
removeMember(java.lang.String uniqueName)
remove Member from Hashtable (for a calculated member) |
java.lang.String |
replaceEnumeratedQuery(java.lang.String query,
java.lang.String memberName,
java.lang.String logicalName)
Converts a Enumerated MDX with logical one The enumerated list will always be present with in "{}" Find the first occurrence of the given member in the query and replace everything with the logicalName until we find "}" |
protected mondrian.olap.Query |
rewriteMDXQuery(mondrian.olap.Query query)
Rewrites the given MDX query with a generic version |
void |
setBookmarkState(java.lang.Object state)
restore state from Memento. |
void |
setConnectionPooling(boolean connectionPooling)
set Mondrian Connection Pooling property |
void |
setConnectProperties(mondrian.olap.Util.PropertyList properties)
set the Mondrian Connection Properties as an alternative to setConnectString |
void |
setConnectString(java.lang.String connectString)
set the Mondrian Connect String |
protected void |
setCurrentMdx(java.lang.String currentMdx)
Sets the currentMdx. |
void |
setDataSourceChangeListener(java.lang.String dataSourceChangeListener)
Setter for property dataSourceChangeListener. |
void |
setDynLocale(java.lang.String dynLocale)
Setter for property dynLocale. |
void |
setDynresolver(java.lang.String dynresolver)
|
void |
setExternalDataSource(javax.sql.DataSource externalDataSource)
set the external DataSource to be used by Mondrian |
void |
setID(java.lang.String ID)
sets an ID string for this model |
void |
setJdbcDriver(java.lang.String jdbcDriver)
set the JDBC Driver |
void |
setMdxQuery(java.lang.String mdxQuery)
Sets the mdxQuery. |
void |
setRole(mondrian.olap.Role role)
|
void |
setServletContext(javax.servlet.ServletContext servletContext)
store a servlet context to the model |
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 |
Field Detail |
---|
public static final java.lang.String CELL_LIMIT_PROP
public static final java.lang.Integer CELL_LIMIT_DEFAULT
Constructor Detail |
---|
public MondrianModel()
Method Detail |
---|
public java.lang.String getID()
getID
in interface OlapModel
public void setID(java.lang.String ID)
OlapModel
setID
in interface OlapModel
public mondrian.olap.SchemaReader getSchemaReader()
public QueryAdapter getQueryAdapter()
getQueryAdapter
in interface QueryAdapter.QueryAdapterHolder
public Result getResult() throws OlapException
getResult
in interface OlapModel
OlapException
OlapModel.getResult()
public Dimension[] getDimensions()
getDimensions
in interface OlapModel
OlapModel.getDimensions()
public Member[] getMeasures()
getMeasures
in interface OlapModel
OlapModel.getMeasures()
public void setConnectString(java.lang.String connectString)
connectString
- Connect String - default:
provider=Mondrian;Jdbc=jdbc:odbc:MondrianFoodMart;
Catalog=file:///c:/j/mondrian/demo/FoodMart.xmlpublic void setConnectProperties(mondrian.olap.Util.PropertyList properties)
properties
- public void setJdbcDriver(java.lang.String jdbcDriver)
jdbcDriver
- JDBC Driver - default: sun.jdbc.odbc.JdbcOdbcDriverpublic void setMdxQuery(java.lang.String mdxQuery)
mdxQuery
- The mdxQuery to setpublic void initialize() throws OlapException
initialize
in interface OlapModel
OlapException
protected void addLevel(mondrian.olap.Level monLevel, MondrianHierarchy hierarchy)
monLevel
- -
the "key" is the Mondrian Levelpublic MondrianMember addMember(mondrian.olap.Member monMember)
monMember
- -
the "key" is the Mondrian Member
public void removeMember(java.lang.String uniqueName)
uniqueName
- public MondrianDimension lookupDimension(java.lang.String uniqueName)
uniqueName
- is the search key (
public MondrianHierarchy lookupHierarchy(java.lang.String uniqueName)
uniqueName
- is the search key
public Member lookupMemberByUName(java.lang.String uniqueName)
lookupMemberByUName
in class MdxOlapModel
uniqueName
- is the search key (Mondrian member unique name)
public MondrianLevel lookupLevel(java.lang.String uniqueName)
uniqueName
- is the search key (Mondrian level)
public mondrian.olap.Role getRole()
public void setRole(mondrian.olap.Role role)
public mondrian.olap.Connection getConnection()
public java.lang.String getCurrentMdx()
getCurrentMdx
in class MdxOlapModel
MdxOlapModel.getCurrentMdx()
protected java.lang.String getMdxQuery()
public java.lang.Object getRootDecoree()
public void destroy()
destroy
in interface OlapModel
destroy
in class ModelSupport
protected void setCurrentMdx(java.lang.String currentMdx)
currentMdx
- The currentMdx to setprotected mondrian.olap.Connection getMonConnection()
protected java.lang.String getJdbcDriver()
protected java.lang.String getConnectString()
protected mondrian.olap.Util.PropertyList getConnectProperties()
public java.lang.Object getBookmarkState(int levelOfDetail)
getBookmarkState
in interface com.tonbeller.wcf.bookmarks.Bookmarkable
getBookmarkState
in class ModelSupport
public void setBookmarkState(java.lang.Object state)
setBookmarkState
in interface com.tonbeller.wcf.bookmarks.Bookmarkable
setBookmarkState
in class ModelSupport
state
- bean to be restoredprotected java.lang.Object createExpFromBean(ExpBean expBean) throws OlapException
createExpFromBean
in class MdxOlapModel
expBean
-
OlapException
protected ExpBean createBeanFromExp(java.lang.Object exp) throws OlapException
createBeanFromExp
in class MdxOlapModel
OlapException
public javax.sql.DataSource getSqlDataSource()
public java.lang.String getDynresolver()
public void setDynresolver(java.lang.String dynresolver)
public void setServletContext(javax.servlet.ServletContext servletContext)
OlapModel
setServletContext
in interface OlapModel
public boolean isConnectionPooling()
public void setConnectionPooling(boolean connectionPooling)
public javax.sql.DataSource getExternalDataSource()
public void setExternalDataSource(javax.sql.DataSource externalDataSource)
public java.lang.String getDynLocale()
public void setDynLocale(java.lang.String dynLocale)
dynLocale
- New value of property dynLocale.public java.lang.String getDataSourceChangeListener()
public void setDataSourceChangeListener(java.lang.String dataSourceChangeListener)
dataSourceChangeListener
- New value of property dataSourceChangeListener.protected mondrian.olap.Query rewriteMDXQuery(mondrian.olap.Query query)
queryString
- MDX query text
Result
objectpublic java.lang.String replaceEnumeratedQuery(java.lang.String query, java.lang.String memberName, java.lang.String logicalName)
result
-
public boolean isAtSameLevel(java.lang.String memberName, java.lang.String logicalName)
result
-
protected void removeLogicalNameFromList(java.lang.String hierName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |