EditModifyPaper.java

Go to the documentation of this file.
00001 package cedar.hepdata.webapp.pages;
00002 
00003 import cedar.hepdata.model.*;
00004 import cedar.hepdata.xml.*;
00005 import cedar.hepdata.db.*;
00006 
00007 import org.apache.tapestry5.annotations.*;
00008 import org.apache.tapestry5.ioc.annotations.*;
00009 import org.apache.tapestry5.services.*;
00010 
00011 import org.hibernate.*;
00012 import org.hibernate.criterion.*;
00013 import java.util.*;
00014 
00015 
00016 public class EditModifyPaper{
00017     @Inject
00018     private org.hibernate.Session _session;
00019 
00020 
00021     @Persist
00022     private Long rednew;
00023     public Long getRednew(){ return rednew; } 
00024     public void setRednew(Long rednew){this.rednew = rednew;}
00025 
00026     @Persist
00027     private String spiresId;
00028     public String getSpiresId(){ return spiresId; } 
00029     public void setSpiresId(String spiresId){this.spiresId = spiresId;}
00030 
00031     @Persist
00032     private String authornew;
00033     public String getAuthornew(){ return authornew; } 
00034     public void setAuthornew(String authornew, Paper paper){
00035        paper.getAuthors().clear();
00036        paper.getAuthors().add(authornew);
00037     }
00038 
00039     private Paper paper;
00040     public Paper getPaper(){ return paper; } 
00041     public void setPaper(Paper paper){this.paper = paper;}
00042 
00043 //    @Persist
00044 //    private List <Paper> papers = new ArrayList(); 
00045 //    public void setPaperList(List papers){
00046 //       this.papers=papers;
00047 //    }
00048     public List <Paper> getPapers(){
00049         System.out.println(" getting papers in editmodifypaper ");
00050         Query q =  _session.createQuery("select distinct p from Paper p where p._spiresId=:spiresId");
00051         q.setString("spiresId",spiresId);
00052         q.uniqueResult();
00053         return q.list();
00054     }   
00055 
00056 
00057 }

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