package com.avaje.tests.model.softdelete; import javax.persistence.CascadeType; import javax.persistence.Entity; import javax.persistence.OneToMany; import java.util.List; @Entity public class EBasicSoftDelete extends BaseSoftDelete { String name; String description; @OneToMany(mappedBy = "owner", cascade = CascadeType.ALL) List children; @OneToMany(mappedBy = "owner", cascade = CascadeType.ALL) List nosdChildren; 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 List getChildren() { return children; } public void setChildren(List children) { this.children = children; } public void addChild(String childName, long amount) { getChildren().add(new EBasicSDChild(this, childName, amount)); } public List getNosdChildren() { return nosdChildren; } public void setNosdChildren(List nosdChildren) { this.nosdChildren = nosdChildren; } public void addNoSoftDeleteChild(String childName, long amount) { getNosdChildren().add(new EBasicNoSDChild(this, childName, amount)); } }