Advertisement
xcooper

Untitled

Apr 24th, 2014
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 1.18 KB | None | 0 0
  1. package com.gss.tds.dc.free.report.hibernate.expert.webservice;
  2.  
  3. import javax.ws.rs.Consumes;
  4. import javax.ws.rs.POST;
  5. import javax.ws.rs.Path;
  6. import javax.ws.rs.Produces;
  7. import javax.ws.rs.core.MediaType;
  8.  
  9. import org.apache.cxf.jaxrs.ext.multipart.Multipart;
  10.  
  11. import com.gss.tds.dc.free.report.hibernate.expert.webservice.model.QueryResult;
  12. import com.gss.tds.dc.free.report.model.vo.Report;
  13. import com.gss.tds.dc.free.report.model.vo.helper.PagingParameter;
  14. import com.gss.tds.dc.restful.annotation.RestfulWebservice;
  15.  
  16. @RestfulWebservice
  17. @Path("query")
  18. public interface QueryWebService {
  19.  
  20.     /**
  21.      *
  22.      * @param report
  23.      */
  24.     @POST
  25.     @Path("report")
  26.     @Produces(MediaType.APPLICATION_JSON)
  27.     @Consumes(MediaType.APPLICATION_JSON)
  28.     QueryResult query(Report report);
  29.  
  30.     @POST
  31.     @Path("page")
  32.     @Produces(MediaType.APPLICATION_JSON)
  33.     @Consumes("multipart/mixed")
  34.     QueryResult queryPage(
  35.             @Multipart(value = "report", type = MediaType.APPLICATION_JSON) Report report,
  36.             @Multipart(value = "gridParameter", type = MediaType.APPLICATION_JSON) PagingParameter gridParameter);
  37.  
  38.     @POST
  39.     @Path("countTotal")
  40.     @Consumes(MediaType.APPLICATION_JSON)
  41.     @Produces(MediaType.TEXT_PLAIN)
  42.     long countTotalRecords(Report report);
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement