1 13 package com.tonbeller.jpivot.olap.model; 14 15 import java.util.Locale ; 16 import java.util.Map ; 17 18 import javax.servlet.ServletContext ; 19 20 import com.tonbeller.jpivot.core.Extension; 21 import com.tonbeller.jpivot.core.ExtensionSupport; 22 import com.tonbeller.jpivot.core.Model; 23 import com.tonbeller.jpivot.core.ModelChangeListener; 24 25 30 public class OlapModelDecorator extends ExtensionSupport implements OlapModel { 31 32 protected OlapModel delegate; 33 34 public String getID() { 35 return delegate.getID(); 36 } 37 public void setID(String ID) { 38 delegate.setID(ID); 39 } 40 41 46 public OlapModelDecorator() { 47 } 48 49 public OlapModelDecorator(OlapModel delegate) { 50 this.delegate = delegate; 51 } 52 53 public Result getResult() throws OlapException { 54 return delegate.getResult(); 55 } 56 57 public Dimension[] getDimensions() { 58 return delegate.getDimensions(); 59 } 60 61 public Member[] getMeasures() { 62 return delegate.getMeasures(); 63 } 64 65 public Extension getExtension(String id) { 66 return delegate.getExtension(id); 67 } 68 69 public Map getExtensions() { 70 return delegate.getExtensions(); 71 } 72 73 public void setLocale(Locale locale) { 74 delegate.setLocale(locale); 75 } 76 77 public void addExtension(Extension extension) { 78 delegate.addExtension(extension); 79 } 80 81 public void addModelChangeListener(ModelChangeListener l) { 82 delegate.addModelChangeListener(l); 83 } 84 85 public void removeModelChangeListener(ModelChangeListener l) { 86 delegate.removeModelChangeListener(l); 87 } 88 89 public Object getBookmarkState(int levelOfDetail) { 90 return delegate.getBookmarkState(levelOfDetail); 91 } 92 93 public void setBookmarkState(Object state) { 94 delegate.setBookmarkState(state); 95 } 96 97 100 public Model getTopDecorator() { 101 return delegate.getTopDecorator(); 102 } 103 104 public Model getRootModel() { 105 return delegate.getRootModel(); 106 } 107 110 public Model decorate(Model modelToDecorate) { 111 this.delegate = (OlapModel) modelToDecorate; 112 return this; 113 } 114 115 118 public void setDelegate(OlapModel modelToDecorate) throws OlapException { 119 this.delegate = modelToDecorate; 120 } 121 122 127 public OlapModel getDelegate() { 128 return delegate; 129 } 130 131 public void initialize() throws OlapException { 132 delegate.initialize(); 133 134 } 135 136 public void destroy() { 137 delegate.destroy(); 138 } 139 140 public void setServletContext(ServletContext servletContext) { 141 delegate.setServletContext(servletContext); 142 } 143 } 144 | Popular Tags |