Changeset 6f91f99 in Git for src/main/java/com/wediscussmovies/project/querymodels/GenreLikesQM.java
- Timestamp:
- 02/09/22 15:46:58 (3 years ago)
- Branches:
- main
- Children:
- 8f1b7e9
- Parents:
- 967b414
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/querymodels/GenreLikesQM.java
r967b414 r6f91f99 3 3 import lombok.Data; 4 4 5 import javax.persistence.Entity;6 import javax.persistence.Table;7 import java.util.Comparator;8 5 import java.util.Objects; 9 6 10 7 @Data 11 public class GenreLikes {8 public class GenreLikesQM { 12 9 private Integer genreId; 13 10 private String name; 14 11 private Long likes; 15 12 16 public static Comparator<GenreLikes> sorter = Comparator.comparing(GenreLikes::getLikes).thenComparing(GenreLikes::getName).reversed();13 //public static Comparator<GenreLikes> sorter = Comparator.comparing(GenreLikes::getLikes).thenComparing(GenreLikes::getName).reversed(); 17 14 18 public GenreLikes (Integer genreId, String name, Long likes) {15 public GenreLikesQM(Integer genreId, String name, Long likes) { 19 16 this.genreId = genreId; 20 17 this.name = name; … … 27 24 if (this == o) return true; 28 25 if (o == null || getClass() != o.getClass()) return false; 29 GenreLikes that = (GenreLikes) o;26 GenreLikesQM that = (GenreLikesQM) o; 30 27 return Objects.equals(genreId, that.genreId); 31 28 }
Note:
See TracChangeset
for help on using the changeset viewer.