KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > test > Primitive


1 package com.triactive.jdo.test;
2
3 import java.util.Collection JavaDoc;
4
5 import java.math.BigDecimal JavaDoc;
6 import java.math.BigInteger JavaDoc;
7 import java.util.Date JavaDoc;
8
9 public class Primitive implements PrimitiveInterface
10 {
11   // java primitives
12
private boolean booleanField;
13   private Boolean JavaDoc booleanObjField;
14   private byte byteField;
15   private Byte JavaDoc byteObjField;
16   private char charField;
17   private Character JavaDoc charObjField;
18   private short shortField;
19   private Short JavaDoc shortObjField;
20   private int intField;
21   private Integer JavaDoc intObjField;
22   private long longField;
23   private Long JavaDoc longObjField;
24   private float floatField;
25   private Float JavaDoc floatObjField;
26   private double doubleField;
27   private Double JavaDoc doubleObjField;
28   private String JavaDoc fixedLengthString;
29   private String JavaDoc normalString;
30   private String JavaDoc hugeString;
31 // private BigDecimal bigDecimal;
32
// private BigInteger bigInteger;
33
private java.util.Date JavaDoc utilDateField;
34   private java.sql.Date JavaDoc sqlDateField;
35   private java.sql.Timestamp JavaDoc sqlTimestamp;
36   private transient int transientField;
37
38
39   //private Collection persons;
40

41         public Primitive()
42         {
43     booleanField = false;
44     booleanObjField = null;
45     byteField = 0;
46     byteObjField = null;
47     charField = 'x';
48     charObjField = null;
49     shortField = 0;
50     shortObjField = null;
51     intField = 0;
52     intObjField = null;
53     longField = 0;
54     longObjField = null;
55     floatField = 0.0F;
56     floatObjField = null;
57     doubleField = 0.0;
58     doubleObjField = null;
59     fixedLengthString= "";
60     normalString = "";
61     hugeString = "";
62 // bigDecimal = null;
63
// bigInteger = null;
64
//persons = new HashSet();
65
}
66
67   public boolean getBoolean()
68   {
69     return booleanField;
70   }
71
72   public void setBoolean(boolean b)
73   {
74     booleanField = b;
75   }
76
77   public Boolean JavaDoc getBooleanObject()
78   {
79     return booleanObjField;
80   }
81
82   public void setBooleanObject(Boolean JavaDoc b)
83   {
84     booleanObjField = b;
85   }
86
87   public char getChar()
88   {
89     return charField;
90   }
91
92   public void setChar(char c)
93   {
94     charField = c;
95   }
96
97   public Character JavaDoc getCharObject()
98   {
99     return charObjField;
100   }
101
102   public void setCharObject(Character JavaDoc c)
103   {
104     charObjField = c;
105   }
106
107   public byte getByte()
108   {
109     return byteField;
110   }
111
112   public void setByte(byte b)
113   {
114     byteField = b;
115   }
116
117   public Byte JavaDoc getByteObject()
118   {
119     return byteObjField;
120   }
121
122   public void setByteObject(Byte JavaDoc b)
123   {
124     byteObjField = b;
125   }
126
127   public short getShort()
128   {
129     return shortField;
130   }
131
132   public void setShort(short s)
133   {
134     shortField = s;
135   }
136
137   public Short JavaDoc getShortObject()
138   {
139     return shortObjField;
140   }
141
142   public void setShortObject(Short JavaDoc s)
143   {
144     shortObjField = s;
145   }
146
147   public int getInt()
148   {
149     return intField;
150   }
151
152   public void setInt(int i)
153   {
154     intField = i;
155   }
156
157   public Integer JavaDoc getIntObject()
158   {
159     return intObjField;
160   }
161
162   public void setIntObject(Integer JavaDoc i)
163   {
164     intObjField = i;
165   }
166
167   public long getLong()
168   {
169     return longField;
170   }
171
172   public void setLong(long l)
173   {
174     longField = l;
175   }
176
177   public Long JavaDoc getLongObject()
178   {
179     return longObjField;
180   }
181
182   public void setLongObject(Long JavaDoc l)
183   {
184     longObjField = l;
185   }
186
187   public float getFloat()
188   {
189     return floatField;
190   }
191
192   public void setFloat(float f)
193   {
194     floatField = f;
195   }
196
197   public Float JavaDoc getFloatObject()
198   {
199     return floatObjField;
200   }
201
202   public void setFloatObject(Float JavaDoc f)
203   {
204     floatObjField = f;
205   }
206
207   public double getDouble()
208   {
209     return doubleField;
210   }
211
212   public void setDouble(double d)
213   {
214     doubleField = d;
215   }
216
217   public Double JavaDoc getDoubleObject()
218   {
219     return doubleObjField;
220   }
221
222   public void setDoubleObject(Double JavaDoc d)
223   {
224     doubleObjField = d;
225   }
226
227   public String JavaDoc getFixedLengthString()
228   {
229     return fixedLengthString;
230   }
231
232   public void setFixedLengthString(String JavaDoc s)
233   {
234     fixedLengthString = s;
235   }
236
237   public String JavaDoc getNormalString()
238   {
239     return normalString;
240   }
241
242   public void setNormalString(String JavaDoc s)
243   {
244     normalString = s;
245   }
246
247   public String JavaDoc getHugeString()
248   {
249     return hugeString;
250   }
251
252   public void setHugeString(String JavaDoc s)
253   {
254     hugeString = s;
255   }
256
257 /* public BigDecimal getBigDecimal()
258   {
259     return bigDecimal;
260   }
261
262   public void setBigDecimal(BigDecimal d)
263   {
264     bigDecimal = d;
265   }
266
267   public BigInteger getBigInteger()
268   {
269     return bigInteger;
270   }
271
272   public void setBigInteger(BigInteger i)
273   {
274     bigInteger = i;
275   }*/

276
277   public Date JavaDoc getUtilDateField()
278   {
279     return this.utilDateField;
280   }
281
282   public void setUtilDateField(Date JavaDoc d)
283   {
284     this.utilDateField = d;
285   }
286
287   public java.sql.Date JavaDoc getSqlDateField()
288   {
289     return this.sqlDateField;
290   }
291
292   public void setSqlDateField(java.sql.Date JavaDoc d)
293   {
294     this.sqlDateField = d;
295   }
296
297   public java.sql.Timestamp JavaDoc getSqlTimestamp()
298   {
299     return this.sqlTimestamp;
300   }
301
302   public void setSqlTimestamp(java.sql.Timestamp JavaDoc t)
303   {
304     this.sqlTimestamp = t;
305   }
306
307   public int getTransientField()
308   {
309       return this.transientField;
310   }
311
312   public void setTransientField(int i)
313   {
314       this.transientField = i;
315   }
316
317
318 /*
319   public void addPerson(Person p)
320   {
321     persons.add(p);
322   }
323 */

324 }
325
Popular Tags