mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-23 14:25:02 +00:00
squid:S1213 - The members of an interface declaration or class should appear in a pre-defined order
This commit is contained in:
@@ -48,29 +48,11 @@ import com.iluwatar.servicelayer.wizard.Wizard;
|
||||
@Table(name = "SPELLBOOK")
|
||||
public class Spellbook extends BaseEntity {
|
||||
|
||||
public Spellbook() {
|
||||
spells = new HashSet<>();
|
||||
wizards = new HashSet<>();
|
||||
}
|
||||
|
||||
public Spellbook(String name) {
|
||||
this();
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Id
|
||||
@GeneratedValue
|
||||
@Column(name = "SPELLBOOK_ID")
|
||||
private Long id;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
private String name;
|
||||
|
||||
@ManyToMany(mappedBy = "spellbooks", fetch = FetchType.EAGER)
|
||||
@@ -79,6 +61,24 @@ public class Spellbook extends BaseEntity {
|
||||
@OneToMany(mappedBy = "spellbook", orphanRemoval = true, cascade = CascadeType.ALL)
|
||||
private Set<Spell> spells;
|
||||
|
||||
public Spellbook() {
|
||||
spells = new HashSet<>();
|
||||
wizards = new HashSet<>();
|
||||
}
|
||||
|
||||
public Spellbook(String name) {
|
||||
this();
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user