Subversion Repositories SmartDukaan

Rev

Rev 34709 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
25503 amit.gupta 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
34709 amit.gupta 3
import javax.persistence.*;
25503 amit.gupta 4
import java.io.Serializable;
5
import java.time.LocalDateTime;
6
 
7
@Entity
31860 tejbeer 8
@Table(name = "fofo.partner_type_change")
25503 amit.gupta 9
public class PartnerTypeChange implements Serializable {
10
 
11
	/**
12
	 * 
13
	 */
14
	private static final long serialVersionUID = 1L;
15
 
16
	@Id
17
	@Column(name = "id")
18
	@GeneratedValue(strategy = GenerationType.IDENTITY)
19
	private int id;
20
 
21
	@Column(name = "fofo_id")
22
	private int fofoId;
23
 
24
	@Column(name = "partner_type")
25505 amit.gupta 25
	@Enumerated(EnumType.STRING)
25503 amit.gupta 26
	private PartnerType partnerType;
27
 
28
	@Column(name = "create_timestamp")
29
	private LocalDateTime createTimestamp;
30
 
35509 amit 31
	@Column(name = "source")
32
	@Enumerated(EnumType.STRING)
33
	private PartnerTypeSource source = PartnerTypeSource.CALCULATED;
34
 
35
	@Column(name = "upgraded_by")
36
	private String upgradedBy;
37
 
25503 amit.gupta 38
	@Override
39
	public int hashCode() {
40
		final int prime = 31;
41
		int result = 1;
42
		result = prime * result + ((createTimestamp == null) ? 0 : createTimestamp.hashCode());
43
		result = prime * result + fofoId;
44
		result = prime * result + id;
45
		result = prime * result + ((partnerType == null) ? 0 : partnerType.hashCode());
46
		return result;
47
	}
48
 
49
 
50
 
51
	public PartnerType getPartnerType() {
52
		return partnerType;
53
	}
54
 
55
 
56
 
57
	public void setPartnerType(PartnerType partnerType) {
58
		this.partnerType = partnerType;
59
	}
60
 
61
 
62
 
63
	public void setCreateTimestamp(LocalDateTime createTimestamp) {
64
		this.createTimestamp = createTimestamp;
65
	}
26914 amit.gupta 66
 
25503 amit.gupta 67
 
68
 
69
 
26914 amit.gupta 70
	public LocalDateTime getCreateTimestamp() {
71
		return createTimestamp;
72
	}
73
 
74
 
75
 
25503 amit.gupta 76
	@Override
77
	public boolean equals(Object obj) {
78
		if (this == obj)
79
			return true;
80
		if (obj == null)
81
			return false;
82
		if (getClass() != obj.getClass())
83
			return false;
84
		PartnerTypeChange other = (PartnerTypeChange) obj;
85
		if (createTimestamp == null) {
86
			if (other.createTimestamp != null)
87
				return false;
88
		} else if (!createTimestamp.equals(other.createTimestamp))
89
			return false;
90
		if (fofoId != other.fofoId)
91
			return false;
92
		if (id != other.id)
93
			return false;
94
		if (partnerType != other.partnerType)
95
			return false;
96
		return true;
97
	}
98
 
99
 
100
 
101
	public int getId() {
102
		return id;
103
	}
104
 
105
	public void setId(int id) {
106
		this.id = id;
107
	}
108
 
109
	public int getFofoId() {
110
		return fofoId;
111
	}
112
 
113
	public void setFofoId(int fofoId) {
114
		this.fofoId = fofoId;
115
	}
116
 
35509 amit 117
	public PartnerTypeSource getSource() {
118
		return source;
119
	}
120
 
121
	public void setSource(PartnerTypeSource source) {
122
		this.source = source;
123
	}
124
 
125
	public String getUpgradedBy() {
126
		return upgradedBy;
127
	}
128
 
129
	public void setUpgradedBy(String upgradedBy) {
130
		this.upgradedBy = upgradedBy;
131
	}
132
 
25503 amit.gupta 133
	@Override
134
	public String toString() {
135
		return "PartnerTypeChange [id=" + id + ", fofoId=" + fofoId + ", partnerType=" + partnerType
35509 amit 136
				+ ", createTimestamp=" + createTimestamp + ", source=" + source + ", upgradedBy=" + upgradedBy + "]";
25503 amit.gupta 137
	}
138
}