rebuilding head
[mir.git] / source / mircoders / storage / DatabaseVideo.java
index 5f2b138..4595bef 100755 (executable)
@@ -30,7 +30,7 @@
 
 package mircoders.storage;
 
-import java.util.*;
+import java.util.GregorianCalendar;
 
 import mir.entity.Entity;
 import mir.log.LoggerWrapper;
@@ -69,26 +69,26 @@ public class DatabaseVideo extends Database implements StorageObject{
     logger = new LoggerWrapper("Database.Video");
 
     hasTimestamp = true;
-    theTable = "video";
-    theCoreTable = "media";
+    mainTable = "video";
+    primaryKeySequence = "media_id_seq";
     theEntityClass = mircoders.entity.EntityVideo.class;
   }
 
   public void update(Entity theEntity) throws StorageObjectFailure {
-    String date = theEntity.getValue("date");
+    String date = theEntity.getFieldValue("date");
     if (date == null) {
       date = StringUtil.date2webdbDate(new GregorianCalendar());
-      theEntity.setValueForProperty("date", date);
+      theEntity.setFieldValue("date", date);
     }
 
     super.update(theEntity);
   }
 
   public String insert(Entity theEntity) throws StorageObjectFailure {
-    String date = theEntity.getValue("date");
+    String date = theEntity.getFieldValue("date");
     if (date == null) {
       date = StringUtil.date2webdbDate(new GregorianCalendar());
-      theEntity.setValueForProperty("date", date);
+      theEntity.setFieldValue("date", date);
     }
     return super.insert(theEntity);
   }