package mircoders.storage;
-import java.util.*;
+import java.util.GregorianCalendar;
import mir.entity.Entity;
import mir.log.LoggerWrapper;
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);
}