Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
28754 tejbeer 1
package com.spice.profitmandi.dao.entity.catalog;
2
 
3
import java.io.Serializable;
4
import java.time.LocalDateTime;
5
 
6
import javax.persistence.Column;
7
import javax.persistence.Entity;
8
import javax.persistence.GeneratedValue;
9
import javax.persistence.GenerationType;
10
import javax.persistence.Id;
11
import javax.persistence.Table;
12
 
13
@Entity
14
@Table(name = "catalog.high_demand_items", schema = "catalog")
15
public class HighDemandItem implements Serializable {
16
 
17
	/**
18
	 * 
19
	 */
20
	private static final long serialVersionUID = 1L;
21
 
22
	@Id
23
	@Column(name = "id", columnDefinition = "int(11)")
24
	@GeneratedValue(strategy = GenerationType.IDENTITY)
25
	private int id;
26
 
27
	@Column(name = "catalog_id")
28
	private int catalogId;
29
 
30
	@Column(name = "qty")
31
	private int qty;
32
 
33
	@Column(name = "create_timestamp")
34
	private LocalDateTime createTimestamp;
35
 
36
	@Column(name = "update_timestamp")
37
	private LocalDateTime updateTimestamp;
38
 
39
	public int getId() {
40
		return id;
41
	}
42
 
43
	public void setId(int id) {
44
		this.id = id;
45
	}
46
 
47
	public int getCatalogId() {
48
		return catalogId;
49
	}
50
 
51
	public void setCatalogId(int catalogId) {
52
		this.catalogId = catalogId;
53
	}
54
 
55
	public int getQty() {
56
		return qty;
57
	}
58
 
59
	public void setQty(int qty) {
60
		this.qty = qty;
61
	}
62
 
63
	public LocalDateTime getCreateTimestamp() {
64
		return createTimestamp;
65
	}
66
 
67
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
68
		this.createTimestamp = createTimestamp;
69
	}
70
 
71
	public LocalDateTime getUpdateTimestamp() {
72
		return updateTimestamp;
73
	}
74
 
75
	public void setUpdateTimestamp(LocalDateTime updateTimestamp) {
76
		this.updateTimestamp = updateTimestamp;
77
	}
78
 
79
	@Override
80
	public int hashCode() {
81
		final int prime = 31;
82
		int result = 1;
83
		result = prime * result + catalogId;
84
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
85
		result = prime * result + id;
86
		result = prime * result + qty;
87
		result = prime * result + ((updateTimestamp == null) ? 0 : updateTimestamp.hashCode());
88
		return result;
89
	}
90
 
91
	@Override
92
	public boolean equals(Object obj) {
93
		if (this == obj)
94
			return true;
95
		if (obj == null)
96
			return false;
97
		if (getClass() != obj.getClass())
98
			return false;
99
		HighDemandItem other = (HighDemandItem) obj;
100
		if (catalogId != other.catalogId)
101
			return false;
102
		if (createTimestamp == null) {
103
			if (other.createTimestamp != null)
104
				return false;
105
		} else if (!createTimestamp.equals(other.createTimestamp))
106
			return false;
107
		if (id != other.id)
108
			return false;
109
		if (qty != other.qty)
110
			return false;
111
		if (updateTimestamp == null) {
112
			if (other.updateTimestamp != null)
113
				return false;
114
		} else if (!updateTimestamp.equals(other.updateTimestamp))
115
			return false;
116
		return true;
117
	}
118
 
119
	@Override
120
	public String toString() {
121
		return "HighDemandItems [id=" + id + ", catalogId=" + catalogId + ", qty=" + qty + ", createTimestamp="
122
				+ createTimestamp + ", updateTimestamp=" + updateTimestamp + "]";
123
	}
124
 
125
}