KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > efs > openreports > objects > ReportParameter


1 /*
2  * Copyright (C) 2002 Erik Swenson - eswenson@opensourcesoft.net
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 2 of the License, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16  * Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  */

19
20 package org.efs.openreports.objects;
21
22 import java.io.Serializable JavaDoc;
23
24 public class ReportParameter implements Serializable JavaDoc
25 {
26     private static final long serialVersionUID = 667082979233371385l;
27
28     public static String JavaDoc[] TYPES =
29         new String JavaDoc[] { "Date", "List", "Query", "Text", "SubReport","Boolean" };
30
31     private static final String JavaDoc STRING = "java.lang.String";
32     private static final String JavaDoc DOUBLE = "java.lang.Double";
33     private static final String JavaDoc INTEGER = "java.lang.Integer";
34     private static final String JavaDoc LONG = "java.lang.Long";
35     private static final String JavaDoc BIGDECIMAL = "java.math.BigDecimal";
36     private static final String JavaDoc DATE = "java.util.Date";
37     private static final String JavaDoc SQL_DATE = "java.sql.Date";
38     private static final String JavaDoc TIMESTAMP = "java.sql.Timestamp";
39     private static final String JavaDoc BOOLEAN = "java.lang.Boolean";
40     
41     public static String JavaDoc[] CLASS_NAMES =
42         new String JavaDoc[] {
43             STRING,
44             DOUBLE,
45             INTEGER,
46             LONG,
47             BIGDECIMAL,
48             DATE,
49             SQL_DATE,
50             TIMESTAMP,
51             BOOLEAN};
52
53     public static final String JavaDoc QUERY_PARAM = "Query";
54     public static final String JavaDoc LIST_PARAM = "List";
55     public static final String JavaDoc TEXT_PARAM = "Text";
56     public static final String JavaDoc DATE_PARAM = "Date";
57     public static final String JavaDoc SUBREPORT_PARAM = "SubReport";
58     public static final String JavaDoc BOOLEAN_PARAM = "Boolean";
59     
60     private Integer JavaDoc id;
61     private String JavaDoc name;
62     private String JavaDoc type;
63     private String JavaDoc className;
64     private ReportDataSource dataSource;
65     private String JavaDoc data;
66     private ReportParameterValue[] values;
67     private String JavaDoc description;
68     private boolean required;
69     private boolean multipleSelect;
70
71     public ReportDataSource getDataSource()
72     {
73         return dataSource;
74     }
75
76     public void setDataSource(ReportDataSource dataSource)
77     {
78         this.dataSource = dataSource;
79     }
80
81     public ReportParameter()
82     {
83     }
84
85     public String JavaDoc getName()
86     {
87         return name;
88     }
89
90     public String JavaDoc getType()
91     {
92         return type;
93     }
94
95     public String JavaDoc getClassName()
96     {
97         return className;
98     }
99
100     public String JavaDoc getData()
101     {
102         return data;
103     }
104
105     public ReportParameterValue[] getValues()
106     {
107         return values;
108     }
109
110     public void setValues(ReportParameterValue[] values)
111     {
112         this.values = values;
113     }
114
115     public void setClassName(String JavaDoc className)
116     {
117         this.className = className;
118     }
119
120     public void setData(String JavaDoc data)
121     {
122         this.data = data;
123     }
124
125     public void setName(String JavaDoc name)
126     {
127         this.name = name;
128     }
129
130     public void setType(String JavaDoc type)
131     {
132         this.type = type;
133     }
134
135     public Integer JavaDoc getId()
136     {
137         return id;
138     }
139
140     public void setId(Integer JavaDoc id)
141     {
142         this.id = id;
143     }
144
145     public String JavaDoc getDescription()
146     {
147         return description;
148     }
149
150     public void setDescription(String JavaDoc description)
151     {
152         this.description = description;
153     }
154
155     public boolean isRequired()
156     {
157         return required;
158     }
159
160     public void setRequired(boolean required)
161     {
162         this.required = required;
163     }
164     
165     public boolean isMultipleSelect()
166     {
167         return multipleSelect;
168     }
169
170     public void setMultipleSelect(boolean multiple)
171     {
172         this.multipleSelect = multiple;
173     }
174
175 }
Popular Tags