new admin templates! with many thanks to init...
[mir.git] / source / mircoders / entity / EntityAudio.java
index 8cc7f76..3a46eed 100755 (executable)
 
 package mircoders.entity;
 
-import java.lang.*;
-import java.io.*;
-import java.util.*;
-import java.sql.*;
+import java.sql.SQLException;
+import java.util.Map;
 
-/*
- * kind of hack for postgres non-standard LargeObjects that Poolman
- * doesn't know about. see all the casting, LargeObj stuff in getIcon, getAudio
- * at some point when postgres has normal BLOB support, this should go.
- */
-import org.postgresql.Connection;
-import org.postgresql.largeobject.LargeObject;
-import org.postgresql.largeobject.LargeObjectManager;
-
-import mir.entity.*;
-import mir.misc.*;
-import mir.storage.*;
+import mir.storage.StorageObject;
+import mir.storage.StorageObjectFailure;
 
 /**
  * This class handles storage of audio data and meta data
  *
  * @author mh
- * @version $Id: EntityAudio.java,v 1.4 2002/11/04 04:35:21 mh Exp $
+ * @version $Id: EntityAudio.java,v 1.10 2003/04/09 02:06:08 zapata Exp $
  */
 
 
 public class EntityAudio extends EntityUploadedMedia
 {
-       public EntityAudio()
-       {
-               super();
-       }
-
-       public EntityAudio(StorageObject theStorage) {
-               this();
-               setStorage(theStorage);
-       }
+  public EntityAudio() {
+    super();
+  }
 
-       public void update() throws StorageObjectException {
-               super.update();
-               try {
-                       theStorageObject.executeUpdate("update content set is_produced='0' where to_media="+getId());
-               } catch (SQLException e) {
-                       throwStorageObjectException(e, "EntityAudio :: update :: failed!! ");
-               }
-       }
+  public EntityAudio(StorageObject theStorage) {
+    this();
+    setStorage(theStorage);
+  }
 
-       public void setValues(HashMap theStringValues)
-       {
-               if (theStringValues != null) {
-                       if (!theStringValues.containsKey("is_published"))
-                        theStringValues.put("is_published","0");
-               }
-               super.setValues(theStringValues);
-       }
+  public void setValues(Map theStringValues) {
+    if (theStringValues != null) {
+      if (!theStringValues.containsKey("is_published"))
+        theStringValues.put("is_published", "0");
+    }
+    super.setValues(theStringValues);
+  }
 
 }