--- /dev/null
+package mircoders.storage;
+
+import java.lang.*;
+import java.sql.*;
+import java.io.*;
+import java.util.*;
+
+import freemarker.template.*;
+
+import mir.storage.*;
+import mir.entity.*;
+import mir.misc.*;
+
+/**
+ * <b>Diese Klasse implementiert die Datenbankverbindung zur MetaObjekt-Tabelle
+ *
+ *
+ */
+
+public class DatabaseAudio extends Database implements StorageObject{
+
+ private static DatabaseAudio instance;
+ private static SimpleList publisherPopupData;
+
+ public static DatabaseAudio getInstance() throws StorageObjectException
+ {
+ if (instance == null) {
+ instance = new DatabaseAudio();
+ instance.myselfDatabase = instance;
+ }
+ return instance;
+ }
+
+ private DatabaseAudio() throws StorageObjectException
+ {
+ super();
+ this.hasTimestamp = true;
+ this.theTable="audio";
+ this.theCoreTable="media";
+ try {
+ this.theEntityClass = Class.forName("mircoders.entity.EntityAudio");
+ }
+ catch (Exception e) { throw new StorageObjectException(e.toString()); }
+ }
+
+ public SimpleList getPopupData() throws StorageObjectException {
+ return getPopupData("title",true);
+ }
+
+ public void update(Entity theEntity) throws StorageObjectException
+ {
+ String date = theEntity.getValue("date");
+ if (date==null){
+ date = StringUtil.date2webdbDate(new GregorianCalendar());
+ theEntity.setValueForProperty("date",date);
+ }
+
+ super.update(theEntity);
+ }
+
+
+ public String insert(Entity theEntity) throws StorageObjectException
+ {
+ String date = theEntity.getValue("date");
+ if (date==null){
+ date = StringUtil.date2webdbDate(new GregorianCalendar());
+ theEntity.setValueForProperty("date",date);
+ }
+ return super.insert(theEntity);
+ }
+
+ // initialisierungen aus den statischen Tabellen
+
+}