Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /* 
    * Copyright (C) 2010---2013 星星(wuweixing)<349446658@qq.com>
    * 
    * This file is part of Wabacus 
    * 
    * Wabacus is free software: you can redistribute it and/or modify
    * it under the terms of the GNU Lesser General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
   *
   * This program is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   * GNU Lesser General Public License for more details.
   *
   * You should have received a copy of the GNU Lesser General Public License
   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  package com.wabacus.config.component.application.report;
  
  import java.util.HashMap;
  import java.util.HashSet;
  import java.util.List;
  import java.util.Map;
  import java.util.Set;
  
  
  public class ReportBean extends AbsConfigBean implements IApplicationConfigBean
  {
      private String id;
  
      private String refreshid;
      
      protected String refreshGuid;
      
      private String top;
  
      private String bottom;
  
      private String left;
  
      private String right;
  
      private String width="100%";
  
      private String printwidth;
      
      private String height;
  
      private String align;
  
      private String valign="top";
  
      private String datastyleproperty;
     
     
     private String title;
 
     private String titlealign="left";
     
     private Map<String,StringmDynTitleParts;
     
     private String subtitle;
 
     private Map<String,StringmDynSubtitleParts;
     
     private String parenttitle;
 
     
     protected String parentSubtitle;
     
     
     private String navigate_reportid;//用哪个报表的翻页导航栏,默认是本报表有一个独立的翻页导航栏,此时此值为<report/>的id值,也可以配置成其它报表的<report/>的id,则与别的报表共用一个翻页导航栏。
     
     private Set<StringsRelateConditionReportids;//与此报表存在查询条件相关的报表ID,以便在此报表点击搜索或过滤按钮时,能将那些报表也重新计算翻页信息
 
     private XmlElementBean eleReportBean;
 
     private String bordercolor;
 
     private boolean showContextMenu=true;
     
     private DisplayBean dbean;
 
     private SqlBean sbean;
 
     private String scrollheight;
 
     private String scrollwidth;
 
     private String scrollstyle;
     
 
     private String dynTplPath;
     
     private TemplateBean tplBean;
 
     
     private String type;
 
 //    private boolean isIgnoreFetchDataError;//是否忽略掉从数据库取字段数据时判断是否有这个字段,如果忽略,则从表中没有取到这个字段时也不抛出异常,而是将此列值置空
     
     private String pojo;
     
     private Class pojoClassObj;
 
     private boolean isPojoClassCache=false;//综合在wabacus.cfg.xml的全局配置及在这里对它的单独配置,决定是将生成的字节码写缓存还是写local disk
     
     private ButtonsBean buttonsBean=null;
 
     private IInterceptor interceptor=null;
 
     private int cellresize=0;
 
     private int celldrag=0;
 
     private TemplateBean headerTplBean;//<header/>配置的静态模板对象
     
     private TemplateBean footerTplBean;//<footer/>配置的静态模板对象
     
     
     private PDFExportBean pdfPrintBean;
     
     private FormatBean fbean;
 
     private List<ClasslstFormatClasses;//本报表所需用到的校验类。里面定义的校验方法可以在每个<col/>的format属性中使用。配置方式与系统配置文件的全局配置项format-class一样,也可以配置多个。
 
 
 
 
     
     private List<FileBoxlstUploadFileBoxes;
 
     private Map<String,FileBoxmUploadFileBoxes;
 
     private List<PopUpBoxlstPopUpBoxes;
 
     private Map<String,PopUpBoxmPopUpBoxes;
 
     private List<AbsInputBoxlstInputboxesWithAutoComplete;//配置的失去焦点后自动填充其它输入框数据的输入框对象集合
     
     
     private String dependParentId;
 
 //    private ReportBean rootReportBean;//如果当前报表是从报表,这里存放其顶层主报表(这里考虑到多级主从关系的情况),此变量是在运行时判断并赋值的
     
     private String dependparams;
 
     private boolean displayOnParentNoData=true;//当<report/>的dependstype配置为display时,此值为true,表示当父报表没有数据时,此从报表也显示出来;当配置为hidden时,此值为false,表示当父报表没有数据时,此从报表隐藏起来
     
     private Map<String,Map<String,String>> mDependChilds;
 
     private Map<String,StringmDependsDetailReportParams;//如果当前报表依赖细览报表,这里存放依赖所用到的所有参数,以便加载数据时能根据这里的参数取到条件数据,在此Map中,键为此参数在URL中的参数名,值为参数值对应的<col/>的property
     
 
     private Set<StringsParamNamesFromURL;
 
 
     private List<IntegerlstPagesize;
     
     private Object navigateObj;
     
     
     
     private List<ClasslstServerValidateClasses;
     
     
     public ReportBean(AbsConfigBean parent)
     {
         super(null);
         throw new WabacusConfigLoadingException("不能对"+this.getClass().getName()+"调用此构造函数");
     }
 
     public ReportBean(AbsContainerConfigBean parentContainer)
     {
         super(null);
         this.=parentContainer;
     }
 
     {
         return ;
     }
 
     public String getGuid()
     {
         return this.getPageBean().getId()+.+this.;
     }
 
     public String getPath()
     {
         return this..getPath()+.+this.;
     }
 
     public void setParentContainer(AbsContainerConfigBean parentContainer)
     {
         this.=parentContainer;
     }
 
     public String getTop()
     {
         return ;
     }
 
     public void setTop(String top)
     {
         this.=top;
     }
 
     public String getBottom()
     {
         return ;
     }
 
     public void setBottom(String bottom)
     {
         this.=bottom;
     }
 
     public String getRight()
     {
         return ;
     }
 
     public void setRight(String right)
     {
         this.=right;
     }
 
     public String getLeft()
     {
         return ;
     }
 
     public void setLeft(String left)
     {
         this.=left;
     }
 
     public String getHeight()
     {
         return ;
     }
 
     public void setHeight(String height)
     {
         this.=height;
     }
 
     public String getAlign()
     {
         return ;
     }
 
     public void setAlign(String align)
     {
         this.=align;
     }
 
     public String getValign()
     {
         return ;
     }
 
     public void setValign(String valign)
     {
         this.=valign;
     }
 
     public String getDependParentId()
     {
         return ;
     }
 
     public void setDependParentId(String dependParentId)
     {
         this.=dependParentId;
     }
 
     {
         return ;
     }
 
     public void setMDependsDetailReportParams(Map<String,StringdependsDetailReportParams)
     {
         =dependsDetailReportParams;
     }
 
     public boolean isSlaveReport()
     {
         return this.!=null&&!this..trim().equals("");
     }
     
     public boolean isSlaveReportDependsonListReport()
     {
         if(!isSlaveReport()) return false;
         return this.getPageBean().getReportChild(this.,true).isListReportType();
     }
     
     public boolean isSlaveReportDependsonDetailReport()
     {
         if(!isSlaveReport()) return false;
         return this.getPageBean().getReportChild(this.,true).isDetailReportType();
     }
     
     {
         if(rrequest.getShowtype()!=.return true;
         if(!this.isSlaveReportDependsonDetailReport()) return true;
         AbsReportType reportTypeObj=(AbsReportType)rrequest.getComponentTypeObj(this.,null,false);
         if(reportTypeObj==null||reportTypeObj.getParentContainerType()==nullreturn true;
         boolean shouldShowParent=reportTypeObj.getReportBean().shouldDisplaySlaveReportDependsonDetailReport(rrequest);
         if(!shouldShowParentreturn false;//如果父报表也是依赖细览报表的子报表,且不需显示,则本子报表无条件不显示
         if(rrequest.getStringAttribute(this.+"_PARENTREPORT_NODATA","").toLowerCase().equals("true")&&!this.isDisplayOnParentNoData())
             return false;
         return true;
     }
     
     {
         return ;
     }
 
     public void setLstServerValidateClasses(List<ClasslstServerValidateClasses)
     {
         this.=lstServerValidateClasses;
     }
 
     public boolean isMasterReportOfMe(ReportBean rbeanMaster,boolean inherit)
     {
         if(!this.isSlaveReport()) return false;
         if(this..equals(rbeanMaster.getId())) return true;
         if(!inheritreturn false;
         return ((ReportBean)this.getPageBean().getChildComponentBean(this.,true)).isMasterReportOfMe(rbeanMaster,inherit);
     }
     
 
 
 
 
 //        {//还没初始化此从报表的此变量
 //            ReportBean masterReport=this.getPageBean().getReportChild(this.dependParentId,true);//得到当前从报表的主报表对象
 
 //            {//主报表又是一个从报表
 
 
 
 
 
 
 
 //    }
     
     public String getDependparams()
     {
         return ;
     }
 
     public void setDependparams(String dependparams)
     {
         this.=dependparams;
     }
 
     public boolean isDisplayOnParentNoData()
     {
         return ;
     }
 
     public void setDisplayOnParentNoData(boolean displayOnParentNoData)
     {
         this.=displayOnParentNoData;
     }
 
     {
         return ;
     }
 
     public void setMDependChilds(Map<String,Map<String,String>> dependChilds)
     {
         =dependChilds;
     }
 
     public String getScrollheight()
     {
         return ;
     }
 
     public void setScrollheight(String scrollheight)
     {
         this.=scrollheight;
     }
 
     public String getScrollwidth()
     {
         return ;
     }
 
     public void setScrollwidth(String scrollwidth)
     {
         this.=scrollwidth;
     }
 
     public String getScrollstyle()
     {
         if(==null||.trim().equals(""))
         {
             String scrollstyleTmp=Config.getInstance().getSystemConfigValue("default-scrollstyle",.).toLowerCase();
             if(!..contains(scrollstyleTmp))
             {
                 throw new WabacusRuntimeException("在wabacus.cfg.xml的default-scrollstyle属性中配置的值"+scrollstyleTmp+"不支持");
             }
             return scrollstyleTmp;
         }
         return ;
     }
 
     public void setScrollstyle(String scrollstyle)
     {
         this.=scrollstyle;
     }
 
     {
         if(this.!=null&&!this..trim().equals("")||this.!=null&&!this..trim().equals("")) return this;
         return null;
     }
 
     public String getRefreshid()
     {
         return ;
     }
 
     public void setRefreshid(String refreshid)
     {
         this.=refreshid;
     }
 
     {
         return ;
     }
 
     public void setSRelateConditionReportids(Set<StringrelateConditionReportids)
     {
         =relateConditionReportids;
     }
 
     public void addRelateConditionReportid(String reportid)
     {
         if(reportid==null||reportid.trim().equals("")) return;
         if(reportid.equals()) return;
         if(this.==null)
         {
             this.=new HashSet<String>();
         }
         this..add(reportid);
     }
 
     public String getBorder()
     {
         return ;
     }
 
     public void setBorder(String border)
     {
         this.=border;
     }
 
     public String getBordercolor()
     {
         return ;
     }
 
     public void setBordercolor(String bordercolor)
     {
         this.=bordercolor;
     }
 
     public ButtonsBean getButtonsBean()
     {
         return ;
     }
 
     public void setButtonsBean(ButtonsBean buttonsBean)
     {
         this.=buttonsBean;
     }
 
     public String getDisplayWidth()
     {
         if(!=null&&!.trim().equals(""))
         {
             return .trim();
         }
         return ;
     }
 
     public String getWidth()
     {
         return ;
     }
 
     public void setWidth(String width)
     {
         this.=width;
     }
 
     public String getPrintwidth()
     {
         return ;
     }
 
     public void setPrintwidth(String printwidth)
     {
         this.=printwidth;
     }
 
     public String getRefreshGuid()
     {
         if(this.==null)
         {
             this.=ComponentConfigLoadAssistant.getInstance().createComponentRefreshGuidByRefreshId(this.getPageBean(),this.,this.);
         }
         return ;
     }
 
     public void setId(String key)
     {
         this.=key;
     }
 
     public String getTitle(ReportRequest rrequest)
     {
         return WabacusAssistant.getInstance().getStringValueWithDynPart(rrequest,this.,this.,"");
     }
 
     public void setTitle(String title)
     {
         Object[] objArr=WabacusAssistant.getInstance().parseStringWithDynPart(title);
         this.=(String)objArr[0];
         this.=(Map<String,String>)objArr[1];
     }
 
     public String getSubtitle(ReportRequest rrequest)
     {
         return WabacusAssistant.getInstance().getStringValueWithDynPart(rrequest,this.,this.,"");
     }
 
     public void setSubtitle(String subtitle)
     {
         Object[] objArr=WabacusAssistant.getInstance().parseStringWithDynPart(subtitle);
         this.=(String)objArr[0];
         this.=(Map<String,String>)objArr[1];
     }
     
     public String getParenttitle(ReportRequest rrequest)
     {
         return WabacusAssistant.getInstance().getStringValueWithDynPart(rrequest,this.,this.,"");
     }
 
     public void setParenttitle(String parenttitle)
     {
         Object[] objArr=WabacusAssistant.getInstance().parseStringWithDynPart(parenttitle);
         this.=(String)objArr[0];
         this.=(Map<String,String>)objArr[1];
     }
     
     public String getParentSubtitle(ReportRequest rrequest)
     {
        return WabacusAssistant.getInstance().getStringValueWithDynPart(rrequest,this.,this.,"");
     }
 
     public void setParentSubtitle(String parentSubtitle)
     {
         Object[] objArr=WabacusAssistant.getInstance().parseStringWithDynPart(parentSubtitle);
         this.=(String)objArr[0];
         this.=(Map<String,String>)objArr[1];
     }
     
     public void setMDynTitleParts(Map<String,StringdynTitleParts)
     {
         this.=dynTitleParts;
     }
 
     public void setMDynSubtitleParts(Map<String,StringdynSubtitleParts)
     {
         this.=dynSubtitleParts;
     }
 
     public void setMDynParenttitleParts(Map<String,StringdynParenttitleParts)
     {
         this.=dynParenttitleParts;
     }
 
     public void setMDynParentSubtitleParts(Map<String,StringdynParentSubtitleParts)
     {
         this.=dynParentSubtitleParts;
     }
 
     public String getTitlealign()
     {
         return ;
     }
 
     public void setTitlealign(String titlealign)
     {
         titlealign=titlealign.trim().toLowerCase();
         if(!titlealign.equals("left")&&!titlealign.equals("center")&&!titlealign.equals("right"))
         {
             titlealign="left";
         }
         this.=titlealign;
     }
 
     public void addInputboxJsValidateBean(String inputboxId,JavascriptValidateBean validatebean)
     {
         this..put(inputboxId,validatebean);
     }
     
     {
         return ;
     }
 
     public void addServerValidateBeanOnBlur(String inputboxId,ServerValidateBean validatebean)
     {
         this..put(inputboxId,validatebean);
     }
     
     public ServerValidateBean getServerValidateBean(String inputboxid)
     {
         if(this.==nullreturn null;
         return this..get(inputboxid);
     }
     
     public String getPojo()
     {
         return ;
     }
 
     public void setPojo(String pojo)
     {
         this.=pojo;
     }
 
     public Class getPojoClassObj()
     {
         return ;
     }
 
     public void setPojoClassObj(Class pojoClassObj)
     {
         this.=pojoClassObj;
     }
 
     public boolean isPojoClassCache()
     {
         return ;
     }
 
     public void setPojoClassCache(boolean isPojoClassCache)
     {
         this.=isPojoClassCache;
     }
 
     public TemplateBean getHeaderTplBean()
     {
         return ;
     }
 
     public void setHeaderTplBean(TemplateBean headerTplBean)
     {
         ComponentAssistant.getInstance().validComponentHeaderTpl(this,headerTplBean);
         this.=headerTplBean;
     }
 
     public TemplateBean getFooterTplBean()
     {
         return ;
     }
 
     public void setFooterTplBean(TemplateBean footerTplBean)
     {
         ComponentAssistant.getInstance().validComponentFooterTpl(this,footerTplBean);
         this.=footerTplBean;
     }
 
     public void setDbean(DisplayBean dbean)
     {
         this.=dbean;
     }
 
     public void setSbean(SqlBean sbean)
     {
         this.=sbean;
     }
 
     public String getId()
     {
         return this.;
     }
 
     public boolean shouldShowContextMenu()
     {
         if(!return false;
         if(this.==nullreturn false;
                 ||this..getButtonsByPosition(.).size()==0) return false;
         return true;
     }
     
     public void setShowContextMenu(boolean showContextMenu)
     {
         this.=showContextMenu;
     }
     
     public DisplayBean getDbean()
     {
         return this.;
     }
 
     public SqlBean getSbean()
     {
         return this.;
     }
 
     public String getType()
     {
         return ;
     }
 
     public int getCelldrag()
     {
         return ;
     }
 
     public void setCelldrag(int celldrag)
     {
         this.=celldrag;
     }
 
     public void setType(String type)
     {
         this.=type;
     }
 
     public IInterceptor getInterceptor()
     {
         return ;
     }
 
     public void setInterceptor(IInterceptor interceptor)
     {
         this.=interceptor;
     }
 
     public String getDynTplPath()
     {
         return ;
     }
 
     public void setDynTplPath(String dynTplPath)
     {
         this.=dynTplPath;
     }
 
     public TemplateBean getTplBean()
     {
         return ;
     }
 
     public void setTplBean(TemplateBean tplBean)
     {
         this.=tplBean;
     }
 
     public PDFExportBean getPdfPrintBean()
     {
         return ;
     }
 
     public void setPdfPrintBean(PDFExportBean pdfPrintBean)
     {
         this.=pdfPrintBean;
     }
     
     {
         return ;
     }
 
     public void setDataExportsBean(DataExportsConfigBean dataExportsBean)
     {
         this.=dataExportsBean;
     }
 
     public XmlElementBean getEleReportBean()
     {
         return ;
     }
 
     public void setEleReportBean(XmlElementBean eleReportBean)
     {
         this.=eleReportBean;
     }
 
     public List<ClassgetLstFormatClasses()
     {
         return ;
     }
 
     public void setLstFormatClasses(List<ClasslstFormatClasses)
     {
         this.=lstFormatClasses;
     }
 
     public int getCellresize()
     {
         return ;
     }
 
     public void setCellresize(int cellresize)
     {
         this.=cellresize;
     }
 
     {
         if(this.!=null&&this..size()>0)
         {
             return this.getGuid()+"_loadSlaveReports";
         }
         return "''";
     }
 
     public void addOnloadMethod(OnloadMethodBean onLoadMethodBean)
     {
         if(this.==nullthis.=new ArrayList<OnloadMethodBean>();
         .add(onLoadMethodBean);
     }
     
     public void removeOnloadMethodByType(String type)
     {
         if(==null||.size()==0) return;
         for(int i=.size()-1;i>=0;i--)
         {
             if(type.equalsIgnoreCase(.get(i).getType()))
             {
                 .remove(i);
             }
         }
     }
     
     {
         return ;
     }
 
     public void setLstOnloadMethods(List<OnloadMethodBeanlstOnloadMethods)
     {
         this.=lstOnloadMethods;
     }
 
     public String getOnloadMethodName()
     {
         if(==null||.size()==0) return "''";
         return this.getGuid()+"_onload";
     }
 
     public FormatBean getFbean()
     {
         return ;
     }
 
     public void setFbean(FormatBean fbean)
     {
         this.=fbean;
     }
 
     public List<IntegergetLstPagesize()
     {
         return ;
     }
 
     public void setLstPagesize(List<IntegerlstPagesize)
     {
         this.=lstPagesize;
     }
 
     public void setLstTextBoxesWithTypePrompt(List<TextBoxlstTextBoxesWithTypePrompt)
     {
         this.=lstTextBoxesWithTypePrompt;
     }
 
     public Object getNavigateObj()
     {
         return ;
     }
 
     public void setNavigateObj(Object navigateObj)
     {
         if(ComponentConfigLoadManager.isValidNavigateObj(this,navigateObj)) this.=navigateObj;
     }
 
     public void setMTextBoxesWithTypePrompt(Map<String,TextBoxtextBoxesWithTypePrompt)
     {
         =textBoxesWithTypePrompt;
     }
 
     public void addTextBoxWithingTypePrompt(TextBox textBoxObj)
     {
         if(==null)
         {
             =new ArrayList<TextBox>();
         }
         .add(textBoxObj);
     }
 
     public TextBox getTextBoxWithingTypePrompt(String inputboxid)
     {
         if(==nullreturn null;
         return .get(inputboxid);
     }
     
     public void setMSelectBoxesInConditionWithRelate(Map<String,AbsSelectBoxselectBoxesInConditionWithRelate)
     {
         =selectBoxesInConditionWithRelate;
     }
 
     public void setMSelectBoxesInColWithRelate(Map<String,AbsSelectBoxselectBoxesInColWithRelate)
     {
         =selectBoxesInColWithRelate;
     }
 
    public void addSelectBoxWithRelate(AbsSelectBox selectBoxObj)
    {
        if(selectBoxObj.getOwner() instanceof ConditionBean)
        {
            .put(selectBoxObj.getOwner().getInputBoxId(),selectBoxObj);
        }else
        {
            .put(selectBoxObj.getOwner().getInputBoxId(),selectBoxObj);
        }
    }
    {
        if(==nullreturn null;
        return this..get(inputboxid);
    }
    
    public AbsSelectBox getChildSelectBoxInColById(String inputboxid)
    {
        if(==nullreturn null;
        return this..get(inputboxid);
    }
    
    public void setLstUploadFileBoxes(List<FileBoxlstUploadFileBoxes)
    {
        this.=lstUploadFileBoxes;
    }
    public void setMUploadFileBoxes(Map<String,FileBoxuploadFileBoxes)
    {
        =uploadFileBoxes;
    }
    public void addUploadFileBox(FileBox fileBoxObj)
    {
        if(this.==nullthis.=new ArrayList<FileBox>();
        this..add(fileBoxObj);
    }
    public FileBox getUploadFileBox(String inputboxid)
    {
        if(this.==nullreturn null;
        return this..get(inputboxid);
    }
    public void setLstPopUpBoxes(List<PopUpBoxlstPopUpBoxes)
    {
        this.=lstPopUpBoxes;
    }
    public void setMPopUpBoxes(Map<String,PopUpBoxpopUpBoxes)
    {
        =popUpBoxes;
    }
    public void addPopUpBox(PopUpBox popboxObj)
    {
        if(this.==nullthis.=new ArrayList<PopUpBox>();
        this..add(