Entity now freemarker compliant, freemarker lib update, deprecation of HTMLTemplatePr...
[mir.git] / source / mircoders / entity / EntityMedia.java
1 package mircoders.entity;
2
3 import java.lang.*;
4 import java.io.*;
5 import java.util.*;
6 import java.sql.*;
7
8 import mir.entity.*;
9 import mir.misc.*;
10 import mir.storage.*;
11
12 import mircoders.storage.*;
13 /**
14  * Diese Klasse enthält die Daten eines MetaObjekts
15  *
16  * @author RK
17  * @version 29.6.1999
18  */
19
20
21 public class EntityMedia extends Entity
22 {
23   private static int instances;
24
25   public EntityMedia(){
26     super();
27     instances++;
28   }
29
30   public EntityMedia(StorageObject theStorage)
31   {
32     this();
33     setStorage(theStorage);
34   }
35
36         /**
37          * fetches the MediaType entry assiciated w/ this media
38          *
39          * @return mir.entity.Entity
40          */
41         public Entity getMediaType() throws StorageObjectException {
42         try {
43             return ((DatabaseMedia)theStorageObject).getMediaType(this);
44         } catch (StorageObjectException e) {
45             throw new StorageObjectException("getMediaType(): "+e.toString());
46         }
47
48         }
49
50   public void finalize() {
51     instances--;
52     super.finalize();
53   }
54 }