Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
22600 ashik.ali 1
package com.spice.profitmandi.dao.entity.catalog;
2
 
3
import java.io.Serializable;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
7
import javax.persistence.GeneratedValue;
8
import javax.persistence.GenerationType;
9
import javax.persistence.Id;
10
import javax.persistence.Table;
11
import javax.persistence.UniqueConstraint;
12
 
13
/**
14
 * This class basically contains tag details
15
 * 
16
 * @author ashikali
17
 *
18
 */
19
@Entity
20
@Table(name="catalog.retailer_tag", schema = "catalog", uniqueConstraints = {@UniqueConstraint(columnNames = {"retailer_id","scheme_tag_id"})})
21
 
22
public class RetailerSchemeTag implements Serializable{
23
 
24
	private static final long serialVersionUID = 1L;
25
 
26
	public RetailerSchemeTag() {
27
	}
28
 
29
	@Id
30
	@Column(name="id", columnDefinition = "int(10) unsigned")
31
	@GeneratedValue(strategy = GenerationType.IDENTITY)
32
	private int id;
33
 
34
	@Column(name="retailer_id")
35
	private int retailerId;
36
 
37
	@Column(name = "scheme_tag_id")
38
	private int schemeTagId;
39
 
40
	@Column(name = "active", columnDefinition="tinyint(1) default 0")
41
	private boolean active;
42
 
43
	public int getId() {
44
		return id;
45
	}
46
	public void setId(int id) {
47
		this.id = id;
48
	}
49
 
50
	public int getRetailerId() {
51
		return retailerId;
52
	}
53
	public void setRetailerId(int retailerId) {
54
		this.retailerId = retailerId;
55
	}
56
	public int getSchemeTagId() {
57
		return schemeTagId;
58
	}
59
	public void setSchemeTagId(int schemeTagId) {
60
		this.schemeTagId = schemeTagId;
61
	}
62
    public boolean isActive() {
63
		return active;
64
	}
65
    public void setActive(boolean active) {
66
		this.active = active;
67
	}
68
 
69
	@Override
70
	public int hashCode() {
71
		final int prime = 31;
72
		int result = 1;
73
		result = prime * result + retailerId;
74
		result = prime * result + schemeTagId;
75
		return result;
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
		RetailerSchemeTag other = (RetailerSchemeTag) obj;
86
		if (retailerId != other.retailerId)
87
			return false;
88
		if (schemeTagId != other.schemeTagId)
89
			return false;
90
		return true;
91
	}
92
	@Override
93
	public String toString() {
94
		return "FofoTag [id=" + id + ", retailerId=" + retailerId + ", schemeTagId=" + schemeTagId + ", active=" + active + "]";
95
	}
96
 
97
}