1 package mircoders.storage;
8 import freemarker.template.*;
15 * <b>Diese Klasse implementiert die Datenbankverbindung zur MetaObjekt-Tabelle
20 public class DatabaseImages extends Database implements StorageObject{
22 private static DatabaseImages instance;
23 private static SimpleList publisherPopupData;
25 public static DatabaseImages getInstance() throws StorageObjectException
27 if (instance == null) {
28 instance = new DatabaseImages();
29 instance.myselfDatabase = instance;
34 private DatabaseImages() throws StorageObjectException
37 this.hasTimestamp = true;
38 this.theTable="images";
39 this.theCoreTable="media";
41 this.theEntityClass = Class.forName("mircoders.entity.EntityImages");
43 catch (Exception e) { throw new StorageObjectException(e.toString()); }
46 public SimpleList getPopupData() {
47 return getPopupData("title",true);
50 public void update(Entity theEntity) throws StorageObjectException
52 String date = theEntity.getValue("date");
54 date = StringUtil.date2webdbDate(new GregorianCalendar());
55 theEntity.setValueForProperty("date",date);
58 super.update(theEntity);
62 public String insert(Entity theEntity) throws StorageObjectException
64 String date = theEntity.getValue("date");
66 date = StringUtil.date2webdbDate(new GregorianCalendar());
67 theEntity.setValueForProperty("date",date);
69 return super.insert(theEntity);
72 // initialisierungen aus den statischen Tabellen