fbf0e98f8c7cb69f6e203b50f8e250ba255f9848
[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 webdb.servlet.*;
13 import webdb.module.*;
14 import webdb.entity.*;
15 import webdb.misc.*;
16 import webdb.storage.*;
17
18 import mir.entity.*;
19 import mir.storage.*;
20
21
22 /*
23  *  ContentObjekt -
24  *
25  *
26  * @author RK
27  */
28
29 public class ModuleGruppen extends AbstractModule
30 {
31         static Logfile theLog;
32
33         // Kontruktor
34
35         public ModuleGruppen(StorageObject theStorage)
36         {
37
38                 if (theLog == null) theLog = Logfile.getInstance(Configuration.getProperty("Home") + Configuration.getProperty("Module.Gruppen.Logfile"));
39                 if (theStorage == null) theLog.printWarning("StorageObject was null!");
40
41                 this.theStorage = theStorage;
42
43         }
44
45         // Methoden
46
47                 public EntityList getGruppen(String whereClause, int offset, int limit)
48         throws ModuleException
49                 {
50         //theLog.printDebugInfo("Module.get (wc,offset, limit)" +
51                                 //                        whereClause + " offset: " + offset + " limit: " + limit);
52         try {
53                         return theStorage.selectByWhereClause(whereClause, null, offset, limit);
54         }
55         catch (StorageObjectException e){
56                         throw new ModuleException(e.toString());
57         }
58                 }
59
60
61         public SimpleList getGruppenAsSimpleList() {
62                 return ((DatabaseGroups)theStorage).getPopupData();
63         }
64 }