Advertisement
Guest User

Document

a guest
Apr 26th, 2011
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.16 KB | None | 0 0
  1. package br.ufpe.nti.usercase.domain;
  2.  
  3. import java.io.Serializable;
  4. import java.util.List;
  5.  
  6. import javax.persistence.CascadeType;
  7. import javax.persistence.Entity;
  8. import javax.persistence.FetchType;
  9. import javax.persistence.GeneratedValue;
  10. import javax.persistence.Id;
  11. import javax.persistence.OneToMany;
  12.  
  13. @Entity
  14. public class Document implements Serializable {
  15.  
  16.     private static final long serialVersionUID = 9001747747976134836L;
  17.  
  18.     @Id
  19.     @GeneratedValue
  20.     private Long id;
  21.     private String title;
  22.     @OneToMany(mappedBy="document", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
  23.     private List<Usercase> usercases;
  24.  
  25.     public Document() {
  26.         super();
  27.     }
  28.    
  29.     public Document(String title, List<Usercase> usercases) {
  30.         super();
  31.         this.title = title;
  32.         this.usercases = usercases;
  33.     }
  34.  
  35.     public Long getId() {
  36.         return id;
  37.     }
  38.  
  39.     public void setId(Long id) {
  40.         this.id = id;
  41.     }
  42.  
  43.     public String getTitle() {
  44.         return title;
  45.     }
  46.  
  47.     public void setTitle(String title) {
  48.         this.title = title;
  49.     }
  50.  
  51.     public List<Usercase> getUsercases() {
  52.         return usercases;
  53.     }
  54.  
  55.     public void setUsercases(List<Usercase> usercases) {
  56.         this.usercases = usercases;
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement