Changeset 6f91f99 in Git for src/main/java/com/wediscussmovies/project/querymodels
- Timestamp:
- 02/09/22 15:46:58 (3 years ago)
- Branches:
- main
- Children:
- 8f1b7e9
- Parents:
- 967b414
- Location:
- src/main/java/com/wediscussmovies/project/querymodels
- Files:
-
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/wediscussmovies/project/querymodels/DiscussionLikesQM.java
r967b414 r6f91f99 6 6 7 7 @Data 8 public class DiscussionLikes {8 public class DiscussionLikesQM { 9 9 private Integer discussionId; 10 10 private Long likes; 11 11 12 public DiscussionLikes (Integer discussionId, Long likes) {12 public DiscussionLikesQM(Integer discussionId, Long likes) { 13 13 this.discussionId = discussionId; 14 14 this.likes = likes; 15 15 } 16 16 17 public DiscussionLikes () {17 public DiscussionLikesQM() { 18 18 } 19 19 … … 22 22 if (this == o) return true; 23 23 if (o == null || getClass() != o.getClass()) return false; 24 DiscussionLikes that = (DiscussionLikes) o;24 DiscussionLikesQM that = (DiscussionLikesQM) o; 25 25 return Objects.equals(discussionId, that.discussionId) && Objects.equals(likes, that.likes); 26 26 } -
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.