01: package auction.model;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: public class Language {
07: private Long id;
08: private String name;
09: private List<Book> books = new ArrayList<Book>();
10:
11: public Language() {
12: }
13:
14: public Language(String name) {
15: this .name = name;
16: }
17:
18: public Language(String name, ArrayList<Book> books) {
19: this .name = name;
20: this .books = books;
21: }
22:
23: public Long getId() {
24: return id;
25: }
26:
27: public String getName() {
28: return name;
29: }
30:
31: public void setName(String name) {
32: this .name = name;
33: }
34:
35: public List<Book> getBooks() {
36: return books;
37: }
38:
39: public void setBooks(List<Book> books) {
40: this .books = books;
41: }
42:
43: public boolean equals(Object o) {
44: if (!(o instanceof Language))
45: return false;
46: return (name.equals(((Language) o).name));
47: }
48:
49: }
|