+ throw new StorageObjectException("-- get images failed " + e.toString());
+ }
+ }
+ return returnList;
+ }
+
+
+ /**
+ * get all the uploaded Media belonging to a content entity
+ *
+ */
+ public EntityList getUploadedMedia(EntityContent content)
+ throws StorageObjectException
+ {
+ /** @todo this should only fetch published media / rk */
+
+ EntityList returnList=null;
+ if (content != null) {
+ // get all to_topic from media_x_topic
+ String id = content.getId();
+ //this is not supported by mysql
+ String subselect = "id in (select media_id from " + theTable + " where content_id=" + id+")";
+
+ try {
+ returnList = DatabaseMedia.getInstance().selectByWhereClause(subselect,"id");
+ } catch (Exception e) {
+ e.printStackTrace();
+ theLog.printDebugInfo("-- get uploadedMedia failed " + e.toString());
+ throw new StorageObjectException("-- get uploadedMedia failed " + e.toString());