data. ... got lost
[mir.git] / source / mircoders / storage / DatabaseLanguage.java
1 package mircoders.storage;
2
3 /**
4  * Title: DatabaseLanguage
5  * Description:
6  * Copyright:    Copyright (c) 2001
7  * Company:      Indymedia
8  * @author
9  * @version 1.0
10  */
11
12 import java.lang.*;
13 import java.sql.*;
14 import java.io.*;
15 import java.util.*;
16
17 import freemarker.template.*;
18
19 import mir.storage.*;
20 import mir.entity.*;
21 import mir.misc.*;
22
23
24 public class DatabaseLanguage extends Database implements StorageObject{
25
26         private static DatabaseLanguage instance;
27         private static SimpleList languagePopupData;
28
29         // the following *has* to be sychronized cause this static method
30         // could get preemted and we could end up with 2 instances of DatabaseFoo..
31         // see the "Singletons with needles and thread" article at JavaWorld -mh
32         public synchronized static DatabaseLanguage getInstance() 
33           throws StorageObjectException
34         {
35                 if (instance == null) {
36                         instance = new DatabaseLanguage();
37                         instance.myselfDatabase = instance;
38                 }
39                 return instance;
40         }
41
42         private DatabaseLanguage() throws StorageObjectException
43         {
44                 super();
45                 this.hasTimestamp = false;
46                 this.theTable="language";
47         }
48
49         public SimpleList getPopupData() throws StorageObjectException { 
50       SimpleList pData = null;
51       try {
52       pData = getPopupData("name",false);
53       } catch (StorageObjectException e) {System.err.println("FF");}
54       return pData;
55     }
56
57
58 }