(Object obj)
| 31 | } |
| 32 | |
| 33 | @Override |
| 34 | public boolean equals(Object obj) { |
| 35 | if (obj instanceof BookType) { |
| 36 | BookType otherOne = (BookType)obj; |
| 37 | if (otherOne.getId() != null && this.getId() != null) { |
| 38 | return otherOne.getId().equals(this.getId()); |
| 39 | } else if (this.getId() == null && otherOne.getId() == null && this.getName().equals(otherOne.getName())) { |
| 40 | return true; |
| 41 | } |
| 42 | } |
| 43 | return false; |
| 44 | } |
| 45 | |
| 46 | @Override |
| 47 | public int hashCode() { |