| 24081 |
govind |
1 |
package com.spice.profitmandi.dao.entity.warehouse;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
|
| 32603 |
raveendra. |
4 |
import in.shop2020.warehouse.TransferLotStatus;
|
| 24081 |
govind |
5 |
|
| 32603 |
raveendra. |
6 |
import javax.persistence.*;
|
|
|
7 |
import java.time.LocalDateTime;
|
| 24081 |
govind |
8 |
/**
|
|
|
9 |
* This class basically contains scheme details
|
|
|
10 |
*
|
|
|
11 |
* @author Govind Kumar
|
|
|
12 |
*
|
|
|
13 |
*/
|
|
|
14 |
@Entity
|
| 32603 |
raveendra. |
15 |
@Table(name = "warehouse.transferLot")
|
| 24081 |
govind |
16 |
public class TransferLot {
|
|
|
17 |
|
|
|
18 |
@Id
|
|
|
19 |
@Column(name = "id", unique = true, updatable = false)
|
|
|
20 |
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
21 |
private int id;
|
|
|
22 |
|
|
|
23 |
@Column(name = "originWarehouseId")
|
|
|
24 |
private int originWarehouseId;
|
|
|
25 |
|
|
|
26 |
@Column(name = "destinationWarehouseId")
|
|
|
27 |
private int destinationWarehouseId;
|
|
|
28 |
|
|
|
29 |
@Column(name = "status")
|
|
|
30 |
@Enumerated(EnumType.STRING)
|
|
|
31 |
private TransferLotStatus status;
|
|
|
32 |
|
|
|
33 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
34 |
@Column(name = "transferDate")
|
|
|
35 |
private LocalDateTime transferDate;
|
|
|
36 |
|
|
|
37 |
@Column(name = "transitCompletionReferenceNumber")
|
|
|
38 |
private String transitCompletionReferenceNumber;
|
|
|
39 |
|
|
|
40 |
@Convert(converter = LocalDateTimeAttributeConverter.class)
|
|
|
41 |
@Column(name = "referenceUpdationDate")
|
|
|
42 |
private LocalDateTime referenceUpdationDate;
|
|
|
43 |
|
|
|
44 |
@Column(name = "remarks")
|
|
|
45 |
private String remarks;
|
|
|
46 |
|
|
|
47 |
@Column(name = "shipmentReference")
|
|
|
48 |
private int shipmentReference;
|
|
|
49 |
|
|
|
50 |
public int getId() {
|
|
|
51 |
return id;
|
|
|
52 |
}
|
|
|
53 |
|
|
|
54 |
public void setId(int id) {
|
|
|
55 |
this.id = id;
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
public int getOriginWarehouseId() {
|
|
|
59 |
return originWarehouseId;
|
|
|
60 |
}
|
|
|
61 |
|
|
|
62 |
public void setOriginWarehouseId(int originWarehouseId) {
|
|
|
63 |
this.originWarehouseId = originWarehouseId;
|
|
|
64 |
}
|
|
|
65 |
|
|
|
66 |
public int getDestinationWarehouseId() {
|
|
|
67 |
return destinationWarehouseId;
|
|
|
68 |
}
|
|
|
69 |
|
|
|
70 |
public void setDestinationWarehouseId(int destinationWarehouseId) {
|
|
|
71 |
this.destinationWarehouseId = destinationWarehouseId;
|
|
|
72 |
}
|
|
|
73 |
|
|
|
74 |
public TransferLotStatus getStatus() {
|
|
|
75 |
return status;
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
public void setStatus(TransferLotStatus status) {
|
|
|
79 |
this.status = status;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
public LocalDateTime getTransferDate() {
|
|
|
83 |
return transferDate;
|
|
|
84 |
}
|
|
|
85 |
|
|
|
86 |
public void setTransferDate(LocalDateTime transferDate) {
|
|
|
87 |
this.transferDate = transferDate;
|
|
|
88 |
}
|
|
|
89 |
|
|
|
90 |
public String getTransitCompletionReferenceNumber() {
|
|
|
91 |
return transitCompletionReferenceNumber;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
public void setTransitCompletionReferenceNumber(String transitCompletionReferenceNumber) {
|
|
|
95 |
this.transitCompletionReferenceNumber = transitCompletionReferenceNumber;
|
|
|
96 |
}
|
|
|
97 |
|
|
|
98 |
public LocalDateTime getReferenceUpdationDate() {
|
|
|
99 |
return referenceUpdationDate;
|
|
|
100 |
}
|
|
|
101 |
|
|
|
102 |
public void setReferenceUpdationDate(LocalDateTime referenceUpdationDate) {
|
|
|
103 |
this.referenceUpdationDate = referenceUpdationDate;
|
|
|
104 |
}
|
|
|
105 |
|
|
|
106 |
public String getRemarks() {
|
|
|
107 |
return remarks;
|
|
|
108 |
}
|
|
|
109 |
|
|
|
110 |
public void setRemarks(String remarks) {
|
|
|
111 |
this.remarks = remarks;
|
|
|
112 |
}
|
|
|
113 |
|
|
|
114 |
public int getShipmentReference() {
|
|
|
115 |
return shipmentReference;
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
public void setShipmentReference(int shipmentReference) {
|
|
|
119 |
this.shipmentReference = shipmentReference;
|
|
|
120 |
}
|
|
|
121 |
|
|
|
122 |
@Override
|
|
|
123 |
public int hashCode() {
|
|
|
124 |
final int prime = 31;
|
|
|
125 |
int result = 1;
|
|
|
126 |
result = prime * result + destinationWarehouseId;
|
|
|
127 |
result = prime * result + id;
|
|
|
128 |
result = prime * result + originWarehouseId;
|
|
|
129 |
result = prime * result + ((referenceUpdationDate == null) ? 0 : referenceUpdationDate.hashCode());
|
|
|
130 |
result = prime * result + ((remarks == null) ? 0 : remarks.hashCode());
|
|
|
131 |
result = prime * result + shipmentReference;
|
|
|
132 |
result = prime * result + ((status == null) ? 0 : status.hashCode());
|
|
|
133 |
result = prime * result + ((transferDate == null) ? 0 : transferDate.hashCode());
|
|
|
134 |
result = prime * result
|
|
|
135 |
+ ((transitCompletionReferenceNumber == null) ? 0 : transitCompletionReferenceNumber.hashCode());
|
|
|
136 |
return result;
|
|
|
137 |
}
|
|
|
138 |
|
|
|
139 |
@Override
|
|
|
140 |
public boolean equals(Object obj) {
|
|
|
141 |
if (this == obj)
|
|
|
142 |
return true;
|
|
|
143 |
if (obj == null)
|
|
|
144 |
return false;
|
|
|
145 |
if (getClass() != obj.getClass())
|
|
|
146 |
return false;
|
|
|
147 |
TransferLot other = (TransferLot) obj;
|
|
|
148 |
if (destinationWarehouseId != other.destinationWarehouseId)
|
|
|
149 |
return false;
|
|
|
150 |
if (id != other.id)
|
|
|
151 |
return false;
|
|
|
152 |
if (originWarehouseId != other.originWarehouseId)
|
|
|
153 |
return false;
|
|
|
154 |
if (referenceUpdationDate == null) {
|
|
|
155 |
if (other.referenceUpdationDate != null)
|
|
|
156 |
return false;
|
|
|
157 |
} else if (!referenceUpdationDate.equals(other.referenceUpdationDate))
|
|
|
158 |
return false;
|
|
|
159 |
if (remarks == null) {
|
|
|
160 |
if (other.remarks != null)
|
|
|
161 |
return false;
|
|
|
162 |
} else if (!remarks.equals(other.remarks))
|
|
|
163 |
return false;
|
|
|
164 |
if (shipmentReference != other.shipmentReference)
|
|
|
165 |
return false;
|
|
|
166 |
if (status != other.status)
|
|
|
167 |
return false;
|
|
|
168 |
if (transferDate == null) {
|
|
|
169 |
if (other.transferDate != null)
|
|
|
170 |
return false;
|
|
|
171 |
} else if (!transferDate.equals(other.transferDate))
|
|
|
172 |
return false;
|
|
|
173 |
if (transitCompletionReferenceNumber == null) {
|
|
|
174 |
if (other.transitCompletionReferenceNumber != null)
|
|
|
175 |
return false;
|
|
|
176 |
} else if (!transitCompletionReferenceNumber.equals(other.transitCompletionReferenceNumber))
|
|
|
177 |
return false;
|
|
|
178 |
return true;
|
|
|
179 |
}
|
|
|
180 |
|
|
|
181 |
@Override
|
|
|
182 |
public String toString() {
|
|
|
183 |
return "TransferLot [id=" + id + ", originWarehouseId=" + originWarehouseId + ", destinationWarehouseId="
|
|
|
184 |
+ destinationWarehouseId + ", status=" + status + ", transferDate=" + transferDate
|
|
|
185 |
+ ", transitCompletionReferenceNumber=" + transitCompletionReferenceNumber + ", referenceUpdationDate="
|
|
|
186 |
+ referenceUpdationDate + ", remarks=" + remarks + ", shipmentReference=" + shipmentReference + "]";
|
|
|
187 |
}
|
|
|
188 |
|
|
|
189 |
|
|
|
190 |
}
|