1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
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 |
|
} |