1 13 package com.tonbeller.jpivot.table.navi; 14 15 import com.tonbeller.jpivot.olap.navi.MdxQuery; 16 import com.tonbeller.jpivot.table.TableComponentExtensionSupport; 17 import com.tonbeller.wcf.format.FormatException; 18 19 22 public class MdxQueryUI extends TableComponentExtensionSupport { 23 public static final String ID = "mdxQuery"; 24 25 public String getId() { 26 return ID; 27 } 28 29 public boolean isAvailable() { 30 return getExtension() != null; 31 } 32 33 MdxQuery getExtension() { 34 return (MdxQuery) table.getOlapModel().getExtension(MdxQuery.ID); 35 } 36 37 public String getMdxQuery() { 38 MdxQuery ext = getExtension(); 39 if (ext == null) 40 return ""; 41 return ext.getMdxQuery(); 42 } 43 44 public void setMdxQuery(String mdxQuery) throws FormatException { 45 MdxQuery ext = getExtension(); 46 if (ext == null) 47 return; 48 ext.setMdxQuery(mdxQuery); 49 } 50 51 } 52 | Popular Tags |