KickJava   Java API By Example, From Geeks To Geeks.

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


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.Customer;
8 import com.genimen.djeneric.test.strong.OrderQbe;
9 import com.genimen.djeneric.test.strong.TestException;
10
11 // Place your custom code BETWEEN the following tags
12
//<DjenericManualCode id="1">
13
//</DjenericManualCode>
14
public class OrderQbeImpl extends DjQueryByExample implements OrderQbe
15 {
16   private static boolean propidx_set = false;
17   private static int PROPIDX_ID;
18   private static int PROPIDX_ORDERDATE;
19   private static int PROPIDX_ORDERNUMBER;
20   private static int PROPIDX_CUSTOMER;
21
22   protected OrderQbeImpl(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_ORDERDATE = extent.getPropertyIndex("orderdate");
30       PROPIDX_ORDERNUMBER = extent.getPropertyIndex("ordernumber");
31       PROPIDX_CUSTOMER = extent.getPropertyIndex("customer");
32     }
33   }
34
35   public void setQueryOperator(String JavaDoc propertyName, String JavaDoc operator) throws TestException
36   {
37     try
38     {
39       setOperator(propertyName, operator);
40     }
41     catch (Exception JavaDoc x)
42     {
43       throw new TestException(x);
44     }
45   }
46
47   public long getId()
48   {
49     return getLong(PROPIDX_ID);
50   }
51
52   public void setId(long value) throws TestException
53   {
54     try
55     {
56       setLong(PROPIDX_ID, value);
57     }
58     catch (Exception JavaDoc x)
59     {
60       throw new TestException(x);
61     }
62   }
63
64   public java.util.Date JavaDoc getOrderdate()
65   {
66     return getDate(PROPIDX_ORDERDATE);
67   }
68
69   public void setOrderdate(java.util.Date JavaDoc value) throws TestException
70   {
71     try
72     {
73       setDate(PROPIDX_ORDERDATE, value);
74     }
75     catch (Exception JavaDoc x)
76     {
77       throw new TestException(x);
78     }
79   }
80
81   public long getOrdernumber()
82   {
83     return getLong(PROPIDX_ORDERNUMBER);
84   }
85
86   public void setOrdernumber(long value) throws TestException
87   {
88     try
89     {
90       setLong(PROPIDX_ORDERNUMBER, value);
91     }
92     catch (Exception JavaDoc x)
93     {
94       throw new TestException(x);
95     }
96   }
97
98   public Customer getCustomer() throws TestException
99   {
100     try
101     {
102       return (Customer) get(PROPIDX_CUSTOMER);
103     }
104     catch (Exception JavaDoc x)
105     {
106       throw new TestException(x);
107     }
108   }
109
110   public void setCustomer(Customer value) throws TestException
111   {
112     try
113     {
114       set(PROPIDX_CUSTOMER, (CustomerImpl) value);
115     }
116     catch (Exception JavaDoc x)
117     {
118       throw new TestException(x);
119     }
120   }
121
122   // Place your custom code BETWEEN the following tags
123
//<DjenericManualCode>
124
//</DjenericManualCode>
125
}
Popular Tags