KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > JRVariable


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  * JRVariable.java
28  *
29  * Created on 12 febbraio 2003, 21.45
30  *
31  */

32
33 package it.businesslogic.ireport;
34
35 public class JRVariable
36 {
37     private String JavaDoc name;
38     private String JavaDoc classType;
39     private String JavaDoc resetType;
40     private String JavaDoc resetGroup;
41     private String JavaDoc calculation;
42     private String JavaDoc expression;
43     private String JavaDoc initialValueExpression;
44     private boolean builtin;
45     private String JavaDoc incrementerFactoryClass = "";
46         private String JavaDoc incrementType = "None";
47         private String JavaDoc incrementGroup = "";
48         
49     public JRVariable(String JavaDoc name, boolean builtin)
50     {
51                 this(name,"java.lang.String", builtin);
52     }
53         
54         public JRVariable(String JavaDoc name, String JavaDoc classType, boolean builtin)
55     {
56         this.name = name;
57         this.builtin = builtin;
58         
59         this.classType= classType;
60         resetType= "";
61         resetGroup= "";
62         calculation= "";
63         expression= "";
64         initialValueExpression= "";
65     }
66         
67         /** Getter for property builtin.
68          * @return Value of property builtin.
69          *
70          */

71         public boolean isBuiltin() {
72             return builtin;
73         }
74         
75         /** Setter for property builtin.
76          * @param builtin New value of property builtin.
77          *
78          */

79         public void setBuiltin(boolean builtin) {
80             this.builtin = builtin;
81         }
82         
83         /** Getter for property calculation.
84          * @return Value of property calculation.
85          *
86          */

87         public java.lang.String JavaDoc getCalculation() {
88             return calculation;
89         }
90         
91         /** Setter for property calculation.
92          * @param calculation New value of property calculation.
93          *
94          */

95         public void setCalculation(java.lang.String JavaDoc calculation) {
96             this.calculation = calculation;
97         }
98         
99         /** Getter for property classType.
100          * @return Value of property classType.
101          *
102          */

103         public java.lang.String JavaDoc getClassType() {
104             return classType;
105         }
106         
107         /** Setter for property classType.
108          * @param classType New value of property classType.
109          *
110          */

111         public void setClassType(java.lang.String JavaDoc classType) {
112             this.classType = classType;
113         }
114         
115         /** Getter for property expression.
116          * @return Value of property expression.
117          *
118          */

119         public java.lang.String JavaDoc getExpression() {
120             return expression;
121         }
122         
123         /** Setter for property expression.
124          * @param expression New value of property expression.
125          *
126          */

127         public void setExpression(java.lang.String JavaDoc expression) {
128             this.expression = expression;
129         }
130         
131         /** Getter for property initialValueExpression.
132          * @return Value of property initialValueExpression.
133          *
134          */

135         public java.lang.String JavaDoc getInitialValueExpression() {
136             return initialValueExpression;
137         }
138         
139         /** Setter for property initialValueExpression.
140          * @param initialValueExpression New value of property initialValueExpression.
141          *
142          */

143         public void setInitialValueExpression(java.lang.String JavaDoc initialValueExpression) {
144             this.initialValueExpression = initialValueExpression;
145         }
146         
147         /** Getter for property name.
148          * @return Value of property name.
149          *
150          */

151         public java.lang.String JavaDoc getName() {
152             return name;
153         }
154         
155         /** Setter for property name.
156          * @param name New value of property name.
157          *
158          */

159         public void setName(java.lang.String JavaDoc name) {
160             this.name = name;
161         }
162         
163         /** Getter for property resetGroup.
164          * @return Value of property resetGroup.
165          *
166          */

167         public java.lang.String JavaDoc getResetGroup() {
168             return resetGroup;
169         }
170         
171         /** Setter for property resetGroup.
172          * @param resetGroup New value of property resetGroup.
173          *
174          */

175         public void setResetGroup(java.lang.String JavaDoc resetGroup) {
176             this.resetGroup = resetGroup;
177         }
178         
179         /** Getter for property resetType.
180          * @return Value of property resetType.
181          *
182          */

183         public java.lang.String JavaDoc getResetType() {
184             return resetType;
185         }
186         
187         /** Setter for property resetType.
188          * @param resetType New value of property resetType.
189          *
190          */

191         public void setResetType(java.lang.String JavaDoc resetType) {
192             this.resetType = resetType;
193         }
194         
195         public String JavaDoc toString()
196     {
197         return name;
198     }
199         
200         /** Getter for property incrementerFactoryClass.
201          * @return Value of property incrementerFactoryClass.
202          *
203          */

204         public java.lang.String JavaDoc getIncrementerFactoryClass() {
205             return incrementerFactoryClass;
206         }
207         
208         /** Setter for property incrementerFactoryClass.
209          * @param incrementerFactoryClass New value of property incrementerFactoryClass.
210          *
211          */

212         public void setIncrementerFactoryClass(java.lang.String JavaDoc incrementerFactoryClass) {
213             this.incrementerFactoryClass = incrementerFactoryClass;
214         }
215         
216         public JRVariable cloneMe()
217         {
218             JRVariable jrv = new JRVariable( name, classType, builtin);
219             
220             jrv.setResetType( resetType );
221         jrv.setResetGroup( resetGroup );
222         jrv.setCalculation( calculation );
223         jrv.setExpression( expression );
224         jrv.setInitialValueExpression( initialValueExpression );
225             jrv.setIncrementerFactoryClass( incrementerFactoryClass );
226             jrv.setIncrementGroup( getIncrementGroup());
227             
228             return jrv;
229         }
230
231     public String JavaDoc getIncrementType() {
232         return incrementType;
233     }
234
235     public void setIncrementType(String JavaDoc incrementType) {
236         this.incrementType = incrementType;
237     }
238
239     public String JavaDoc getIncrementGroup() {
240         return incrementGroup;
241     }
242
243     public void setIncrementGroup(String JavaDoc incrementGroup) {
244         this.incrementGroup = incrementGroup;
245     }
246 }
247
248
Popular Tags