a77ad3d34b25d846f6f47f3fd65e52fbca2c232a
[mir.git] / source / mircoders / storage / DatabaseRights.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  * <b>Diese Klasse implementiert die Datenbankverbindung zur MetaObjekt-Tabelle
16  *
17  *
18  */
19
20 public class DatabaseRights extends Database implements StorageObject{
21
22         private static DatabaseRights instance;
23         private static SimpleList publisherPopupData;
24
25         // the following *has* to be sychronized cause this static method
26         // could get preemted and we could end up with 2 instances of DatabaseFoo..
27         // see the "Singletons with needles and thread" article at JavaWorld -mh
28         public synchronized static DatabaseRights getInstance() 
29           throws StorageObjectException
30         {
31                 if (instance == null) {
32                         instance = new DatabaseRights();
33                         instance.myselfDatabase = instance;
34                 }
35                 return instance;
36         }
37
38         private DatabaseRights() throws StorageObjectException
39         {
40                 super();
41                 this.hasTimestamp = false;
42                 this.theTable="rights";
43         }
44
45         public SimpleList getPopupData() throws StorageObjectException
46     { return getPopupData("name",true); }
47
48
49 }