Subversion Repositories SmartDukaan

Rev

Rev 31860 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
27878 amit.gupta 1
package com.spice.profitmandi.dao.entity.catalog;
2
 
31903 amit.gupta 3
import com.spice.profitmandi.dao.enumuration.catalog.AmountType;
4
 
5
import javax.persistence.*;
27918 amit.gupta 6
import java.io.Serializable;
27878 amit.gupta 7
 
8
@Entity
31860 tejbeer 9
@Table(name = "catalog.target_slab")
31903 amit.gupta 10
public class TargetSlabEntity implements Serializable {
27878 amit.gupta 11
    @Id
12
    @Column(name = "id")
13
    @GeneratedValue(strategy = GenerationType.IDENTITY)
14
    private int id;
15
 
16
    @Column(name = "offer_id")
17
    private int offerId;
18
 
31903 amit.gupta 19
    @Column(name = "onwards_target")
27878 amit.gupta 20
    private int onwardsTarget;
21
 
22
    @Column(name="item_criteria_id")
23
    private int itemCriteriaId;
24
 
25
    @Column(name="amount_type")
26
    @Enumerated(EnumType.STRING)
27
    private AmountType amountType;
28
 
29
    @Column(name="payout_target")
30
    private int payoutTarget;
31
 
32
    @Column(name="target_description")
33
    private String targetDescription;
34
 
35
    @Column(name="payout_value")
36
    private float payoutValue;
37
 
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 getOfferId() {
48
        return offerId;
49
    }
50
 
51
    public void setOfferId(int offerId) {
52
        this.offerId = offerId;
53
    }
54
 
55
    public int getOnwardsTarget() {
56
        return onwardsTarget;
57
    }
58
 
59
    public String getTargetDescription() {
60
		return targetDescription;
61
	}
62
 
63
	public void setTargetDescription(String targetDescription) {
64
		this.targetDescription = targetDescription;
65
	}
66
 
67
	public AmountType getAmountType() {
68
		return amountType;
69
	}
70
 
71
	public void setAmountType(AmountType amountType) {
72
		this.amountType = amountType;
73
	}
74
 
75
	public void setOnwardsTarget(int onwardsTarget) {
76
        this.onwardsTarget = onwardsTarget;
77
    }
78
 
79
    public int getItemCriteriaId() {
80
        return itemCriteriaId;
81
    }
82
 
83
    public void setItemCriteriaId(int itemCriteriaId) {
84
        this.itemCriteriaId = itemCriteriaId;
85
    }
86
 
87
    public int getPayoutTarget() {
88
        return payoutTarget;
89
    }
90
 
91
    public void setPayoutTarget(int payoutTarget) {
92
        this.payoutTarget = payoutTarget;
93
    }
94
 
95
    public float getPayoutValue() {
96
        return payoutValue;
97
    }
98
 
99
    public void setPayoutValue(float payoutValue) {
100
        this.payoutValue = payoutValue;
101
    }
102
 
103
    @Override
104
	public boolean equals(Object obj) {
105
		if (this == obj)
106
			return true;
107
		if (obj == null)
108
			return false;
109
		if (getClass() != obj.getClass())
110
			return false;
31903 amit.gupta 111
        TargetSlabEntity other = (TargetSlabEntity) obj;
27878 amit.gupta 112
		if (amountType != other.amountType)
113
			return false;
114
		if (id != other.id)
115
			return false;
116
		if (itemCriteriaId != other.itemCriteriaId)
117
			return false;
118
		if (offerId != other.offerId)
119
			return false;
120
		if (onwardsTarget != other.onwardsTarget)
121
			return false;
122
		if (payoutTarget != other.payoutTarget)
123
			return false;
124
		if (Float.floatToIntBits(payoutValue) != Float.floatToIntBits(other.payoutValue))
125
			return false;
126
		if (targetDescription == null) {
127
			if (other.targetDescription != null)
128
				return false;
129
		} else if (!targetDescription.equals(other.targetDescription))
130
			return false;
131
		return true;
132
	}
133
 
134
    @Override
135
	public int hashCode() {
136
		final int prime = 31;
137
		int result = 1;
138
		result = prime * result + ((amountType == null) ? 0 : amountType.hashCode());
139
		result = prime * result + id;
140
		result = prime * result + itemCriteriaId;
141
		result = prime * result + offerId;
142
		result = prime * result + onwardsTarget;
143
		result = prime * result + payoutTarget;
144
		result = prime * result + Float.floatToIntBits(payoutValue);
145
		result = prime * result + ((targetDescription == null) ? 0 : targetDescription.hashCode());
146
		return result;
147
	}
148
 
149
    @Override
150
	public String toString() {
151
		return "TargetSlab [id=" + id + ", offerId=" + offerId + ", onwardsTarget=" + onwardsTarget
152
				+ ", itemCriteriaId=" + itemCriteriaId + ", amountType=" + amountType + ", payoutTarget=" + payoutTarget
153
				+ ", targetDescription=" + targetDescription + ", payoutValue=" + payoutValue + "]";
154
	}
155
}