@Override public void deleteThumbnail(ThumbnailDetail thumbDetail) throws ThumbnailException { Connection con = null; try { con = DBUtil.makeConnection(JNDINames.THUMBNAIL_DATASOURCE); dao.deleteThumbnail( con, thumbDetail.getObjectId(), thumbDetail.getObjectType(), thumbDetail.getInstanceId()); } catch (SQLException se) { throw new ThumbnailException( "ThumbnailBmImpl.deleteThumbnail()", SilverpeasException.ERROR, "thumbnail.EX_MSG_RECORD_NOT_DELETE", se); } finally { DBUtil.close(con); } }
@Override public ThumbnailDetail getCompleteThumbnail(ThumbnailDetail thumbDetail) throws ThumbnailException { Connection con = null; try { con = DBUtil.makeConnection(JNDINames.THUMBNAIL_DATASOURCE); return dao.selectByKey( con, thumbDetail.getInstanceId(), thumbDetail.getObjectId(), thumbDetail.getObjectType()); } catch (SQLException se) { throw new ThumbnailException( "ThumbnailBmImpl.getCompleteThumbnail()", SilverpeasException.ERROR, "thumbnail.EX_MSG_NOT_FOUND", se); } finally { DBUtil.close(con); } }