1   ////////////////////////////////////////////////////////////////////////////////
2   //CabaWeb
3   //Copyright (C) 2004  Thomas Vogt <Thomas.Vogt@TVC-Software.com>
4   //
5   //This library is free software; you can redistribute it and/or
6   //modify it under the terms of the GNU Lesser General Public
7   //License as published by the Free Software Foundation; either
8   //version 2.1 of the License, or (at your option) any later version.
9   //
10  //This library is distributed in the hope that it will be useful,
11  //but WITHOUT ANY WARRANTY; without even the implied warranty of
12  //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  //Lesser General Public License for more details.
14  //
15  //You should have received a copy of the GNU Lesser General Public
16  //License along with this library; if not, write to the Free Software
17  //Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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  }