Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Usercase

By: a guest on Apr 26th, 2011  |  syntax: Java  |  size: 1.46 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package br.ufpe.nti.usercase.domain;
  2.  
  3. import java.io.Serializable;
  4.  
  5. import javax.persistence.CascadeType;
  6. import javax.persistence.Entity;
  7. import javax.persistence.FetchType;
  8. import javax.persistence.GeneratedValue;
  9. import javax.persistence.Id;
  10. import javax.persistence.JoinColumn;
  11. import javax.persistence.ManyToOne;
  12.  
  13. @Entity
  14. public class Usercase implements Serializable {
  15.  
  16.         private static final long serialVersionUID = 6109630367671965921L;
  17.  
  18.         @Id
  19.         @GeneratedValue
  20.         private Long id;
  21.         private String name;
  22.         private String description;
  23.         @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
  24.         @JoinColumn(name = "document_id")
  25.         private Document document;
  26.        
  27.         public Usercase() {
  28.                 super();
  29.         }
  30.        
  31.         public Usercase(Document document) {
  32.                 super();
  33.                 this.document = document;
  34.         }
  35.        
  36.         public Usercase(String name, String description, Document document) {
  37.                 super();
  38.                 this.name = name;
  39.                 this.description = description;
  40.                 this.document = document;
  41.         }
  42.  
  43.         public Long getId() {
  44.                 return id;
  45.         }
  46.         public void setId(Long id) {
  47.                 this.id = id;
  48.         }
  49.         public String getName() {
  50.                 return name;
  51.         }
  52.         public void setName(String name) {
  53.                 this.name = name;
  54.         }
  55.         public String getDescription() {
  56.                 return description;
  57.         }
  58.         public void setDescription(String description) {
  59.                 this.description = description;
  60.         }
  61.  
  62.         public void setDocument(Document document) {
  63.                 this.document = document;
  64.         }
  65.  
  66.         public Document getDocument() {
  67.                 return document;
  68.         }
  69. }