KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > crosstab > Measure


1 /*
2  * Copyright (C) 2005 - 2006 JasperSoft Corporation. All rights reserved.
3  * http://www.jaspersoft.com.
4  *
5  * Unless you have purchased a commercial license agreement from JasperSoft,
6  * the following license terms apply:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed WITHOUT ANY WARRANTY; and without the
13  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18  * or write to:
19  *
20  * Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330,
22  * Boston, MA USA 02111-1307
23  *
24  *
25  *
26  *
27  * Measure.java
28  *
29  * Created on 12 febbraio 2003, 21.45
30  *
31  */

32
33 package it.businesslogic.ireport.crosstab;
34
35 public class Measure
36 {
37     private String JavaDoc name;
38     private String JavaDoc classType;
39     private String JavaDoc calculation;
40     private String JavaDoc expression;
41     private String JavaDoc incrementerFactoryClass = "";
42         private String JavaDoc percentageOf ="None";
43         private String JavaDoc percentageCalculatorClass = "";
44         
45         
46         public Measure(String JavaDoc name)
47         {
48             this(name,"java.lang.String");
49         }
50         
51         public Measure(String JavaDoc name, String JavaDoc classType)
52     {
53         this.name = name;
54         
55         this.classType= classType;
56         calculation= "";
57         expression= "";
58     }
59                 
60         /** Getter for property calculation.
61          * @return Value of property calculation.
62          *
63          */

64         public java.lang.String JavaDoc getCalculation() {
65             return calculation;
66         }
67         
68         /** Setter for property calculation.
69          * @param calculation New value of property calculation.
70          *
71          */

72         public void setCalculation(java.lang.String JavaDoc calculation) {
73             this.calculation = calculation;
74         }
75         
76         /** Getter for property classType.
77          * @return Value of property classType.
78          *
79          */

80         public java.lang.String JavaDoc getClassType() {
81             return classType;
82         }
83         
84         /** Setter for property classType.
85          * @param classType New value of property classType.
86          *
87          */

88         public void setClassType(java.lang.String JavaDoc classType) {
89             this.classType = classType;
90         }
91         
92         /** Getter for property expression.
93          * @return Value of property expression.
94          *
95          */

96         public java.lang.String JavaDoc getExpression() {
97             return expression;
98         }
99         
100         /** Setter for property expression.
101          * @param expression New value of property expression.
102          *
103          */

104         public void setExpression(java.lang.String JavaDoc expression) {
105             this.expression = expression;
106         }
107         
108         /** Getter for property name.
109          * @return Value of property name.
110          *
111          */

112         public java.lang.String JavaDoc getName() {
113             return name;
114         }
115         
116         /** Setter for property name.
117          * @param name New value of property name.
118          *
119          */

120         public void setName(java.lang.String JavaDoc name) {
121             this.name = name;
122         }
123         
124         public String JavaDoc toString()
125     {
126         return name;
127     }
128         
129         /** Getter for property incrementerFactoryClass.
130          * @return Value of property incrementerFactoryClass.
131          *
132          */

133         public java.lang.String JavaDoc getIncrementerFactoryClass() {
134             return incrementerFactoryClass;
135         }
136         
137         /** Setter for property incrementerFactoryClass.
138          * @param incrementerFactoryClass New value of property incrementerFactoryClass.
139          *
140          */

141         public void setIncrementerFactoryClass(java.lang.String JavaDoc incrementerFactoryClass) {
142             this.incrementerFactoryClass = incrementerFactoryClass;
143         }
144         
145         public Measure cloneMe()
146         {
147             Measure jrv = new Measure( name, classType);
148             
149         jrv.setCalculation( calculation );
150         jrv.setExpression( expression );
151             jrv.setIncrementerFactoryClass( getIncrementerFactoryClass());
152                 jrv.setPercentageOf( getPercentageOf());
153             jrv.setPercentageCalculatorClass( getPercentageCalculatorClass());
154             
155             return jrv;
156         }
157
158     public String JavaDoc getPercentageOf() {
159         return percentageOf;
160     }
161
162     public void setPercentageOf(String JavaDoc percentageOf) {
163         this.percentageOf = percentageOf;
164     }
165
166     public String JavaDoc getPercentageCalculatorClass() {
167         return percentageCalculatorClass;
168     }
169
170     public void setPercentageCalculatorClass(String JavaDoc percentageCalculatorClass) {
171         this.percentageCalculatorClass = percentageCalculatorClass;
172     }
173
174 }
175
176
Popular Tags