Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
31483 tejbeer 1
package com.spice.profitmandi.dao.entity.catalog;
2
 
3
import java.util.Objects;
4
 
5
import javax.persistence.Column;
6
import javax.persistence.Entity;
31491 tejbeer 7
import javax.persistence.GeneratedValue;
8
import javax.persistence.GenerationType;
31483 tejbeer 9
import javax.persistence.Id;
10
import javax.persistence.Table;
31507 tejbeer 11
import javax.persistence.Transient;
31483 tejbeer 12
 
13
@Entity
31484 tejbeer 14
@Table(name = "catalog.brand", schema = "catalog")
31490 tejbeer 15
public class BrandCatalog {
31483 tejbeer 16
 
17
	@Id
31492 tejbeer 18
	@GeneratedValue(strategy = GenerationType.IDENTITY)
31483 tejbeer 19
	@Column(name = "id", columnDefinition = "int(11)")
20
	private int id;
21
 
22
	@Column(name = "name")
23
	private String name;
24
 
25
	@Column(name = "logo_url")
26
	private String logoUrl;
27
 
28
	@Column(name = "logo_url_transparent")
29
	private String logoUrlTransparent;
30
 
31507 tejbeer 31
	@Transient
32
	public BrandCategory brandCategory;
33
 
31483 tejbeer 34
	public int getId() {
35
		return id;
36
	}
37
 
38
	public void setId(int id) {
39
		this.id = id;
40
	}
41
 
42
	public String getName() {
43
		return name;
44
	}
45
 
31507 tejbeer 46
	public BrandCategory getBrandCategory() {
47
		return brandCategory;
48
	}
49
 
50
	public void setBrandCategory(BrandCategory brandCategory) {
51
		this.brandCategory = brandCategory;
52
	}
53
 
31483 tejbeer 54
	public void setName(String name) {
55
		this.name = name;
56
	}
57
 
58
	public String getLogoUrl() {
59
		return logoUrl;
60
	}
61
 
62
	public void setLogoUrl(String logoUrl) {
63
		this.logoUrl = logoUrl;
64
	}
65
 
66
	public String getLogoUrlTransparent() {
67
		return logoUrlTransparent;
68
	}
69
 
70
	public void setLogoUrlTransparent(String logoUrlTransparent) {
71
		this.logoUrlTransparent = logoUrlTransparent;
72
	}
73
 
74
	@Override
75
	public int hashCode() {
76
		return Objects.hash(id, logoUrl, logoUrlTransparent, name);
77
	}
78
 
79
	@Override
80
	public boolean equals(Object obj) {
81
		if (this == obj)
82
			return true;
83
		if (obj == null)
84
			return false;
85
		if (getClass() != obj.getClass())
86
			return false;
31490 tejbeer 87
		BrandCatalog other = (BrandCatalog) obj;
31483 tejbeer 88
		return id == other.id && Objects.equals(logoUrl, other.logoUrl)
89
				&& Objects.equals(logoUrlTransparent, other.logoUrlTransparent) && Objects.equals(name, other.name);
90
	}
91
 
92
	@Override
93
	public String toString() {
94
		return "Brand [id=" + id + ", name=" + name + ", logoUrl=" + logoUrl + ", logoUrlTransparent="
95
				+ logoUrlTransparent + "]";
96
	}
97
 
98
}