Coverage report

  %line %branch
net.sf.infrared.web.formbean.LastInvocationTreeBean
0% 
0% 

 1  
 /*
 2  
  *
 3  
  * Copyright 2005 Tavant Technologies and Contributors
 4  
  * 
 5  
  * Licensed under the Apache License, Version 2.0 (the "License")
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  *
 9  
  *     http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  *
 17  
  *
 18  
  *
 19  
  * Original Author:  prashant.nair (Tavant Technologies)
 20  
  * Contributor(s):   -;
 21  
  *
 22  
  */
 23  
 package net.sf.infrared.web.formbean;
 24  
 
 25  
 import java.lang.reflect.InvocationTargetException;
 26  
 import java.util.ArrayList;
 27  
 
 28  
 import net.sf.infrared.base.model.AggregateExecutionTime;
 29  
 import net.sf.infrared.base.util.TreeNode;
 30  
 import net.sf.infrared.web.util.ViewUtil;
 31  
 
 32  
 import org.apache.commons.beanutils.BeanUtils;
 33  
 import org.apache.struts.action.ActionForm;
 34  
 
 35  
 public class LastInvocationTreeBean extends ActionForm {
 36  
 	
 37  
 	private TreeNode node;
 38  
 	private ArrayList aggregateApiBean;
 39  
     private String jdbcSummaryLength;
 40  
     private String sqlStatsLength;
 41  
 	
 42  
 	
 43  
 	public LastInvocationTreeBean(TreeNode node) throws IllegalAccessException, 
 44  0
 																	InvocationTargetException{
 45  0
 		this.setNode(node);
 46  0
 		AggregateExecutionTime[] jdbcSummaries = ViewUtil.getJDBCSummary(node);
 47  
 		
 48  0
         aggregateApiBean = new ArrayList();
 49  
 
 50  0
         for (int i = 0; i < jdbcSummaries.length; i++) {
 51  0
 			AggrExecTimeFormBean formBean = new AggrExecTimeFormBean();
 52  0
 			BeanUtils.copyProperties(formBean, jdbcSummaries[i]);
 53  0
 			aggregateApiBean.add(formBean);
 54  
 		}
 55  
         
 56  0
         jdbcSummaryLength = new Integer(jdbcSummaries.length).toString();
 57  0
 	}
 58  
 	
 59  
     public TreeNode getNode() {
 60  0
 		return node;
 61  
 	}
 62  
 
 63  
 	public void setNode(TreeNode node) {
 64  0
 		this.node = node;
 65  0
 	}
 66  
 
 67  
 	public ArrayList getAggregateApiBean() {
 68  0
 		return aggregateApiBean;
 69  
 	}
 70  
 
 71  
 	public void setAggregateApiBean(ArrayList aggregateApiBean) {
 72  0
 		this.aggregateApiBean = aggregateApiBean;
 73  0
 	}
 74  
 
 75  
 	public String getJdbcSummaryLength() {
 76  0
 		return jdbcSummaryLength;
 77  
 	}
 78  
 
 79  
 	public void setJdbcSummaryLength(String jdbcSummaryLength) {
 80  0
 		this.jdbcSummaryLength = jdbcSummaryLength;
 81  0
 	}
 82  
 
 83  
 	public String getSqlStatsLength() {
 84  0
 		return sqlStatsLength;
 85  
 	}
 86  
 
 87  
 	public void setSqlStatsLength(String sqlStatsLength) {
 88  0
 		this.sqlStatsLength = sqlStatsLength;
 89  0
 	}
 90  
 		
 91  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.