squid:S1213 - The members of an interface declaration or class should appear in a pre-defined order

This commit is contained in:
Mohammed Ezzat
2016-02-06 01:10:56 +02:00
parent 33224dd7d7
commit 9c5745763d
11 changed files with 106 additions and 106 deletions
@@ -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;
}