Subversion Repositories SmartDukaan

Rev

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