data. ... got lost
[mir.git] / source / mircoders / storage / DatabaseMessages.java
1 package mircoders.storage;
2
3 import java.lang.*;
4 import java.sql.*;
5 import java.io.*;
6 import java.util.*;
7
8 import freemarker.template.*;
9
10 import mir.storage.*;
11 import mir.entity.*;
12 import mir.misc.*;
13
14
15 /**
16  * Title:
17  * Description:
18  * Copyright:    Copyright (c) 2001
19  * Company:      Indymedia
20  * @author
21  * @version 1.0
22  */
23
24
25 public class DatabaseMessages extends Database implements StorageObject{
26
27   private static DatabaseMessages instance;
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 DatabaseMessages getInstance() 
33     throws StorageObjectException {
34     if (instance == null) {
35       instance = new DatabaseMessages();
36       instance.myselfDatabase = instance;
37     }
38     return instance;
39   }
40
41   private DatabaseMessages() throws StorageObjectException
42   {
43     super();
44     //this.cache = new DatabaseCache(10);
45     this.theTable="messages";
46   }
47
48
49 }