mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Organise imports
This commit is contained in:
@@ -1,48 +1,60 @@
|
||||
|
||||
package com.avaje.tests.model.basic.xtra;
|
||||
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.List;
|
||||
|
||||
@Entity
|
||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||
@DiscriminatorColumn(discriminatorType=DiscriminatorType.STRING , name="parent_type")
|
||||
@DiscriminatorValue("BASIC")
|
||||
@Table(name="td_parent")
|
||||
public class EdParent {
|
||||
@Id
|
||||
@Column(name="parent_id")
|
||||
private int id;
|
||||
|
||||
@Column(name="parent_name")
|
||||
private String name;
|
||||
|
||||
@OneToMany(fetch = FetchType.EAGER, mappedBy="parent", cascade=CascadeType.ALL)
|
||||
List<EdChild> children;
|
||||
|
||||
public List<EdChild> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<EdChild> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
package com.avaje.tests.model.basic.xtra;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.DiscriminatorColumn;
|
||||
import javax.persistence.DiscriminatorType;
|
||||
import javax.persistence.DiscriminatorValue;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Inheritance;
|
||||
import javax.persistence.InheritanceType;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
|
||||
@DiscriminatorColumn(discriminatorType=DiscriminatorType.STRING , name="parent_type")
|
||||
@DiscriminatorValue("BASIC")
|
||||
@Table(name="td_parent")
|
||||
public class EdParent {
|
||||
@Id
|
||||
@Column(name="parent_id")
|
||||
private int id;
|
||||
|
||||
@Column(name="parent_name")
|
||||
private String name;
|
||||
|
||||
@OneToMany(fetch = FetchType.EAGER, mappedBy="parent", cascade=CascadeType.ALL)
|
||||
List<EdChild> children;
|
||||
|
||||
public List<EdChild> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<EdChild> children) {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user