[HepData-svn] r1584 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Oct 12 16:09:28 BST 2012


Author: whalley
Date: Fri Oct 12 16:09:27 2012
New Revision: 1584

Log:
ordering multiple records by hepdataId

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	Fri Oct 12 14:03:40 2012	(r1583)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/ViewBase.java	Fri Oct 12 16:09:27 2012	(r1584)
@@ -436,7 +436,7 @@
         Long ins = getPaper().getInspireId();
         Paper p = null;
         if(ins != null) { 
-            Query q = getSession().createQuery("select distinct p from Paper p where p._inspireId="+ins);
+            Query q = getSession().createQuery("select distinct p from Paper p where p._inspireId="+ins + " order by p._hepdataId");
             p = (Paper) q.list().get(0);
         } 
         else {
@@ -448,7 +448,7 @@
         Long ins = getPaper().getInspireId();
         Paper p = null;
         if(ins != null) { 
-            Query q = getSession().createQuery("select distinct p from Paper p where p._inspireId="+ins);
+            Query q = getSession().createQuery("select distinct p from Paper p where p._inspireId="+ins+ " order by p._hepdataId");
             p = (Paper) q.list().get(1);
         } 
         else {
@@ -460,7 +460,7 @@
         Long ins = getPaper().getInspireId();
         Paper p = null;
         if(ins != null) { 
-            Query q = getSession().createQuery("select distinct p from Paper p where p._inspireId="+ins);
+            Query q = getSession().createQuery("select distinct p from Paper p where p._inspireId="+ins+ " order by p._hepdataId");
             p = (Paper) q.list().get(2);
         } 
         else {


More information about the HepData-svn mailing list