KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.genimen.djeneric.test.strong.impl;
2
3 import com.genimen.djeneric.repository.DjCursor;
4 import com.genimen.djeneric.repository.exceptions.DjenericException;
5 import com.genimen.djeneric.test.strong.Customer;
6 import com.genimen.djeneric.test.strong.CustomerCursor;
7 import com.genimen.djeneric.test.strong.TestException;
8
9 // Place your custom code BETWEEN the following tags
10
//<DjenericManualCode id="1">
11
//</DjenericManualCode>
12
public class CustomerCursorImpl implements CustomerCursor
13 {
14   private DjCursor _cursor;
15
16   protected CustomerCursorImpl(DjCursor cursor) throws DjenericException
17   {
18     _cursor = cursor;
19   }
20
21   public Customer getNext() throws TestException
22   {
23     try
24     {
25       return (Customer) _cursor.getNext();
26     }
27     catch (Exception JavaDoc x)
28     {
29       throw new TestException(x);
30     }
31   }
32
33   public void close() throws TestException
34   {
35     try
36     {
37       _cursor.close();
38     }
39     catch (Exception JavaDoc x)
40     {
41       throw new TestException(x);
42     }
43   }
44
45   // Place your custom code BETWEEN the following tags
46
//<DjenericManualCode>
47
//</DjenericManualCode>
48
}
Popular Tags