KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > genimen > djeneric > test > strong > impl > CustomerQbeImpl


1 package com.genimen.djeneric.test.strong.impl;
2
3 import com.genimen.djeneric.repository.DjExtent;
4 import com.genimen.djeneric.repository.DjQueryByExample;
5 import com.genimen.djeneric.repository.DjSession;
6 import com.genimen.djeneric.repository.exceptions.DjenericException;
7 import com.genimen.djeneric.test.strong.CustomerQbe;
8 import com.genimen.djeneric.test.strong.TestException;
9
10 // Place your custom code BETWEEN the following tags
11
//<DjenericManualCode id="1">
12
//</DjenericManualCode>
13
public class CustomerQbeImpl extends DjQueryByExample implements CustomerQbe
14 {
15   private static boolean propidx_set = false;
16   private static int PROPIDX_ID;
17   private static int PROPIDX_NAME;
18   private static int PROPIDX_STREET;
19   private static int PROPIDX_CITY;
20   private static int PROPIDX_ZIPCODE;
21
22   protected CustomerQbeImpl(DjSession session, DjExtent extent) throws DjenericException
23   {
24     super(session, extent);
25     if (!propidx_set)
26     {
27       propidx_set = true;
28       PROPIDX_ID = extent.getPropertyIndex("id");
29       PROPIDX_NAME = extent.getPropertyIndex("name");
30       PROPIDX_STREET = extent.getPropertyIndex("street");
31       PROPIDX_CITY = extent.getPropertyIndex("city");
32       PROPIDX_ZIPCODE = extent.getPropertyIndex("zipCode");
33     }
34   }
35
36   public void setQueryOperator(String JavaDoc propertyName, String JavaDoc operator) throws TestException
37   {
38     try
39     {
40       setOperator(propertyName, operator);
41     }
42     catch (Exception JavaDoc x)
43     {
44       throw new TestException(x);
45     }
46   }
47
48   public long getId()
49   {
50     return getLong(PROPIDX_ID);
51   }
52
53   public void setId(long value) throws TestException
54   {
55     try
56     {
57       setLong(PROPIDX_ID, value);
58     }
59     catch (Exception JavaDoc x)
60     {
61       throw new TestException(x);
62     }
63   }
64
65   public String JavaDoc getName()
66   {
67     return getString(PROPIDX_NAME);
68   }
69
70   public void setName(String JavaDoc value) throws TestException
71   {
72     try
73     {
74       setString(PROPIDX_NAME, value);
75     }
76     catch (Exception JavaDoc x)
77     {
78       throw new TestException(x);
79     }
80   }
81
82   public String JavaDoc getStreet()
83   {
84     return getString(PROPIDX_STREET);
85   }
86
87   public void setStreet(String JavaDoc value) throws TestException
88   {
89     try
90     {
91       setString(PROPIDX_STREET, value);
92     }
93     catch (Exception JavaDoc x)
94     {
95       throw new TestException(x);
96     }
97   }
98
99   public String JavaDoc getCity()
100   {
101     return getString(PROPIDX_CITY);
102   }
103
104   public void setCity(String JavaDoc value) throws TestException
105   {
106     try
107     {
108       setString(PROPIDX_CITY, value);
109     }
110     catch (Exception JavaDoc x)
111     {
112       throw new TestException(x);
113     }
114   }
115
116   public String JavaDoc getZipCode()
117   {
118     return getString(PROPIDX_ZIPCODE);
119   }
120
121   public void setZipCode(String JavaDoc value) throws TestException
122   {
123     try
124     {
125       setString(PROPIDX_ZIPCODE, value);
126     }
127     catch (Exception JavaDoc x)
128     {
129       throw new TestException(x);
130     }
131   }
132
133   // Place your custom code BETWEEN the following tags
134
//<DjenericManualCode>
135
//</DjenericManualCode>
136
}
Popular Tags