* returns the comments that belong to the article (via entityrelation)
* where db-flag is_published is true
*/
- public SimpleList getMediaType(EntityUploadedMedia ent) {
- SimpleList comments=null;
+ public Entity getMediaType(Entity ent) throws StorageObjectException {
+ Entity type=null;
try {
- comments = relationMediaType.getManyAsSimpleList(ent,"webdb_create","is_published='1'");
+ type = relationMediaType.getOne(ent);
}
catch (StorageObjectException e) {
theLog.printError("DatabaseUploadedMedia :: failed to get media_type");
+ throw new StorageObjectException("DatabaseUploadedMedia :: failed to get media_type"+ e.toString());
}
- return comments;
+ return type;
}
}