*/
-public class EntityUploadedMedia extends AbstractEntity implements Entity
+public class EntityUploadedMedia extends Entity
{
- private static int instances;
+
public EntityUploadedMedia(){
super();
- instances++;
}
public EntityUploadedMedia(StorageObject theStorage)
setStorage(theStorage);
}
- public void finalize() {
- instances--;
- super.finalize();
- }
+ public void setValues(HashMap theStringValues)
+ {
+ if (theStringValues != null) {
+ if (!theStringValues.containsKey("is_published"))
+ theStringValues.put("is_published","0");
+ }
+ super.setValues(theStringValues);
+ }
+
+ /**
+ * fetches the MediaType entry assiciated w/ this media
+ *
+ * @return mir.entity.Entity
+ */
+ public Entity getMediaType() throws StorageObjectException {
+ Entity ent = null;
+ try {
+ ent = ((DatabaseUploadedMedia)theStorageObject).getMediaType(this);
+ } catch (StorageObjectException e) {
+ throwStorageObjectException(e, "get MediaType failed -- ");
+ }
+ return ent;
+ }
+
}