Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package br.ufpe.nti.usercase.domain;
- import java.io.Serializable;
- import java.util.List;
- import javax.persistence.CascadeType;
- import javax.persistence.Entity;
- import javax.persistence.FetchType;
- import javax.persistence.GeneratedValue;
- import javax.persistence.Id;
- import javax.persistence.OneToMany;
- @Entity
- public class Document implements Serializable {
- private static final long serialVersionUID = 9001747747976134836L;
- @Id
- @GeneratedValue
- private Long id;
- private String title;
- @OneToMany(mappedBy="document", fetch = FetchType.LAZY, cascade = CascadeType.ALL)
- private List<Usercase> usercases;
- public Document() {
- super();
- }
- public Document(String title, List<Usercase> usercases) {
- super();
- this.title = title;
- this.usercases = usercases;
- }
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getTitle() {
- return title;
- }
- public void setTitle(String title) {
- this.title = title;
- }
- public List<Usercase> getUsercases() {
- return usercases;
- }
- public void setUsercases(List<Usercase> usercases) {
- this.usercases = usercases;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement