FindPaperPhysics Class Reference

Collaboration diagram for FindPaperPhysics:

Collaboration graph
[legend]

List of all members.


Public Member Functions

String getQueryParam (String param)
String getQueryParameters ()
String getFirstNumber ()
String getLastNumber ()
String getPageSize ()
Long getCount ()
Paper getPaper ()
void setPaper (Paper p)
List< Paper > getPapers ()

Detailed Description

Definition at line 14 of file FindPaperPhysics.java.


Member Function Documentation

String getQueryParam ( String  param  ) 

Definition at line 23 of file FindPaperPhysics.java.

Referenced by FindPaperPhysics.getFirstNumber(), FindPaperPhysics.getLastNumber(), FindPaperPhysics.getPageSize(), FindPaperPhysics.getPapers(), and FindPaperPhysics.getQueryParameters().

00023                                              {
00024        return _reqGlobals.getRequest().getParameter(param);
00025     }

String getQueryParameters (  ) 

Definition at line 27 of file FindPaperPhysics.java.

References FindPaperPhysics.getQueryParam().

00027                                       {
00028         StringBuffer qs = new StringBuffer();
00029         String mid = "";
00030         int number =  Integer.parseInt(getQueryParam("number"));
00031         int newstart = Integer.parseInt(getQueryParam("start"));
00032         newstart += number;
00033         qs.append(mid + "beam=" + getQueryParam("beam"));  mid = "&";
00034         qs.append(mid + "targ=" + getQueryParam("targ"));  mid = "&";
00035         qs.append(mid + "fsp1=" + getQueryParam("fsp1"));  mid = "&"; 
00036         qs.append(mid + "mfsp1=" + getQueryParam("mfsp1"));  mid = "&";
00037         qs.append(mid + "fsp2=" + getQueryParam("fsp2"));  mid = "&"; 
00038         qs.append(mid + "mfsp2=" + getQueryParam("mfsp2"));  mid = "&";
00039         qs.append(mid + "fsp3=" + getQueryParam("fsp3"));  mid = "&"; 
00040         qs.append(mid + "mfsp3=" + getQueryParam("mfsp3"));  mid = "&";
00041         qs.append(mid + "obs=" + getQueryParam("obs"));  mid = "&";
00042         qs.append(mid + "number=" + getQueryParam("number") + mid + "start=" + Integer.toString(newstart));
00043         return qs.toString().replaceAll("\\+","%2B");
00044     }

String getFirstNumber (  ) 

Definition at line 46 of file FindPaperPhysics.java.

References FindPaperPhysics.getQueryParam().

00046                                   {
00047        return getQueryParam("start");
00048     }

String getLastNumber (  ) 

Definition at line 50 of file FindPaperPhysics.java.

References FindPaperPhysics.getQueryParam().

00050                                  {
00051         int first =  Integer.parseInt(getQueryParam("start"));
00052         int number = Integer.parseInt(getQueryParam("number"));
00053         int last = first + number - 1;
00054         return Integer.toString(last);
00055    }

String getPageSize (  ) 

Definition at line 57 of file FindPaperPhysics.java.

References FindPaperPhysics.getQueryParam().

00057                                {
00058        return getQueryParam("number");
00059     }

Long getCount (  ) 

Definition at line 61 of file FindPaperPhysics.java.

00061                           {
00062         return (Long) constructQuery("count").uniqueResult();
00063     }

Paper getPaper (  ) 

Definition at line 67 of file FindPaperPhysics.java.

00067 { return _paper; }

void setPaper ( Paper  p  ) 

Definition at line 68 of file FindPaperPhysics.java.

00068 { _paper = p; }

List<Paper> getPapers (  ) 

Definition at line 70 of file FindPaperPhysics.java.

References FindPaperPhysics.getQueryParam().

00070                                    {
00071         Query q = constructQuery();
00072            // how many results do we want out and where to start
00073         q.setFirstResult(Integer.parseInt(getQueryParam("start"))).setMaxResults(Integer.parseInt(getQueryParam("number")));
00074            // execute the query and return the list of results
00075         return q.list();   
00076     }


The documentation for this class was generated from the following file:


Generated on Tue Apr 21 15:55:03 2009 for HepData Web servlets by  doxygen 1.5.5