KickJava   Java API By Example, From Geeks To Geeks.

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


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  * JRParameter.java
28  *
29  */

30
31 package it.businesslogic.ireport;
32
33 public class JRParameter
34 {
35     private String JavaDoc name;
36     private String JavaDoc classType;
37     private String JavaDoc description="";
38     private String JavaDoc defaultValueExpression="";
39     private boolean isForPrompting = true;
40     private boolean builtin = false;
41         private Object JavaDoc lastDefaultValue = null;
42     
43     public JRParameter(String JavaDoc name, String JavaDoc classType, boolean isForPrompting, String JavaDoc description, boolean builtin)
44     {
45         this.name = name;
46         this.classType = classType;
47         this.isForPrompting = isForPrompting;
48         this.description = description;
49                 this.builtin = builtin;
50     }
51         
52     public JRParameter(String JavaDoc name, String JavaDoc classType, boolean isForPrompting, String JavaDoc description)
53     {
54                 this(name, classType, isForPrompting, description, false);
55     }
56     
57     public JRParameter(String JavaDoc name, String JavaDoc classType, boolean isForPrompting)
58     {
59         this(name, classType, isForPrompting, "", false);
60     }
61     
62     public JRParameter(String JavaDoc name, String JavaDoc classType)
63     {
64                 this(name, classType, true, "", false);
65     }
66         
67     public String JavaDoc toString()
68     {
69         return name;
70     }
71         
72         /** Getter for property classType.
73          * @return Value of property classType.
74          *
75          */

76         public java.lang.String JavaDoc getClassType() {
77             return classType;
78         }
79         
80         /** Setter for property classType.
81          * @param classType New value of property classType.
82          *
83          */

84         public void setClassType(java.lang.String JavaDoc classType) {
85             this.classType = classType;
86         }
87         
88         /** Getter for property defaultValueExpression.
89          * @return Value of property defaultValueExpression.
90          *
91          */

92         public java.lang.String JavaDoc getDefaultValueExpression() {
93             return defaultValueExpression;
94         }
95         
96         /** Setter for property defaultValueExpression.
97          * @param defaultValueExpression New value of property defaultValueExpression.
98          *
99          */

100         public void setDefaultValueExpression(java.lang.String JavaDoc defaultValueExpression) {
101             this.defaultValueExpression = defaultValueExpression;
102         }
103         
104         /** Getter for property description.
105          * @return Value of property description.
106          *
107          */

108         public java.lang.String JavaDoc getDescription() {
109             return description;
110         }
111         
112         /** Setter for property description.
113          * @param description New value of property description.
114          *
115          */

116         public void setDescription(java.lang.String JavaDoc description) {
117             this.description = description;
118         }
119         
120         /** Getter for property isForPrompting.
121          * @return Value of property isForPrompting.
122          *
123          */

124         public boolean isIsForPrompting() {
125             return isForPrompting;
126         }
127         
128         /** Setter for property isForPrompting.
129          * @param isForPrompting New value of property isForPrompting.
130          *
131          */

132         public void setIsForPrompting(boolean isForPrompting) {
133             this.isForPrompting = isForPrompting;
134         }
135         
136         /** Getter for property name.
137          * @return Value of property name.
138          *
139          */

140         public java.lang.String JavaDoc getName() {
141             return name;
142         }
143         
144         /** Setter for property name.
145          * @param name New value of property name.
146          *
147          */

148         public void setName(java.lang.String JavaDoc name) {
149             this.name = name;
150         }
151         
152         public JRParameter cloneMe()
153         {
154             JRParameter jrp = new JRParameter(name, classType, isForPrompting, description);
155             
156             jrp.setDefaultValueExpression( defaultValueExpression );
157         jrp.setBuiltin( isBuiltin());
158             
159             return jrp;
160         }
161
162     public boolean isBuiltin() {
163         return builtin;
164     }
165
166     public void setBuiltin(boolean builtin) {
167         this.builtin = builtin;
168     }
169     
170     public Object JavaDoc getLastDefaultValue() {
171         return lastDefaultValue;
172     }
173
174     public void setLastDefaultValue(Object JavaDoc lastDefaultValue) {
175         this.lastDefaultValue = lastDefaultValue;
176     }
177         
178 }
179
Popular Tags