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.List;
 import java.util.Map;
 
 
 
 public class ReportDataSetValueBean extends AbsConfigBean
 {
     private static Log log=LogFactory.getLog(ReportDataSetValueBean.class);
 
     public final static String dependsConditionPlaceHolder="{#dependscondition#}";
 
     private String id;//<value/>的id,如果只有一个<value/>,则可以不配置id
 
 
     private List<String[]> lstDependRelateColumns;
 
 
     private String dependstype="single";
 
     private String seperator=";";
 
     private String value;
 
     private List<StringlstStoreProcedureParams;
 
     private String sqlWithoutOrderby;
 
     private String orderby="";
 
     private String splitpage_sql;
 
     private String sqlCount;
 
     private String filterdata_sql;
 
     private String sql_kernel;
 
 
     private String datasource;//此报表所使用的数据源,默认为<sql/>中的datasource配置,如果这里也没配置,则取wabacus.cfg.xml中<datasources/>标签中的default属性配置的值
 
     private IReportDataSet customizeDatasetObj;//开发人员通过<value>class{xxx}</value>指定的数据集对象
 
     public ReportDataSetValueBean(AbsConfigBean parent)
     {
         super(parent);
         this.=((ReportDataSetBean)parent).getDatasource();
     }
 
     public String getId()
     {
         return ;
     }
 
    public String getGuid()
    {
        return this.getReportBean().getId()+"__"+((ReportDataSetBean)this.getParent()).getId()+"__"+this.;
    }
    
    public void setId(String id)
    {
        this.=id;
    }
    public void setValue(String _value)
    {
        this.=_value==null?"":_value.trim();
    }
    public String getValue()
    {
        return this.;
    }
    {
        return ;
    }
    public void setFilterdata_sql(String filterdata_sql)
    {
        this.=filterdata_sql;
    }
    public String getFilterdata_sql()
    {
        return this.;
    }
    private List<StringlstDependMyColumns;
    {
        if(==null||.size()==0) return null;
        List<StringlstDependParentColumnsTmp=new ArrayList<String>();
        for(String[] arrTmp:this.)
        {
            lstDependParentColumnsTmp.add(arrTmp[1]);
        }
        this.=lstDependParentColumnsTmp;
        return ;
    }
    {
        return ;
    }
    public void setCustomizeDatasetObj(IReportDataSet customizeDatasetObj)
    {
        this.=customizeDatasetObj;
    }
    {
        if(!=null&&.size()>0) return ;
        if(==null||.size()==0) return null;
        List<StringlstDependMyColumnsTmp=new ArrayList<String>();
        for(String[] arrTmp:this.)
        {
            lstDependMyColumnsTmp.add(arrTmp[0]);
        }
        this.=lstDependMyColumnsTmp;
        return ;
    }
    public void setDependParents(String depends)
    {
        if(depends==nullreturn;
        depends=depends.trim();
        if(depends.equals(""))
        {
            this.=null;
            return;
        }
        this.=new HashMap<String,DependingColumnBean>();
        List<StringlstDepends=Tools.parseStringToList(depends,";",false);
        String columnTmp;
        DependingColumnBean dcbeanTmp;
        for(String strTmp:lstDepends)
        {
            int idx=strTmp.indexOf("=");
            if(idx<=0)
            {
                .warn("报表"+this.getReportBean().getPath()+"的<value/>的depends属性配置的依赖父数据集"+strTmp+"格式无效");
                continue;
            }
            dcbeanTmp=new DependingColumnBean();
            columnTmp=strTmp.substring(0,idx).trim();
            strTmp=strTmp.substring(idx+1).trim();
            idx=columnTmp.indexOf("(");
            if(columnTmp.endsWith(")")&&idx>0)
            {//配置了格式化方法
                dcbeanTmp.setFormatMethodName(columnTmp.substring(0,idx).trim());
                columnTmp=columnTmp.substring(idx+1,columnTmp.length()-1).trim();
            }
            dcbeanTmp.setColumn(columnTmp);
            if(strTmp.length()>1&&strTmp.startsWith("'")&&strTmp.endsWith("'"))
            {
                dcbeanTmp.setVarcharType(true);
                strTmp=strTmp.substring(1,strTmp.length()-1).trim();
            }
            idx=strTmp.indexOf(".");
            if(idx<=0)
            {
                throw new WabacusConfigLoadingException("报表"+this.getReportBean().getPath()+"的<value/>的depends属性配置的依赖父数据集"+strTmp+"不合法");
            }
            dcbeanTmp.setParentValueid(strTmp.substring(0,idx).trim());
            if(dcbeanTmp.getParentValueid().equals(this.))
            {
                throw new WabacusConfigLoadingException("报表"+this.getReportBean().getPath()+"中id为"+this.+"的<value/>自己依赖自己");
            }
            dcbeanTmp.setParentColumn(strTmp.substring(idx+1).trim());
            this..put(columnTmp,dcbeanTmp);
        }
        if(this..size()==0) this.=null;
    }
    {
        return ;
    }
    public void setDependsConditionExpression(String dependsConditionExpression)
    {
        if(this.==null||this..size()==0)
        {
            this.=null;
        }else if(dependsConditionExpression!=null&&!dependsConditionExpression.trim().equals(""))
        {
            this.=dependsConditionExpression.trim();
        }else
        {
            DependingColumnBean dcbeanTmp;
            StringBuffer expressionBuf=new StringBuffer();
            if(this.isStoreProcedure())
            {
                for(Entry<String,DependingColumnBeanentryTmp:this..entrySet())
                {
                    dcbeanTmp=entryTmp.getValue();
                    expressionBuf.append(dcbeanTmp.getColumn()).append("=");
                    expressionBuf.append("#").append(dcbeanTmp.getParentValueid()).append(".").append(dcbeanTmp.getParentColumn()).append("#;");
                }
                if(expressionBuf.charAt(expressionBuf.length()-1)==';'expressionBuf.deleteCharAt(expressionBuf.length()-1);
                this.=expressionBuf.toString().trim();
            }else
            {
                for(Entry<String,DependingColumnBeanentryTmp:this..entrySet())
                {
                    dcbeanTmp=entryTmp.getValue();
                    expressionBuf.append(dcbeanTmp.getColumn()).append(" in (");
                    expressionBuf.append("#").append(dcbeanTmp.getParentValueid()).append(".").append(dcbeanTmp.getParentColumn()).append("#) and ");
                }
                this.=expressionBuf.toString().trim();
                if(this..endsWith(" and"))
                {
                    this.=this..substring(0,this..length()-4);
                }
            }
        }
    }
    public String getDependstype()
    {
        return ;
    }
    public void setDependstype(String dependstype)
    {
        if(dependstype==nullreturn;
        dependstype=dependstype.toLowerCase().trim();
        if(dependstype.equals(""))
        {
            dependstype="single";
        }else if(!dependstype.equals("single")&&!dependstype.equals("multiple"))
        {
            throw new WabacusConfigLoadingException("加载报表"+this.getReportBean().getPath()+"的数据集"+this.+"失败,不能将数据集依赖关系配置为"+dependstype);
        }
        this.=dependstype;
    }
    public String getSeperator()
    {
        return ;
    }
    public void setSeperator(String seperator)
    {
        this.=seperator;
    }
    public boolean isStoreProcedure()
    {
        if(this.==null||this..trim().equals("")||this.!=nullreturn false;
        if(this..toLowerCase().indexOf("call ")==0||this..toLowerCase().indexOf("{call ")==0) return true;
        return false;
    }
    public boolean isSql()
    {
        if(this.isStoreProcedure()||this.!=nullreturn false;
        if(this.==null||this..trim().equals("")) return false;
        return true;
    }
    
    {
        return ;
    }
    public void setLstConditionInSqlBeans(List<ConditionInSqlBeanlstConditionInSqlBeans)
    {
        this.=lstConditionInSqlBeans;
    }
    public String getSqlCount()
    {
        return ;
    }
    public void setSqlCount(String sqlCount)
    {
        this.=sqlCount;
    }
    public String getSqlWithoutOrderby()
    {
        return ;
    }
    public void setSqlWithoutOrderby(String sqlWithoutOrderby)
    {
        this.=sqlWithoutOrderby;
    }
    public String getOrderby()
    {
        return ;
    }
    public void setOrderby(String orderby)
    {
        this.=orderby;
    }
    public String getSplitpage_sql()
    {
        return ;
    }
    public void setSplitpage_sql(String splitpage_sql)
    {
        this.=splitpage_sql;
    }
    public String getSql_kernel()
    {
        return ;
    }
    public void setSql_kernel(String sql_kernel)
    {
        this.=sql_kernel;
    }
    {
        return ;
    }
    public void setLstStoreProcedureParams(List<StringlstStoreProcedureParams)
    {
        this.=lstStoreProcedureParams;
    }
    public String getDatasource()
    {
        return ;
    }
    public void setDatasource(String datasource)
    {
        if(datasource!=null&&!datasource.trim().equals(""))
        {
            this.=datasource;
        }else
        {
            this.=((ReportDataSetBean)this.getParent()).getDatasource();
        }
    }
    public boolean isMatchDatasetid(String datasetid)
    {
        if(datasetid==null||datasetid.trim().equals(""))
        {
            return this.==null||this..trim().equals("")||this..equals(.);
        }else
        {
            return datasetid.equals();
        }
    }
    public boolean isDependentDataSet()
    {
        return this.!=null&&this..size()>0;
    }
    public List<StringgetAllParentValueIds()
    {
        if(this.==null||this..size()==0) return null;
        List<StringlstResults=new ArrayList<String>();
        DependingColumnBean dcbeanTmp;
        for(Entry<String,DependingColumnBeanentryTmp:this..entrySet())
        {
            dcbeanTmp=entryTmp.getValue();
            if(dcbeanTmp.getParentValueid()!=null&&!dcbeanTmp.getParentValueid().trim().equals(""))
            {
                lstResults.add(dcbeanTmp.getParentValueid());
            }
        }
        return lstResults;
    }
    public String format(String columnname,String value)
    {
        if(this.==null||this..size()==0) return value;
        DependingColumnBean dcbean=this..get(columnname);
        if(dcbean==nullreturn value;
        return dcbean.format(value);
    }
    public IReportDataSet createDataSetObj(ReportRequest rrequest,AbsReportType reportTypeObj)
    {
        
        ReportBean rbean=reportTypeObj.getReportBean();
        CacheDataBean cdb=rrequest.getCdb(rbean.getId());
        IReportDataSet datSetObj=null;
        if(this.!=null)
        {
            return this.;
        }else
        {
            //$ByQXO
            final ISqlDataSetBuilder isqlTypeBuilder=this.getDbType().getISQLTypeBuilder(this,rbean.getSbean().getStatementTypeName());
            if(this.isDependentDataSet()||cdb.isLoadAllReportData())
            {
                datSetObj  = isqlTypeBuilder.createAllResultSetISQLType();
            }else
            {
                datSetObj  = isqlTypeBuilder.createPartResultSetISQLType();
            }
            //ByQXO$
        }
        return datSetObj;
    }
    public IReportDataSet createLoadAllDataSetObj(ReportRequest rrequest,AbsReportType reportTypeObj)
    {
        
        IReportDataSet datSetObj=null;
        if(this.!=null)
        {
            return this.;
        }else
        {
            if(this.isStoreProcedure())
            {
                datSetObj=new GetDataSetByStoreProcedure();
                ((GetDataSetByStoreProcedure)datSetObj).setLoadAllData(true);
            }else if(this.getReportBean().getSbean().getStatementType()==.)
            {
                datSetObj=new GetAllDataSetByPreparedSQL();
            }else
            {
                datSetObj=new GetAllDataSetBySQL();
            }
        }
        return datSetObj;
    }
    public String getRealDependsConditionExpression(List lstReportData)
    {
        if(!this.isDependentDataSet()) return "";
        if(lstReportData==null||lstReportData.size()==0||this.==null||this..trim().equals(""))
            return "";
        String realConExpress=this.;
        DependingColumnBean dcbeanTmp;
        StringBuffer parentValuesBuf=new StringBuffer();
        for(Entry<String,DependingColumnBeanentryTmp:this..entrySet())
        {
            dcbeanTmp=entryTmp.getValue();
            for(Object dataObjTmp:lstReportData)
            {
                Object parentColVal=ReportAssistant.getInstance().getPropertyValue(dataObjTmp,dcbeanTmp.getParentColumn());
                if(parentColVal==nullparentColVal="";
                if(dcbeanTmp.isVarcharType()) parentValuesBuf.append("'");
                parentValuesBuf.append(String.valueOf(parentColVal));
                if(dcbeanTmp.isVarcharType()) parentValuesBuf.append("'");
                parentValuesBuf.append(",");
            }
            if(parentValuesBuf.length()>0&&parentValuesBuf.charAt(parentValuesBuf.length()-1)==',')
                parentValuesBuf.deleteCharAt(parentValuesBuf.length()-1);
            if(parentValuesBuf.length()==0)
            {
                if(dcbeanTmp.isVarcharType()) parentValuesBuf.append("''");
            }
            realConExpress=Tools.replaceAll(realConExpress,"#"+dcbeanTmp.getParentValueid()+"."+dcbeanTmp.getParentColumn()+"#",parentValuesBuf
                    .toString());
        }
        return realConExpress;
    }
    public void afterSqlLoad()
    {
        if(this.isStoreProcedure())
        {
            parseSPAndParams(this.getReportBean().getSbean());
        }else if(this.==null)
        {
            if(this.!=null&&this..size()>0)
            {
                if(this..indexOf()<0)
                {
                    throw new WabacusConfigLoadingException("加载报表"+this.getReportBean().getPath()+"的id为"+this.
                            +"的<value/>失败,此数据集依赖其它数据集,但没有在SQL语句中指定{#dependscondition#}占位符");
                }
            }
        }
    }
    private void parseSPAndParams(SqlBean sbean)
    {
        String proc=this.getValue().trim();
        int idxLeft=proc.indexOf("(");
        int idxRight=proc.lastIndexOf(")");
        if(idxLeft>0&&idxRight==proc.length()-1)
        {
            StringBuffer spBuf=new StringBuffer(proc.substring(0,idxLeft+1));//取到call spname(部分
            String procParams=proc.substring(idxLeft+1,idxRight);
            if(!procParams.trim().equals(""))
            {
                List<StringlstParams=Tools.parseStringToList(procParams,',','\'');
                List<StringlstSPParams=new ArrayList<String>();
                for(String paramTmp:lstParams)
                {
                    if(paramTmp.trim().equals("")||WabacusAssistant.getInstance().isGetRequestContextValue(paramTmp))
                    {
                        lstSPParams.add(paramTmp);
                    }else if(paramTmp.startsWith("'")&&paramTmp.endsWith("'"))
                    {
                        lstSPParams.add(paramTmp.substring(1,paramTmp.length()-1));
                    }else
                    {
                        if(sbean.getConditionBeanByName(paramTmp)==null)
                        {
                            throw new WabacusConfigLoadingException("加载报表"+this.getReportBean().getPath()+"失败,存储过程引用的name为"+paramTmp+"的动态条件不存在");
                        }
                        lstSPParams.add("condition{"+paramTmp+"}");
                    }
                    spBuf.append("?,");
                }
                this.setLstStoreProcedureParams(lstSPParams);
            }
            proc=spBuf.toString();
        }else
        {
            proc=proc+"(";
        }
        
        proc=proc+"?";
        if(Config.getInstance().getDataSource().getDbType() instanceof Oracle)
        {
            proc=proc+",?";
        }
        proc="{"+proc+")}";
        this.setValue(proc);
    }
    public void doPostLoad()
    {
        if(this.isStoreProcedure()||this.!=nullreturn;
        
        //$ByQXO
        this.getDbType().parseConditionInSql(this,this.);
        //ByQXO$
        
        validateConditionsConfig();
        if(this.!=null&&this..size()>0)
        {
            this.=new ArrayList<String[]>();
            for(Entry<String,DependingColumnBeanentryTmp:this..entrySet())
            {
                this..add(new String[] { entryTmp.getValue().getColumn(), entryTmp.getValue().getParentColumn() });
            }
        }
    }
    
    //$ByQXO
    //private void parseConditionInSql()
        final AbsDatabaseType dbType = this.getDbType();
        return dbType.getISQLTypeBuilder(this,sbean.getStatementTypeName());
     }
     public AbsDatabaseType getDbType()
     {
         final AbsDatabaseType dbtype=Config.getInstance().getDbType(this.getDatasource());
         return dbtype;
     }     
     //ByQXO$
    public void validateCondition(String sql,int idxBracketStart,int idxBracketEnd,int idxJingStart,int idxJingEnd)
    {
        if(idxBracketStart>=0&&idxBracketEnd<0||idxBracketStart<0&&idxBracketEnd>=0||idxBracketStart>=idxBracketEnd&&idxBracketEnd>=0)
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,{和}没有成对");
        }
        if(idxJingStart>=0&&idxJingEnd<0)
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,#号没有成对");
        }
        int nextValidBracketStartIdx=getValidIndex(sql,'{',idxBracketStart+1);
        if(nextValidBracketStartIdx>0&&idxBracketEnd>nextValidBracketStartIdx)
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,{和}没有成对");
        }
        if(idxBracketStart>=0&&sql.substring(idxBracketStart+1,idxBracketEnd).trim().equals(""))
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,,{和}之间不是有效的条件表达式");
        }
        if(idxJingStart>=0&&sql.substring(idxJingStart+1,idxJingEnd).trim().equals(""))
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,#和#之间不是有效的<condition/>的name属性值");
        }
        if(idxBracketStart<idxJingStart&&idxBracketEnd<idxJingEnd&&idxBracketStart>=0)
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,{、}、#、#之间的关系混乱");
        }
        if(idxBracketEnd<idxJingStart&&idxBracketStart>=0)
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,{、}之间的条件表达式没有指定动态条件的name属性");
        }
        if(idxBracketStart>idxJingStart&&idxBracketStart<idxJingEnd&&idxJingStart>=0)
        {
            throw new WabacusConfigLoadingException("解析报表"+this.getReportBean()+"的SQL语句:"+this.+"中的动态条件失败,{、}、#、#之间的关系混乱");
        }
    }
    public static int getValidIndex(String sql,char sign,int startindex)
    {
        if(sql==null||sql.equals("")) return -1;
        char c;
        for(int i=startindex,len=sql.length();i<len;i++)
        {
            c=sql.charAt(i);
            if(c==sign)
            {
                if(i==startindexreturn i;
                if(sql.charAt(i-1)=='\\')
                {
                    i++;
                }else
                {
                    return i;
                }
            }
        }
        return -1;
    }
    private void validateConditionsConfig()
    {
        List<StringlstConditionNamesInSql=new ArrayList<String>();//在sql语句中通过#name#指定了条件的<condition/>的name集合
        if(this.!=null&&this..size()>0)
        {//在sql语句中通过#name#指定了某些条件做为条件表达式
            ConditionBean cbReferedTmp;
            String conditionNameTmp;
            for(ConditionInSqlBean csbeanTmp:this.)
            {
                conditionNameTmp=csbeanTmp.getRealConditionname();
                if(conditionNameTmp==null||conditionNameTmp.trim().equals("")) continue;
                if(!lstConditionNamesInSql.contains(conditionNameTmp)) lstConditionNamesInSql.add(conditionNameTmp);
                cbReferedTmp=this.getReportBean().getSbean().getConditionBeanByName(conditionNameTmp);
                if(cbReferedTmp==null)
                {
                    throw new WabacusConfigLoadingException("报表"+this.getReportBean()+"的SQL语句:"+this.+"中引用的name属性为"+conditionNameTmp
                            +"的<condition/>不存在");
                }
                if(cbReferedTmp.getIterator()>1)
                {
                    throw new WabacusConfigLoadingException("报表"+this.getReportBean()+"的SQL语句:"+this.+"中引用的name属性为"+conditionNameTmp
                            +"的<condition/>的iterator值大于1");
                }
            }
        }
        
        
        //            if(lstConditionNamesInSql.contains(cbeanTmp.getName())) continue;//在<sql/>中通过#name#形式指定了条件的<condition/>可以不在<condition/>中配置条件表达式
        //            /**
        
        //             */
        
        //            {//此条件没有配置条件表达式
        //                /**
        //                 * 这里不抛出异常,因为这个条件可能用在了其它地方,比如交叉统计报表的<tablenameconditions/>中定义的查询条件如果需要输入框,则需在<sql/>中定义条件,
        //                 * 然后在<tablenameconditions/>中定义<condition/>中引用它,并在这里指定条件表达式,这个时候就不用在<sql/>的<condition/>中定义条件表达式了
        //                 */
        
        //                //throw new WabacusConfigLoadingException("报表"+this.getReportBean()+"的name属性为"+cbeanTmp.getName()
        //                       // +"的查询条件即没有以#name#的形式出现在sql语句中,也没有在<condition/>中配置条件表达式");
        
        
    }
    public final static String sqlprex="select * from (";
    public final static String sqlsuffix=") wabacus_temp_tbl";
    public void doPostLoadSql(boolean isListReportType)
    {
      //$ByQXO
       this.getDbType().doPostLoadSql(this,isListReportType);
       //ByQXO$
    }
    public void buildPageSplitSql()
    {
        //$ByQXO
        AbsDatabaseType dbtype=getDbType();
       //ByQXO$
        this.setSplitpage_sql(dbtype.constructSplitPageSql(this));
    }
    {
        ReportDataSetValueBean svbeanNew=(ReportDataSetValueBean)super.clone(parent);
        if(!=null)
        {
            List<ConditionInSqlBeanlstConditionInSqlBeansNew=new ArrayList<ConditionInSqlBean>();
            for(ConditionInSqlBean csbeanTmp:)
            {
                lstConditionInSqlBeansNew.add(csbeanTmp.clone());
            }
            svbeanNew.setLstConditionInSqlBeans(lstConditionInSqlBeansNew);
        }
        if(!=null)
        {
        }
        cloneExtendConfig(svbeanNew);
        return svbeanNew;
    }
    private class DependingColumnBean
    {
        private String column;
        private Class formatClass;
        private Method formatMethod;
        private String parentValueid;//父数据集<value/>的ID
        private String parentColumn;
        private boolean isVarcharType;
        public String getColumn()
        {
            return ;
        }
        public void setColumn(String column)
        {
            this.=column;
        }
        public String getParentValueid()
        {
            return ;
        }
        public void setParentValueid(String parentValueid)
        {
            this.=parentValueid;
        }
        public String getParentColumn()
        {
            return ;
        }
        public void setParentColumn(String parentColumn)
        {
            this.=parentColumn;
        }
        public boolean isVarcharType()
        {
            return ;
        }
        public void setVarcharType(boolean isVarcharType)
        {
            this.=isVarcharType;
        }
        public void setFormatMethodName(String formatmethodname)
        {
            if(formatmethodname==null||formatmethodname.trim().equals(""))
            {
                this.=null;
                this.=null;
            }else
            {
                formatmethodname=formatmethodname.trim();
                this.=getReportBean().getFormatMethodClass(formatmethodname,new Class[] { String.class });
                try
                {
                    this.=this..getMethod(formatmethodname,new Class[] { String.class });
                }catch(Exception e)
                {
                    throw new WabacusConfigLoadingException("加载报表"+getReportBean().getPath()+"的<value/>子标签时,获取格式化方法"+formatmethodname+"对象失败",e);
                }
            }
        }
        public String format(String value)
        {
            if(==null||==nullreturn value;
            try
            {
                return (String).invoke(,new Object[] { value });
            }catch(Exception e)
            {
                .warn("在查询报表"+getReportBean().getPath()+"的ID为"++"的记录集时,格式化字段"++"上的数据"+value+"失败",e);
                return value;
            }
        }
    }
New to GrepCode? Check out our FAQ X