Subversion Repositories SmartDukaan

Rev

Rev 31860 | Rev 32071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31860 Rev 31903
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.fofo;
1
package com.spice.profitmandi.dao.entity.fofo;
2
 
2
 
-
 
3
import com.spice.profitmandi.dao.entity.catalog.Scheme;
3
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
4
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
4
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
5
import com.spice.profitmandi.dao.enumuration.transaction.SchemePayoutStatus;
5
 
6
 
6
import javax.persistence.*;
7
import javax.persistence.*;
7
import java.io.Serializable;
8
import java.io.Serializable;
8
import java.time.LocalDateTime;
9
import java.time.LocalDateTime;
-
 
10
import java.util.Objects;
9
 
11
 
10
@Entity
12
@Entity
11
@Table(name = "fofo.scheme_in_out")
13
@Table(name = "fofo.scheme_in_out")
12
 
14
 
13
@NamedQueries({
15
@NamedQueries({
Line 233... Line 235...
233
	private String storeCode;
235
	private String storeCode;
234
 
236
 
235
	@Transient
237
	@Transient
236
	private SchemeType schemeType;
238
	private SchemeType schemeType;
237
 
239
 
-
 
240
	@Transient
-
 
241
	private Scheme scheme;
-
 
242
 
-
 
243
	public Scheme getScheme() {
-
 
244
		return scheme;
-
 
245
	}
-
 
246
 
-
 
247
	public void setScheme(Scheme scheme) {
-
 
248
		this.scheme = scheme;
-
 
249
	}
-
 
250
 
-
 
251
	@Override
-
 
252
	public String toString() {
-
 
253
		return "SchemeInOut{" +
-
 
254
				"id=" + id +
-
 
255
				", schemeId=" + schemeId +
-
 
256
				", inventoryItemId=" + inventoryItemId +
-
 
257
				", amount=" + amount +
-
 
258
				", status=" + status +
-
 
259
				", createTimestamp=" + createTimestamp +
-
 
260
				", rolledBackTimestamp=" + rolledBackTimestamp +
-
 
261
				", creditTimestamp=" + creditTimestamp +
-
 
262
				", statusDescription='" + statusDescription + '\'' +
-
 
263
				", reference=" + reference +
-
 
264
				", serialNumber='" + serialNumber + '\'' +
-
 
265
				", storeCode='" + storeCode + '\'' +
-
 
266
				", schemeType=" + schemeType +
-
 
267
				", scheme=" + scheme +
-
 
268
				'}';
-
 
269
	}
-
 
270
 
-
 
271
	@Override
-
 
272
	public boolean equals(Object o) {
-
 
273
		if (this == o) return true;
-
 
274
		if (o == null || getClass() != o.getClass()) return false;
-
 
275
		SchemeInOut that = (SchemeInOut) o;
-
 
276
		return id == that.id && schemeId == that.schemeId && inventoryItemId == that.inventoryItemId && Float.compare(that.amount, amount) == 0 && reference == that.reference && status == that.status && Objects.equals(createTimestamp, that.createTimestamp) && Objects.equals(rolledBackTimestamp, that.rolledBackTimestamp) && Objects.equals(creditTimestamp, that.creditTimestamp) && Objects.equals(statusDescription, that.statusDescription) && Objects.equals(serialNumber, that.serialNumber) && Objects.equals(storeCode, that.storeCode) && schemeType == that.schemeType && Objects.equals(scheme, that.scheme);
-
 
277
	}
-
 
278
 
-
 
279
	@Override
-
 
280
	public int hashCode() {
-
 
281
		return Objects.hash(id, schemeId, inventoryItemId, amount, status, createTimestamp, rolledBackTimestamp, creditTimestamp, statusDescription, reference, serialNumber, storeCode, schemeType, scheme);
-
 
282
	}
-
 
283
 
238
	public String getStoreCode() {
284
	public String getStoreCode() {
239
		return storeCode;
285
		return storeCode;
240
	}
286
	}
241
 
287
 
242
	public void setStoreCode(String storeCode) {
288
	public void setStoreCode(String storeCode) {
Line 297... Line 343...
297
 
343
 
298
	public void setRolledBackTimestamp(LocalDateTime rolledBackTimestamp) {
344
	public void setRolledBackTimestamp(LocalDateTime rolledBackTimestamp) {
299
		this.rolledBackTimestamp = rolledBackTimestamp;
345
		this.rolledBackTimestamp = rolledBackTimestamp;
300
	}
346
	}
301
 
347
 
302
	@Override
-
 
303
	public int hashCode() {
-
 
304
		final int prime = 31;
-
 
305
		int result = 1;
-
 
306
		result = prime * result + Float.floatToIntBits(amount);
-
 
307
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
-
 
308
		result = prime * result + id;
-
 
309
		result = prime * result + inventoryItemId;
-
 
310
		result = prime * result + ((rolledBackTimestamp == null) ? 0 : rolledBackTimestamp.hashCode());
-
 
311
		result = prime * result + schemeId;
-
 
312
		result = prime * result + ((schemeType == null) ? 0 : schemeType.hashCode());
-
 
313
		result = prime * result + ((serialNumber == null) ? 0 : serialNumber.hashCode());
-
 
314
		return result;
-
 
315
	}
-
 
316
 
-
 
317
	@Override
-
 
318
	public boolean equals(Object obj) {
-
 
319
		if (this == obj)
-
 
320
			return true;
-
 
321
		if (obj == null)
-
 
322
			return false;
-
 
323
		if (getClass() != obj.getClass())
-
 
324
			return false;
-
 
325
		SchemeInOut other = (SchemeInOut) obj;
-
 
326
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
-
 
327
			return false;
-
 
328
		if (createTimestamp == null) {
-
 
329
			if (other.createTimestamp != null)
-
 
330
				return false;
-
 
331
		} else if (!createTimestamp.equals(other.createTimestamp))
-
 
332
			return false;
-
 
333
		if (id != other.id)
-
 
334
			return false;
-
 
335
		if (inventoryItemId != other.inventoryItemId)
-
 
336
			return false;
-
 
337
		if (rolledBackTimestamp == null) {
-
 
338
			if (other.rolledBackTimestamp != null)
-
 
339
				return false;
-
 
340
		} else if (!rolledBackTimestamp.equals(other.rolledBackTimestamp))
-
 
341
			return false;
-
 
342
		if (schemeId != other.schemeId)
-
 
343
			return false;
-
 
344
		if (schemeType != other.schemeType)
-
 
345
			return false;
-
 
346
		if (serialNumber == null) {
-
 
347
			if (other.serialNumber != null)
-
 
348
				return false;
-
 
349
		} else if (!serialNumber.equals(other.serialNumber))
-
 
350
			return false;
-
 
351
		return true;
-
 
352
	}
-
 
353
 
-
 
354
	@Override
-
 
355
	public String toString() {
-
 
356
		return "SchemeInOut [id=" + id + ", schemeId=" + schemeId + ", inventoryItemId=" + inventoryItemId + ", amount="
-
 
357
				+ amount + ", status=" + status + ", createTimestamp=" + createTimestamp + ", rolledBackTimestamp="
-
 
358
				+ rolledBackTimestamp + ", creditTimestamp=" + creditTimestamp + ", statusDescription="
-
 
359
				+ statusDescription + ", reference=" + reference + ", serialNumber=" + serialNumber + ", storeCode="
-
 
360
				+ storeCode + ", schemeType=" + schemeType + "]";
-
 
361
	}
-
 
362
 
-
 
363
}
348
}