com.tonbeller.jpivot.olap.model
Class OlapModelDecorator

java.lang.Object
  extended by com.tonbeller.jpivot.core.ExtensionSupport
      extended by com.tonbeller.jpivot.olap.model.OlapModelDecorator
All Implemented Interfaces:
com.tonbeller.jpivot.core.Extension, com.tonbeller.jpivot.core.Model, OlapModel, com.tonbeller.wcf.bookmarks.Bookmarkable
Direct Known Subclasses:
OlapModelProxy

public class OlapModelDecorator
extends com.tonbeller.jpivot.core.ExtensionSupport
implements OlapModel

a default decorator that delegates everything

Author:
av

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
OlapModelDecorator()
          default ctor
OlapModelDecorator(OlapModel delegate)
           
 
Method Summary
 void addExtension(com.tonbeller.jpivot.core.Extension extension)
           
 void addModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
           
 com.tonbeller.jpivot.core.Model decorate(com.tonbeller.jpivot.core.Model modelToDecorate)
          decorates the modelToDecorate with this
 void destroy()
          called once when the not used any longer.
 java.lang.Object getBookmarkState(int levelOfDetail)
           
 OlapModel getDelegate()
          gets the decorated model.
 com.tonbeller.jpivot.olap.model.Dimension[] getDimensions()
           
 com.tonbeller.jpivot.core.Extension getExtension(java.lang.String id)
           
 java.util.Map getExtensions()
           
 java.lang.String getID()
           
 com.tonbeller.jpivot.olap.model.Member[] getMeasures()
           
 com.tonbeller.jpivot.olap.model.Result getResult()
          runs the query and returns the result
 com.tonbeller.jpivot.core.Model getTopDecorator()
          returns the top of the decorator chain
 void initialize()
          called once after creation.
 void initialize(java.util.List dimAccList)
          called once after creation.
 void removeModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
           
 void setBookmarkState(java.lang.Object state)
           
 void setDelegate(OlapModel modelToDecorate)
          sets the decorated model
 void setID(java.lang.String ID)
          sets an ID string for this model
 void setLocale(java.util.Locale locale)
           
 void setServletContext(javax.servlet.ServletContext servletContext)
          store a servlet context to the model
 
Methods inherited from class com.tonbeller.jpivot.core.ExtensionSupport
getId, getModel, modelInitialized, setId, setModel
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OlapModelDecorator

public OlapModelDecorator()
default ctor

See Also:
setDelegate(com.tonbeller.jpivot.olap.model.OlapModel), decorate(com.tonbeller.jpivot.core.Model)

OlapModelDecorator

public OlapModelDecorator(OlapModel delegate)
Method Detail

getID

public java.lang.String getID()
Specified by:
getID in interface OlapModel
Returns:
an ID string for this model

setID

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

Specified by:
setID in interface OlapModel

getResult

public com.tonbeller.jpivot.olap.model.Result getResult()
                                                 throws com.tonbeller.jpivot.olap.model.OlapException
Description copied from interface: OlapModel
runs the query and returns the result

Specified by:
getResult in interface OlapModel
Throws:
com.tonbeller.jpivot.olap.model.OlapException

getDimensions

public com.tonbeller.jpivot.olap.model.Dimension[] getDimensions()
Specified by:
getDimensions in interface OlapModel
Returns:
all dimensions of the cube for navigation

getMeasures

public com.tonbeller.jpivot.olap.model.Member[] getMeasures()
Specified by:
getMeasures in interface OlapModel
Returns:
all measures of the cube for navigation

getExtension

public com.tonbeller.jpivot.core.Extension getExtension(java.lang.String id)
Specified by:
getExtension in interface com.tonbeller.jpivot.core.Model

getExtensions

public java.util.Map getExtensions()
Specified by:
getExtensions in interface com.tonbeller.jpivot.core.Model

setLocale

public void setLocale(java.util.Locale locale)
Specified by:
setLocale in interface com.tonbeller.jpivot.core.Model

addExtension

public void addExtension(com.tonbeller.jpivot.core.Extension extension)
Specified by:
addExtension in interface com.tonbeller.jpivot.core.Model

addModelChangeListener

public void addModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
Specified by:
addModelChangeListener in interface com.tonbeller.jpivot.core.Model

removeModelChangeListener

public void removeModelChangeListener(com.tonbeller.jpivot.core.ModelChangeListener l)
Specified by:
removeModelChangeListener in interface com.tonbeller.jpivot.core.Model

getBookmarkState

public java.lang.Object getBookmarkState(int levelOfDetail)
Specified by:
getBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable

setBookmarkState

public void setBookmarkState(java.lang.Object state)
Specified by:
setBookmarkState in interface com.tonbeller.wcf.bookmarks.Bookmarkable

getTopDecorator

public com.tonbeller.jpivot.core.Model getTopDecorator()
returns the top of the decorator chain

Specified by:
getTopDecorator in interface com.tonbeller.jpivot.core.Model

decorate

public com.tonbeller.jpivot.core.Model decorate(com.tonbeller.jpivot.core.Model modelToDecorate)
decorates the modelToDecorate with this

Specified by:
decorate in interface com.tonbeller.jpivot.core.Extension
Overrides:
decorate in class com.tonbeller.jpivot.core.ExtensionSupport

setDelegate

public void setDelegate(OlapModel modelToDecorate)
                 throws com.tonbeller.jpivot.olap.model.OlapException
sets the decorated model

Throws:
com.tonbeller.jpivot.olap.model.OlapException

getDelegate

public OlapModel getDelegate()
gets the decorated model. This is the immediate child in the decorator chain

See Also:
#getRootDecoree, getTopDecorator()

initialize

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

Specified by:
initialize in interface OlapModel
Throws:
com.tonbeller.jpivot.olap.model.OlapException

initialize

public void initialize(java.util.List dimAccList)
                throws com.tonbeller.jpivot.olap.model.OlapException
Description copied from interface: OlapModel
called once after creation. E.g. open DB connection

Specified by:
initialize in interface OlapModel
Throws:
com.tonbeller.jpivot.olap.model.OlapException

destroy

public void destroy()
Description copied from interface: OlapModel
called once when the not used any longer. E.g. close DB connection

Specified by:
destroy in interface OlapModel

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