
Usercase
By: a guest on
Apr 26th, 2011 | syntax:
Java | size: 1.46 KB | hits: 29 | expires: Never
package br.ufpe.nti.usercase.domain;
import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@Entity
public class Usercase implements Serializable {
private static final long serialVersionUID = 6109630367671965921L;
@Id
@GeneratedValue
private Long id;
private String name;
private String description;
@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
@JoinColumn(name = "document_id")
private Document document;
public Usercase() {
super();
}
public Usercase(Document document) {
super();
this.document = document;
}
public Usercase(String name, String description, Document document) {
super();
this.name = name;
this.description = description;
this.document = document;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public void setDocument(Document document) {
this.document = document;
}
public Document getDocument() {
return document;
}
}