main
Last change
on this file since ae042f4 was ae042f4, checked in by andrejtodorovski <82031894+andrejtodorovski@…>, 18 months ago |
Configured spring security, changed spring version
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[feffc2f] | 1 | package com.example.autopartz.model.views;
|
---|
[2e46f06] | 2 |
|
---|
[ae042f4] | 3 | import lombok.Getter;
|
---|
| 4 | import lombok.RequiredArgsConstructor;
|
---|
| 5 | import lombok.Setter;
|
---|
| 6 | import lombok.ToString;
|
---|
[2e46f06] | 7 | import org.hibernate.Hibernate;
|
---|
| 8 | import org.hibernate.annotations.Immutable;
|
---|
| 9 |
|
---|
[ae042f4] | 10 | import javax.persistence.Entity;
|
---|
| 11 | import javax.persistence.Id;
|
---|
| 12 | import javax.persistence.Table;
|
---|
[2e46f06] | 13 | import java.io.Serial;
|
---|
| 14 | import java.io.Serializable;
|
---|
| 15 | import java.util.Objects;
|
---|
| 16 |
|
---|
| 17 | // извештај за сите сервиси и за сите број на reviews и avg рејтинг
|
---|
| 18 | @Entity
|
---|
| 19 | @Getter
|
---|
| 20 | @Setter
|
---|
| 21 | @ToString
|
---|
| 22 | @RequiredArgsConstructor
|
---|
| 23 | @Immutable
|
---|
[23a2bc5] | 24 | @Table(name = "`repair_shop_reviews_summary`")
|
---|
[2e46f06] | 25 | public class RepairShopReviewsSummary implements Serializable {
|
---|
| 26 | @Serial
|
---|
| 27 | private static final long serialVersionUID = 1L;
|
---|
| 28 | @Id
|
---|
[ae042f4] | 29 | Integer rsid;
|
---|
[2e46f06] | 30 | String rsname;
|
---|
[ae042f4] | 31 | Long reviewcount;
|
---|
[2e46f06] | 32 | Float reviewaverage;
|
---|
| 33 |
|
---|
| 34 | @Override
|
---|
| 35 | public boolean equals(Object o) {
|
---|
| 36 | if (this == o) return true;
|
---|
| 37 | if (o == null || Hibernate.getClass(this) != Hibernate.getClass(o)) return false;
|
---|
| 38 | RepairShopReviewsSummary that = (RepairShopReviewsSummary) o;
|
---|
| 39 | return rsid != null && Objects.equals(rsid, that.rsid);
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | @Override
|
---|
| 43 | public int hashCode() {
|
---|
| 44 | return getClass().hashCode();
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.