Subversion Repositories SmartDukaan

Rev

Rev 29064 | Rev 29798 | 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, "
29765 manish 27
				+ " pbs.partnerStatusType,pbs.applicableType,pbs.active,pbs.brandServiceId,pbs.na_Comment,pbs.partnerStatusComment,"
28
				+ "sb.serviceId,sb.brand,po.name,ps.code,ps.applicableType,ps.createTimestamp,ps.pendingCreateTimestamp,ps.na_Comment,ps.genComment,ps.partnerNotInterestedServiceComment,fs.code,fs.activeTimeStamp,us.createTimestamp,pob.documentsCompleted) from PartnerBrandService pbs "
28797 amit.gupta 29
				+ " join  ServiceBrandsConfig sb  on pbs.brandServiceId = sb.id  join PaymentOption po on sb.serviceId = po.id "
29765 manish 30
				+ " 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 join PartnerOnBoardingPanel pob on pob.Code=fs.code"),
31
 
32
		@NamedQuery(name = "ServiceBrandsConfig.selectFinanceServicesByFofoId", query = "select new com.spice.profitmandi.dao.model.FinanceServicesModel(pbs.fofoId, "
33
				+ " pbs.partnerStatusType,pbs.applicableType,pbs.active,pbs.brandServiceId,pbs.na_Comment,pbs.partnerStatusComment,"
34
				+ "sb.serviceId,sb.brand,po.name,ps.code,ps.applicableType,ps.createTimestamp,ps.pendingCreateTimestamp,ps.na_Comment,ps.genComment,ps.partnerNotInterestedServiceComment,fs.code,fs.activeTimeStamp,us.createTimestamp,pob.documentsCompleted) from PartnerBrandService pbs "
35
				+ " join  ServiceBrandsConfig sb  on pbs.brandServiceId = sb.id  join PaymentOption po on sb.serviceId = po.id "
36
				+ " join  PartnerService ps on ps.serviceId =po.id and pbs.fofoId = ps.fofoId join"
37
				+ " FofoStore fs on fs.id = pbs.fofoId join userUser us on us.id=fs.id join "
38
				+ "PartnerOnBoardingPanel pob on pob.Code=fs.code where fs.id = :fofoId"), })
39
 
28755 amit.gupta 40
public class ServiceBrandsConfig implements Serializable {
41
 
24317 govind 42
	private static final long serialVersionUID = 1L;
28755 amit.gupta 43
 
24317 govind 44
	public ServiceBrandsConfig() {
45
	}
28755 amit.gupta 46
 
24317 govind 47
	@Id
28755 amit.gupta 48
	@Column(name = "id")
24317 govind 49
	@GeneratedValue(strategy = GenerationType.IDENTITY)
50
	private int id;
28755 amit.gupta 51
 
24317 govind 52
	@Column(name = "service_id")
53
	private int serviceId;
28755 amit.gupta 54
 
24317 govind 55
	@Column(name = "brand")
56
	private String brand;
57
 
58
	public int getId() {
59
		return id;
60
	}
61
 
62
	public void setId(int id) {
63
		this.id = id;
64
	}
65
 
66
	public int getServiceId() {
67
		return serviceId;
68
	}
69
 
70
	public void setServiceId(int serviceId) {
71
		this.serviceId = serviceId;
72
	}
73
 
74
	public String getBrand() {
75
		return brand;
76
	}
77
 
78
	public void setBrand(String brand) {
79
		this.brand = brand;
80
	}
81
 
82
	@Override
83
	public int hashCode() {
84
		final int prime = 31;
85
		int result = 1;
86
		result = prime * result + ((brand == null) ? 0 : brand.hashCode());
87
		result = prime * result + id;
88
		result = prime * result + serviceId;
89
		return result;
90
	}
91
 
92
	@Override
93
	public boolean equals(Object obj) {
94
		if (this == obj)
95
			return true;
96
		if (obj == null)
97
			return false;
98
		if (getClass() != obj.getClass())
99
			return false;
100
		ServiceBrandsConfig other = (ServiceBrandsConfig) obj;
101
		if (brand == null) {
102
			if (other.brand != null)
103
				return false;
104
		} else if (!brand.equals(other.brand))
105
			return false;
106
		if (id != other.id)
107
			return false;
108
		if (serviceId != other.serviceId)
109
			return false;
110
		return true;
111
	}
112
 
113
	@Override
114
	public String toString() {
115
		return "ServiceBrandsConfig [id=" + id + ", serviceId=" + serviceId + ", brand=" + brand + "]";
116
	}
117
 
118
}