Source code: org/fencedb/logic/ReadLogicOJBImpl.java
1
2 package org.fencedb.logic;
3
4 import org.fencedb.base.Fencer;
5 import org.fencedb.base.Participation;
6 import org.fencedb.base.Club;
7 import org.fencedb.base.Country;
8 import org.fencedb.base.Competition;
9 import org.fencedb.base.DBAccess;
10
11 import java.util.List;
12
13 /**
14 * Description of the Class
15 *
16 * @author vico
17 * @created June 11, 2003
18 */
19 public class ReadLogicOJBImpl implements ReadLogic
20 {
21
22 /**
23 *Constructor for the ReadLogicOJBImpl object
24 */
25 public ReadLogicOJBImpl()
26 {
27
28 }
29
30
31 /**
32 * Gets the allFencers attribute of the ReadLogicOJBImpl object
33 *
34 * @return The allFencers value
35 * @exception ReadLogicException Description of the Exception
36 */
37 public List getAllFencers()
38 throws ReadLogicException
39 {
40 try {
41 String oqlQuery = "select fencers from " + Fencer.class.getName();
42 return DBAccess.getInstance().runOQL(oqlQuery);
43 }
44 catch (org.odmg.QueryException qe) {
45 throw new ReadLogicException(qe.getMessage());
46 }
47 }
48
49
50 /**
51 * Gets the allCompetitions attribute of the ReadLogicOJBImpl object
52 *
53 * @return The allCompetitions value
54 * @exception ReadLogicException Description of the Exception
55 */
56 public List getAllCompetitions()
57 throws ReadLogicException
58 {
59 try {
60 String oqlQuery = "select competitions from " + Competition.class.getName();
61 return DBAccess.getInstance().runOQL(oqlQuery);
62 }
63 catch (org.odmg.QueryException qe) {
64 throw new ReadLogicException(qe.getMessage());
65 }
66 }
67
68 }
69