This commit is contained in:
Roland Praml
2016-08-31 09:48:11 +02:00
parent 1796c8b9bc
commit b9f0ee7ac0
2 changed files with 139 additions and 0 deletions
@@ -0,0 +1,52 @@
package com.avaje.tests.model.softdelete;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import java.util.List;
@Entity
public class ESoftDelBook extends BaseSoftDelete {
String bookTitle;
@ManyToMany(cascade = CascadeType.PERSIST, fetch = FetchType.EAGER)
List<ESoftDelUser> lendBys;
@ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.EAGER)
ESoftDelUser lendBy;
public ESoftDelBook(String bookTitle) {
this.bookTitle = bookTitle;
}
public ESoftDelBook() {
}
public String getBookTitle() {
return bookTitle;
}
public void setBookTitle(String bookTitle) {
this.bookTitle = bookTitle;
}
public List<ESoftDelUser> getLendBys() {
return lendBys;
}
public void setLendBys(List<ESoftDelUser> lendBys) {
this.lendBys = lendBys;
}
public void setLendBy(ESoftDelUser lendBy) {
this.lendBy = lendBy;
}
public ESoftDelUser getLendBy() {
return lendBy;
}
}