|
[HepData-svn] r1568 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pagesblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Aug 23 14:44:54 BST 2012
Author: whalley Date: Thu Aug 23 14:44:53 2012 New Revision: 1568 Log: Adding method to check if paper exists Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java Thu Aug 23 14:41:32 2012 (r1567) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java Thu Aug 23 14:44:53 2012 (r1568) @@ -378,6 +378,14 @@ Paper p = (Paper) constructQuery().setMaxResults(1).uniqueResult(); return p; } + + public boolean getHavePaper() { + boolean rtn = true; + Paper p = (Paper) constructQuery().setMaxResults(1).uniqueResult(); + if( p == null) { rtn=false; } + return rtn; + } + public Paper getPaper1() { Long ins = getPaper().getInspireId(); Paper p = null;
More information about the HepData-svn mailing list |