Subversion Repositories SmartDukaan

Rev

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

Rev 24107 Rev 24171
Line 1... Line 1...
1
package com.spice.profitmandi.dao.entity.fofo;
1
package com.spice.profitmandi.dao.entity.fofo;
2
 
2
 
3
import java.time.LocalDateTime;
-
 
4
 
-
 
5
import javax.persistence.Column;
3
import javax.persistence.Column;
6
import javax.persistence.Convert;
-
 
7
import javax.persistence.Entity;
4
import javax.persistence.Entity;
8
import javax.persistence.GeneratedValue;
5
import javax.persistence.GeneratedValue;
9
import javax.persistence.GenerationType;
6
import javax.persistence.GenerationType;
10
import javax.persistence.Id;
7
import javax.persistence.Id;
11
import javax.persistence.Table;
8
import javax.persistence.Table;
12
 
9
 
13
import com.spice.profitmandi.dao.convertor.LocalDateTimeAttributeConverter;
-
 
14
 
-
 
15
@Entity
10
@Entity
16
@Table(name="fofo.partner_target",schema="fofo")
11
@Table(name="fofo.partner_target",schema="fofo")
17
public class PartnerTarget {
12
public class PartnerTarget {
18
	
13
	
19
	@Id
14
	@Id
Line 25... Line 20...
25
	private int fofoId;
20
	private int fofoId;
26
	
21
	
27
	@Column(name="target_value")
22
	@Column(name="target_value")
28
	private float targetValue;
23
	private float targetValue;
29
	
24
	
30
	@Convert(converter = LocalDateTimeAttributeConverter.class)
-
 
31
	@Column(name="target_month")
25
	@Column(name="target_id")
32
	private LocalDateTime targetMonth;
26
	private int targetId;
33
 
27
 
34
	public int getId() {
28
	public int getId() {
35
		return id;
29
		return id;
36
	}
30
	}
37
 
31
 
Line 53... Line 47...
53
 
47
 
54
	public void setTargetValue(float targetValue) {
48
	public void setTargetValue(float targetValue) {
55
		this.targetValue = targetValue;
49
		this.targetValue = targetValue;
56
	}
50
	}
57
 
51
 
58
	public LocalDateTime getTargetMonth() {
52
	public int getTargetId() {
59
		return targetMonth;
53
		return targetId;
60
	}
54
	}
61
 
55
 
62
	public void setTargetMonth(LocalDateTime targetMonth) {
56
	public void setTargetId(int targetId) {
63
		this.targetMonth = targetMonth;
57
		this.targetId = targetId;
64
	}
58
	}
65
 
59
 
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
	
60
	
107
 
-
 
108
	
-
 
109
 
-
 
110
}
61
}