X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=source%2Fmircoders%2Fstorage%2FDatabaseContentToMedia.java;fp=source%2Fmircoders%2Fstorage%2FDatabaseContentToMedia.java;h=1569bb47538fe3ef72cff84131b1501b503705e0;hb=8618a7efd50ae2edf6ebcf2641d1816c702da104;hp=1015e6c0156911259fb005fb91e825f1f475b5ab;hpb=6fb36d4e86dce331db03a398c8a995ee93e348d0;p=mir.git diff --git a/source/mircoders/storage/DatabaseContentToMedia.java b/source/mircoders/storage/DatabaseContentToMedia.java index 1015e6c0..1569bb47 100755 --- a/source/mircoders/storage/DatabaseContentToMedia.java +++ b/source/mircoders/storage/DatabaseContentToMedia.java @@ -63,6 +63,28 @@ public class DatabaseContentToMedia extends Database implements StorageObject{ return returnList; } + public boolean hasMedia(EntityContent content) + throws StorageObjectException { + String wc = "content_id="+content.getId(); + if( content != null) { + try { + if(selectByWhereClause(wc,-1).size() == 0) + return false; + else + return true; + } catch (Exception e) { + theLog.printError("-- hasMedia failed " + e.toString()); + throw new StorageObjectException("-- hasMedia failed " + e.toString()); + } + } else { + theLog.printError("-- hasMedia failed: content is NULL"); + throw new StorageObjectException("-- hasMedia failed: content is NULL"); + } + } + + + + /** * get all the audio belonging to a content entity *