Author: DavidK Date: 2010-02-18 11:26:08 +0100 (Thu, 18 Feb 2010) New Revision: 1774 Modified: trunk/server/elvysCommons/src/elvys/server/bl/file/FileManagerBLImpl.java Log: (3rd part) component for list of files changed - now is applicable for modal windows as 'selectable' list Modified: trunk/server/elvysCommons/src/elvys/server/bl/file/FileManagerBLImpl.java =================================================================== --- trunk/server/elvysCommons/src/elvys/server/bl/file/FileManagerBLImpl.java 2010-02-18 10:25:33 UTC (rev 1773) +++ trunk/server/elvysCommons/src/elvys/server/bl/file/FileManagerBLImpl.java 2010-02-18 10:26:08 UTC (rev 1774) @@ -455,24 +455,25 @@ // TODO kecy, nemuze.. pac to je planning-type specific a ne file-specific :/ // TODO kam teda s tim? navrh - zatim to tady tupe rozepsat, potom zmenit DB model a udelat predka "FrameContent" - "FrameContentWithFile" a od nej podedi File i Document // some document is chosen, try to find some plannings - Session sess = InitSessionFactory.getInstance().getCurrentSession(); - Transaction tx = HibUtils.startTx(sess); - try { - Query q = sess.createQuery("from Timeline as timeline, DocumentContent as doccon " + - "where timeline.showEnd > :now and timeline.frameContent.id = doccon.id and doccon.document.id = :docid"); - q.setTimestamp("now", new Date()); - q.setInteger("docid", file.getId()); - if (q.list().size() > 0) { - tx.commit(); - return true; - } else { - tx.commit(); - return false; - } - } catch (Exception e) { - String message = CommonUtils.prepareErrorMessage(ERROR_LOOKUP_FILE_PLANNING, file.getOrigName()); - throw new ExecuteException(message,e); - } +// Session sess = InitSessionFactory.getInstance().getCurrentSession(); +// Transaction tx = HibUtils.startTx(sess); +// try { +// Query q = sess.createQuery("from Timeline as timeline, DocumentContent as doccon " + +// "where timeline.showEnd > :now and timeline.frameContent.id = doccon.id and doccon.document.id = :docid"); +// q.setTimestamp("now", new Date()); +// q.setInteger("docid", file.getId()); +// if (q.list().size() > 0) { +// tx.commit(); +// return true; +// } else { +// tx.commit(); +// return false; +// } +// } catch (Exception e) { +// String message = CommonUtils.prepareErrorMessage(ERROR_LOOKUP_FILE_PLANNING, file.getOrigName()); +// throw new ExecuteException(message,e); +// } + return true; }