Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
24317 govind 1
package com.spice.profitmandi.dao.entity.fofo;
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;
28755 amit.gupta 10
import javax.persistence.NamedQueries;
11
import javax.persistence.NamedQuery;
24317 govind 12
import javax.persistence.Table;
13
 
28755 amit.gupta 14
import com.spice.profitmandi.dao.enumuration.fofo.ApplicableServiceType;
15
 
24317 govind 16
/**
28755 amit.gupta 17
 * This class basically contains details
24317 govind 18
 * 
19
 * @author Govind
20
 *
21
 */
22
@Entity
28755 amit.gupta 23
@Table(name = "fofo.service_brand", schema = "fofo")
24
 
25
@NamedQueries({
26
		@NamedQuery(name = "ServiceBrandsConfig.selectFinanceServices", query = "select new com.spice.profitmandi.dao.model.FinanceServicesModel(pbs.fofoId, "
29064 manish 27
				+ " pbs.partnerStatusType,pbs.applicableType,pbs.active,pbs.brandServiceId,pbs.na_Comment,pbs.partnerStatusComment,sb.serviceId,sb.brand,po.name,ps.code,ps.applicableType,ps.createTimestamp,ps.pendingCreateTimestamp,ps.na_Comment,ps.partnerNotInterestedServiceComment,fs.code,fs.activeTimeStamp,us.createTimestamp) from PartnerBrandService pbs "
28797 amit.gupta 28
				+ " join  ServiceBrandsConfig sb  on pbs.brandServiceId = sb.id  join PaymentOption po on sb.serviceId = po.id "
29
				+ " join  PartnerService ps on ps.serviceId =po.id and pbs.fofoId = ps.fofoId join FofoStore fs on fs.id = pbs.fofoId join userUser us on us.id=fs.id"),
28755 amit.gupta 30
})
31
public class ServiceBrandsConfig implements Serializable {
32
 
24317 govind 33
	private static final long serialVersionUID = 1L;
28755 amit.gupta 34
 
24317 govind 35
	public ServiceBrandsConfig() {
36
	}
28755 amit.gupta 37
 
24317 govind 38
	@Id
28755 amit.gupta 39
	@Column(name = "id")
24317 govind 40
	@GeneratedValue(strategy = GenerationType.IDENTITY)
41
	private int id;
28755 amit.gupta 42
 
24317 govind 43
	@Column(name = "service_id")
44
	private int serviceId;
28755 amit.gupta 45
 
24317 govind 46
	@Column(name = "brand")
47
	private String brand;
48
 
49
	public int getId() {
50
		return id;
51
	}
52
 
53
	public void setId(int id) {
54
		this.id = id;
55
	}
56
 
57
	public int getServiceId() {
58
		return serviceId;
59
	}
60
 
61
	public void setServiceId(int serviceId) {
62
		this.serviceId = serviceId;
63
	}
64
 
65
	public String getBrand() {
66
		return brand;
67
	}
68
 
69
	public void setBrand(String brand) {
70
		this.brand = brand;
71
	}
72
 
73
	@Override
74
	public int hashCode() {
75
		final int prime = 31;
76
		int result = 1;
77
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
78
		result = prime * result + id;
79
		result = prime * result + serviceId;
80
		return result;
81
	}
82
 
83
	@Override
84
	public boolean equals(Object obj) {
85
		if (this == obj)
86
			return true;
87
		if (obj == null)
88
			return false;
89
		if (getClass() != obj.getClass())
90
			return false;
91
		ServiceBrandsConfig other = (ServiceBrandsConfig) obj;
92
		if (brand == null) {
93
			if (other.brand != null)
94
				return false;
95
		} else if (!brand.equals(other.brand))
96
			return false;
97
		if (id != other.id)
98
			return false;
99
		if (serviceId != other.serviceId)
100
			return false;
101
		return true;
102
	}
103
 
104
	@Override
105
	public String toString() {
106
		return "ServiceBrandsConfig [id=" + id + ", serviceId=" + serviceId + ", brand=" + brand + "]";
107
	}
108
 
109
}