Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
24107 govind 1
package com.spice.profitmandi.dao.entity.fofo;
2
 
3
import java.time.LocalDateTime;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Convert;
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
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
14
 
15
@Entity
16
@Table(name="fofo.partner_target",schema="fofo")
17
public class PartnerTarget {
18
 
19
	@Id
20
	@Column(name="id")
21
	@GeneratedValue(strategy = GenerationType.IDENTITY)
22
	private int id;
23
 
24
	@Column(name="fofo_id")
25
	private int fofoId;
26
 
27
	@Column(name="target_value")
28
	private float targetValue;
29
 
30
	@Convert(converter = LocalDateTimeAttributeConverter.class)
31
	@Column(name="target_month")
32
	private LocalDateTime targetMonth;
33
 
34
	public int getId() {
35
		return id;
36
	}
37
 
38
	public void setId(int id) {
39
		this.id = id;
40
	}
41
 
42
	public int getFofoId() {
43
		return fofoId;
44
	}
45
 
46
	public void setFofoId(int fofoId) {
47
		this.fofoId = fofoId;
48
	}
49
 
50
	public float getTargetValue() {
51
		return targetValue;
52
	}
53
 
54
	public void setTargetValue(float targetValue) {
55
		this.targetValue = targetValue;
56
	}
57
 
58
	public LocalDateTime getTargetMonth() {
59
		return targetMonth;
60
	}
61
 
62
	public void setTargetMonth(LocalDateTime targetMonth) {
63
		this.targetMonth = targetMonth;
64
	}
65
 
66
	@Override
67
	public int hashCode() {
68
		final int prime = 31;
69
		int result = 1;
70
		result = prime * result + fofoId;
71
		result = prime * result + id;
72
		result = prime * result + ((targetMonth == null) ? 0 : targetMonth.hashCode());
73
		result = prime * result + Float.floatToIntBits(targetValue);
74
		return result;
75
	}
76
 
77
	@Override
78
	public boolean equals(Object obj) {
79
		if (this == obj)
80
			return true;
81
		if (obj == null)
82
			return false;
83
		if (getClass() != obj.getClass())
84
			return false;
85
		PartnerTarget other = (PartnerTarget) obj;
86
		if (fofoId != other.fofoId)
87
			return false;
88
		if (id != other.id)
89
			return false;
90
		if (targetMonth == null) {
91
			if (other.targetMonth != null)
92
				return false;
93
		} else if (!targetMonth.equals(other.targetMonth))
94
			return false;
95
		if (Float.floatToIntBits(targetValue) != Float.floatToIntBits(other.targetValue))
96
			return false;
97
		return true;
98
	}
99
 
100
	@Override
101
	public String toString() {
102
		return "PartnerTarget [id=" + id + ", fofoId=" + fofoId + ", targetValue=" + targetValue + ", targetMonth="
103
				+ targetMonth + "]";
104
	}
105
 
106
 
107
 
108
 
109
 
110
}