main
Last change
on this file was 980eeda, checked in by Test <matonikolov77@…>, 2 years ago |
Restructuring project
|
-
Property mode
set to
100644
|
File size:
866 bytes
|
Line | |
---|
1 | package com.wediscussmovies.project.querymodels;
|
---|
2 |
|
---|
3 | import lombok.Data;
|
---|
4 |
|
---|
5 | import java.util.Objects;
|
---|
6 |
|
---|
7 | @Data
|
---|
8 | public class GenreLikesQM {
|
---|
9 | private Integer genreId;
|
---|
10 | private String name;
|
---|
11 | private Long likes;
|
---|
12 |
|
---|
13 | //public static Comparator<GenreLikes> sorter = Comparator.comparing(GenreLikes::getLikes).thenComparing(GenreLikes::getName).reversed();
|
---|
14 |
|
---|
15 | public GenreLikesQM(Integer genreId, String name, Long likes) {
|
---|
16 | this.genreId = genreId;
|
---|
17 | this.name = name;
|
---|
18 | this.likes = likes;
|
---|
19 |
|
---|
20 | }
|
---|
21 |
|
---|
22 | @Override
|
---|
23 | public boolean equals(Object o) {
|
---|
24 | if (this == o) return true;
|
---|
25 | if (o == null || getClass() != o.getClass()) return false;
|
---|
26 | GenreLikesQM that = (GenreLikesQM) o;
|
---|
27 | return Objects.equals(genreId, that.genreId);
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Override
|
---|
31 | public int hashCode() {
|
---|
32 | return Objects.hash(genreId);
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.