Modified config system:
[mir.git] / source / mircoders / module / ModuleGruppen.java
1 package mircoders.module;
2
3 import java.io.*;
4 import java.lang.*;
5 import java.util.*;
6 import java.sql.*;
7 import javax.servlet.*;
8 import javax.servlet.http.*;
9
10 import freemarker.template.*;
11
12 import mir.servlet.*;
13 import mir.module.*;
14 import mir.entity.*;
15 import mir.misc.*;
16 import mir.storage.*;
17
18 import mircoders.storage.*;
19
20
21 /*
22  *  ContentObjekt -
23  *
24  *
25  * @author RK
26  */
27
28 public class ModuleGruppen extends AbstractModule
29 {
30         static Logfile theLog;
31
32         // Kontruktor
33
34         public ModuleGruppen(StorageObject theStorage)
35         {
36
37                 if (theLog == null) theLog = Logfile.getInstance(MirConfig.getProp("Home") + MirConfig.getProp("Module.Gruppen.Logfile"));
38                 if (theStorage == null) theLog.printWarning("StorageObject was null!");
39
40                 this.theStorage = theStorage;
41
42         }
43
44         // Methoden
45
46                 public EntityList getGruppen(String whereClause, int offset, int limit)
47         throws ModuleException
48                 {
49         //theLog.printDebugInfo("Module.get (wc,offset, limit)" +
50                                 //                        whereClause + " offset: " + offset + " limit: " + limit);
51         try {
52                         return theStorage.selectByWhereClause(whereClause, null, offset, limit);
53         }
54         catch (StorageObjectException e){
55                         throw new ModuleException(e.toString());
56         }
57                 }
58
59
60         public SimpleList getGruppenAsSimpleList() {
61                 return ((DatabaseGroups)theStorage).getPopupData();
62         }
63 }