6cb531216cad885b24d01d314be1d04ddbf5a3c8
[mir.git] / source / mircoders / storage / DatabaseMediafolder.java
1 package mircoders.storage;
2
3 /**
4  * Title:        Mir
5  * Description:  Ihre Beschreibung
6  * Copyright:    Copyright (c) 1999
7  * Company:
8  * @author
9  * @version
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
25 public class DatabaseMediafolder extends Database implements StorageObject{
26
27   private static DatabaseMediafolder 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 DatabaseMediafolder getInstance() 
33     throws StorageObjectException {
34     if (instance == null) {
35       instance = new DatabaseMediafolder();
36       instance.myselfDatabase = instance;
37     }
38     return instance;
39   }
40
41   private DatabaseMediafolder() throws StorageObjectException
42   {
43     super();
44     this.hasTimestamp = false;
45     //this.cache = new DatabaseCache(20);
46     this.theTable="media_folder";
47   }
48
49   public SimpleList getPopupData() throws StorageObjectException {
50     return getPopupData("name",true);
51   }
52
53 }