data. ... got lost
[mir.git] / source / mircoders / storage / DatabaseArticleType.java
1 package mircoders.storage;
2
3 /**
4  * Title:
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 DatabaseArticleType extends Database implements StorageObject{
25
26         private static DatabaseArticleType instance;
27         private static SimpleList articletypePopupData;
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 DatabaseArticleType getInstance() 
33           throws StorageObjectException
34         {
35                 if (instance == null) {
36                         instance = new DatabaseArticleType();
37                         instance.myselfDatabase = instance;
38                 }
39                 return instance;
40         }
41
42         private DatabaseArticleType() throws StorageObjectException
43         {
44                 super();
45                 this.hasTimestamp = false;
46                 this.theTable="article_type";
47         }
48
49         public SimpleList getPopupData()
50         throws StorageObjectException { return getPopupData("name",false); }
51
52
53 }