Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. A ---> Query query = em.createNativeQuery(<query for scanner report goes here >,"ScannerReport");
  2. query.getResultList();
  3.  
  4. B ---> Query query = em.createNativeQuery(<query for scanner summary report goes here>,"ScannerSummaryReport");
  5. query.getResultList();
  6.  
  7. @SqlResultSetMapping(
  8. name="ScannerReport",
  9. classes={
  10. @ConstructorResult(
  11. targetClass=com.beans.ScannerReport.class,
  12. columns={
  13. @ColumnResult(name="scanYear", type=Integer.class),
  14. @ColumnResult(name="julianDay", type=Integer.class),
  15. @ColumnResult(name="scannerId", type=String.class),
  16. @ColumnResult(name="startTime", type=Long.class),
  17. @ColumnResult(name="endTime", type=Long.class),
  18. @ColumnResult(name="scanTime", type=Long.class),
  19. }
  20. )
  21. }
  22. )
  23. @Entity
  24. public class Scanner {
  25.  
  26. // Class implementation goes here
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement