1 package com.griddynamics.jagger.engine.e1.services.data.service;
3 import java.util.Comparator;
22 private String comment;
27 private Date startDate;
37 private Integer kernels;
58 this.comment = comment;
69 this.startDate = startDate;
80 this.endDate = endDate;
91 this.kernels = kernels;
99 if (o == null || getClass() != o.getClass()) {
105 if (comment != null ? !comment.equals(that.comment) : that.comment != null) {
108 if (endDate != null ? !endDate.equals(that.endDate) : that.endDate != null) {
111 if (
id != null ? !
id.
equals(that.id) : that.id != null) {
114 if (kernels != null ? !kernels.equals(that.kernels) : that.kernels != null) {
117 if (startDate != null ? !startDate.equals(that.startDate) : that.startDate != null) {
126 int result =
id != null ?
id.hashCode() : 0;
127 result = 31 * result + (comment != null ? comment.hashCode() : 0);
128 result = 31 * result + (startDate != null ? startDate.hashCode() : 0);
129 result = 31 * result + (endDate != null ? endDate.hashCode() : 0);
130 result = 31 * result + (kernels != null ? kernels.hashCode() : 0);
136 return "SessionEntity{" +
138 ", comment='" + comment +
'\'' +
139 ", startDate='" + startDate +
'\'' +
140 ", endDate='" + endDate +
'\'' +
141 ", kernels=" + kernels +
145 public static class IdComparator implements Comparator<SessionEntity> {
149 Integer id1 = Integer.parseInt(o1.
getId());
150 Integer id2 = Integer.parseInt(o2.
getId());
152 return id2.compareTo(id1);