1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.fhw.cabaweb.junittests;
21
22 import org.apache.ojb.broker.PersistenceBroker;
23 import org.apache.ojb.broker.PersistenceBrokerFactory;
24
25 import java.util.HashMap;
26
27 import org.fhw.cabaweb.data.constants.Constants;
28 import org.fhw.cabaweb.ojb.*;
29 import org.fhw.cabaweb.ojb.interfaces.*;
30
31 public class Application
32 {
33 private HashMap useCases;
34 private PersistenceBroker broker;
35 private UseCase temp;
36
37 /***
38 * Application constructor comment.
39 */
40 public Application()
41 {
42 broker = null;
43 try
44 {
45 broker = PersistenceBrokerFactory.defaultPersistenceBroker();
46 }
47 catch (Throwable t)
48 {
49 t.printStackTrace();
50 }
51
52 temp = (UseCase) new UseCaseSprachen(broker);
53
54 useCases = new HashMap();
55 useCases.put("Sprachnummer", "2");
56 useCases.put("Sprachname", Constants.SPANISCH_KEY);
57 useCases.put("Anzeigen", "true");
58 temp.erzeugen(useCases);
59
60 useCases.clear();
61 useCases.put("Sprachnummer", "2");
62 useCases.put("Sprachname", Constants.ENGLISCH_KEY);
63 useCases.put("Anzeigen", "false");
64 temp.editieren(useCases);
65
66 useCases.clear();
67 useCases.put("Sprachnummer", "2");
68 temp.loeschen(useCases);
69
70 try
71 {
72 broker.close();
73 }
74 catch (Throwable t)
75 {
76 t.printStackTrace();
77 }
78 }
79
80 /***
81 * Insert the method's description here.
82 * Creation date: (04.03.2001 10:40:25)
83 * @param args java.lang.String[]
84 */
85 public static void main(String[] args)
86 {
87 Application app = new Application();
88 }
89
90 }