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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Nov 1 14:56:00 GMT 2011


Author: whalley
Date: Tue Nov  1 14:56:00 2011
New Revision: 1476

Log:
to list inspire ids

Added:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java

Added: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/pages/AllIds.java	Tue Nov  1 14:56:00 2011	(r1476)
@@ -0,0 +1,36 @@
+package cedar.hepdata.webapp.pages;
+
+import cedar.hepdata.model.*;
+import cedar.hepdata.util.*;
+
+import org.apache.tapestry5.EventContext;
+import org.apache.tapestry5.StreamResponse;
+import org.apache.tapestry5.util.TextStreamResponse;
+import org.apache.tapestry5.annotations.*;
+import org.apache.tapestry5.ioc.annotations.*;
+import org.apache.tapestry5.services.*;
+
+import org.hibernate.*;
+
+import java.util.*;
+import java.util.regex.*;
+
+
+
+public class AllIds {
+
+
+    @Inject
+    private org.hibernate.Session _session;
+    public org.hibernate.Session getSession() { return _session; }
+
+    private Paper _paper;
+    public Paper getPaper() { return _paper; }
+    public void setPaper(Paper p) { _paper = p; }
+
+    public List <Paper> getPapers(){
+        Query q = _session.createQuery("from Paper p where p._inspireId is not null");
+        return q.list();
+    }
+
+}


More information about the HepData-svn mailing list