KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jaspersoft > jasperserver > api > metadata > common > domain > client > DataTypeImpl


1 /*
2  * Copyright (C) 2006 JasperSoft http://www.jaspersoft.com
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed WITHOUT ANY WARRANTY; and without the
10  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
15  * or write to:
16  *
17  * Free Software Foundation, Inc.,
18  * 59 Temple Place - Suite 330,
19  * Boston, MA USA 02111-1307
20  */

21 package com.jaspersoft.jasperserver.api.metadata.common.domain.client;
22
23 import com.jaspersoft.jasperserver.api.metadata.common.domain.DataType;
24
25
26 /**
27  * @author Teodor Danciu (teodord@users.sourceforge.net)
28  * @version $Id: InputControlImpl.java 2332 2006-03-09 02:23:53Z tony $
29  */

30 public class DataTypeImpl extends ResourceImpl implements DataType
31 {
32     
33     /**
34      *
35      */

36     private byte type = TYPE_TEXT;
37     private Integer JavaDoc maxLength = null;
38     private Integer JavaDoc decimals = null;
39     private String JavaDoc regularExpr = null;
40     private Comparable JavaDoc minValue = null;
41     private Comparable JavaDoc maxValue = null;
42     private boolean isStrictMin = false;
43     private boolean isStrictMax = false;
44
45
46     /**
47      *
48      */

49     public byte getType()
50     {
51         return type;
52     }
53
54     /**
55      *
56      */

57     public void setType(byte type)
58     {
59         this.type = type;
60     }
61
62     /**
63      *
64      */

65     public Integer JavaDoc getMaxLength()
66     {
67         return maxLength;
68     }
69
70     /**
71      *
72      */

73     public void setMaxLength(Integer JavaDoc maxLength)
74     {
75         this.maxLength = maxLength;
76     }
77
78     /**
79      *
80      */

81     public Integer JavaDoc getDecimals()
82     {
83         return decimals;
84     }
85
86     /**
87      *
88      */

89     public void setDecimals(Integer JavaDoc decimals)
90     {
91         this.decimals = decimals;
92     }
93
94     /**
95      *
96      */

97     public String JavaDoc getRegularExpr()
98     {
99         return regularExpr;
100     }
101
102     /**
103      *
104      */

105     public void setRegularExpr(String JavaDoc regularExpr)
106     {
107         this.regularExpr = regularExpr;
108     }
109
110     /**
111      *
112      */

113     public Comparable JavaDoc getMinValue()
114     {
115         return minValue;
116     }
117
118     /**
119      *
120      */

121     public void setMinValue(Comparable JavaDoc min)
122     {
123         this.minValue = min;
124     }
125
126     /**
127      *
128      */

129     public Comparable JavaDoc getMaxValue()
130     {
131         return maxValue;
132     }
133
134     /**
135      *
136      */

137     public void setMaxValue(Comparable JavaDoc max)
138     {
139         this.maxValue = max;
140     }
141
142     /**
143      *
144      */

145     public boolean isStrictMin()
146     {
147         return isStrictMin;
148     }
149
150     /**
151      *
152      */

153     public void setStrictMin(boolean isStrictMin)
154     {
155         this.isStrictMin = isStrictMin;
156     }
157
158     /**
159      *
160      */

161     public boolean isStrictMax()
162     {
163         return isStrictMax;
164     }
165
166     /**
167      *
168      */

169     public void setStrictMax(boolean isStrictMax)
170     {
171         this.isStrictMax = isStrictMax;
172     }
173
174     protected Class JavaDoc getImplementingItf() {
175         return DataType.class;
176     }
177
178 }
179
Popular Tags