001: package com.triactive.jdo.test;
002:
003: import java.util.Collection;
004:
005: import java.math.BigDecimal;
006: import java.math.BigInteger;
007: import java.util.Date;
008:
009: public class Primitive implements PrimitiveInterface {
010: // java primitives
011: private boolean booleanField;
012: private Boolean booleanObjField;
013: private byte byteField;
014: private Byte byteObjField;
015: private char charField;
016: private Character charObjField;
017: private short shortField;
018: private Short shortObjField;
019: private int intField;
020: private Integer intObjField;
021: private long longField;
022: private Long longObjField;
023: private float floatField;
024: private Float floatObjField;
025: private double doubleField;
026: private Double doubleObjField;
027: private String fixedLengthString;
028: private String normalString;
029: private String hugeString;
030: // private BigDecimal bigDecimal;
031: // private BigInteger bigInteger;
032: private java.util.Date utilDateField;
033: private java.sql.Date sqlDateField;
034: private java.sql.Timestamp sqlTimestamp;
035: private transient int transientField;
036:
037: //private Collection persons;
038:
039: public Primitive() {
040: booleanField = false;
041: booleanObjField = null;
042: byteField = 0;
043: byteObjField = null;
044: charField = 'x';
045: charObjField = null;
046: shortField = 0;
047: shortObjField = null;
048: intField = 0;
049: intObjField = null;
050: longField = 0;
051: longObjField = null;
052: floatField = 0.0F;
053: floatObjField = null;
054: doubleField = 0.0;
055: doubleObjField = null;
056: fixedLengthString = "";
057: normalString = "";
058: hugeString = "";
059: // bigDecimal = null;
060: // bigInteger = null;
061: //persons = new HashSet();
062: }
063:
064: public boolean getBoolean() {
065: return booleanField;
066: }
067:
068: public void setBoolean(boolean b) {
069: booleanField = b;
070: }
071:
072: public Boolean getBooleanObject() {
073: return booleanObjField;
074: }
075:
076: public void setBooleanObject(Boolean b) {
077: booleanObjField = b;
078: }
079:
080: public char getChar() {
081: return charField;
082: }
083:
084: public void setChar(char c) {
085: charField = c;
086: }
087:
088: public Character getCharObject() {
089: return charObjField;
090: }
091:
092: public void setCharObject(Character c) {
093: charObjField = c;
094: }
095:
096: public byte getByte() {
097: return byteField;
098: }
099:
100: public void setByte(byte b) {
101: byteField = b;
102: }
103:
104: public Byte getByteObject() {
105: return byteObjField;
106: }
107:
108: public void setByteObject(Byte b) {
109: byteObjField = b;
110: }
111:
112: public short getShort() {
113: return shortField;
114: }
115:
116: public void setShort(short s) {
117: shortField = s;
118: }
119:
120: public Short getShortObject() {
121: return shortObjField;
122: }
123:
124: public void setShortObject(Short s) {
125: shortObjField = s;
126: }
127:
128: public int getInt() {
129: return intField;
130: }
131:
132: public void setInt(int i) {
133: intField = i;
134: }
135:
136: public Integer getIntObject() {
137: return intObjField;
138: }
139:
140: public void setIntObject(Integer i) {
141: intObjField = i;
142: }
143:
144: public long getLong() {
145: return longField;
146: }
147:
148: public void setLong(long l) {
149: longField = l;
150: }
151:
152: public Long getLongObject() {
153: return longObjField;
154: }
155:
156: public void setLongObject(Long l) {
157: longObjField = l;
158: }
159:
160: public float getFloat() {
161: return floatField;
162: }
163:
164: public void setFloat(float f) {
165: floatField = f;
166: }
167:
168: public Float getFloatObject() {
169: return floatObjField;
170: }
171:
172: public void setFloatObject(Float f) {
173: floatObjField = f;
174: }
175:
176: public double getDouble() {
177: return doubleField;
178: }
179:
180: public void setDouble(double d) {
181: doubleField = d;
182: }
183:
184: public Double getDoubleObject() {
185: return doubleObjField;
186: }
187:
188: public void setDoubleObject(Double d) {
189: doubleObjField = d;
190: }
191:
192: public String getFixedLengthString() {
193: return fixedLengthString;
194: }
195:
196: public void setFixedLengthString(String s) {
197: fixedLengthString = s;
198: }
199:
200: public String getNormalString() {
201: return normalString;
202: }
203:
204: public void setNormalString(String s) {
205: normalString = s;
206: }
207:
208: public String getHugeString() {
209: return hugeString;
210: }
211:
212: public void setHugeString(String s) {
213: hugeString = s;
214: }
215:
216: /* public BigDecimal getBigDecimal()
217: {
218: return bigDecimal;
219: }
220:
221: public void setBigDecimal(BigDecimal d)
222: {
223: bigDecimal = d;
224: }
225:
226: public BigInteger getBigInteger()
227: {
228: return bigInteger;
229: }
230:
231: public void setBigInteger(BigInteger i)
232: {
233: bigInteger = i;
234: }*/
235:
236: public Date getUtilDateField() {
237: return this .utilDateField;
238: }
239:
240: public void setUtilDateField(Date d) {
241: this .utilDateField = d;
242: }
243:
244: public java.sql.Date getSqlDateField() {
245: return this .sqlDateField;
246: }
247:
248: public void setSqlDateField(java.sql.Date d) {
249: this .sqlDateField = d;
250: }
251:
252: public java.sql.Timestamp getSqlTimestamp() {
253: return this .sqlTimestamp;
254: }
255:
256: public void setSqlTimestamp(java.sql.Timestamp t) {
257: this .sqlTimestamp = t;
258: }
259:
260: public int getTransientField() {
261: return this .transientField;
262: }
263:
264: public void setTransientField(int i) {
265: this .transientField = i;
266: }
267:
268: /*
269: public void addPerson(Person p)
270: {
271: persons.add(p);
272: }
273: */
274: }
|