Rev 29858 | Rev 31860 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.fofo;import java.io.Serializable;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.GeneratedValue;import javax.persistence.GenerationType;import javax.persistence.Id;import javax.persistence.NamedQueries;import javax.persistence.NamedQuery;import javax.persistence.Table;import com.spice.profitmandi.dao.enumuration.fofo.ApplicableServiceType;/*** This class basically contains details** @author Govind**/@Entity@Table(name = "fofo.service_brand", schema = "fofo")@NamedQueries({@NamedQuery(name = "ServiceBrandsConfig.selectFinanceServices", query = "select new com.spice.profitmandi.dao.model.FinanceServicesModel(pbs.fofoId, "+ " 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.genComment,ps.partnerNotInterestedServiceComment,fs.code,fs.activeTimeStamp,us.createTimestamp,pob.documentsCompleted,psc.allFollowupDate) from PartnerBrandService pbs "+ " join ServiceBrandsConfig sb on pbs.brandServiceId = sb.id join PaymentOption po on sb.serviceId = po.id "+ " 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"),@NamedQuery(name = "ServiceBrandsConfig.selectFinanceServicesByFofoId", query = "select new com.spice.profitmandi.dao.model.FinanceServicesModel(pbs.fofoId, "+ " 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.genComment,ps.partnerNotInterestedServiceComment,fs.code,fs.activeTimeStamp,us.createTimestamp,pob.documentsCompleted,psc.allFollowupDate) from PartnerBrandService pbs "+ " join ServiceBrandsConfig sb on pbs.brandServiceId = sb.id join PaymentOption po on sb.serviceId = po.id "+ " 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 where ps.fofoId = :fofoId"),@NamedQuery(name = "ServiceBrandsConfig.selectFinanceServiceByFollowUpDate", query = "select new com.spice.profitmandi.dao.model.FinanceServiceFollowUpDateModel(ps.serviceId, "+ " ps.fofoId,ps.genComment,ps.partnerNotInterestedServiceComment,fs.code,psc.allFollowupDate) from PartnerServiceComment psc join PartnerService ps on psc.id = ps.partnerServiceCommentId "+ " join FofoStore fs on fs.id = ps.fofoId join userUser us on us.id=fs.id "+ " join PartnerOnBoardingPanel pob on pob.Code=fs.code where psc.allFollowupDate <= :currentDate"),})public class ServiceBrandsConfig implements Serializable {private static final long serialVersionUID = 1L;public ServiceBrandsConfig() {}@Id@Column(name = "id")@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "service_id")private int serviceId;@Column(name = "brand")private String brand;public int getId() {return id;}public void setId(int id) {this.id = id;}public int getServiceId() {return serviceId;}public void setServiceId(int serviceId) {this.serviceId = serviceId;}public String getBrand() {return brand;}public void setBrand(String brand) {this.brand = brand;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + ((brand == null) ? 0 : brand.hashCode());result = prime * result + id;result = prime * result + serviceId;return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;ServiceBrandsConfig other = (ServiceBrandsConfig) obj;if (brand == null) {if (other.brand != null)return false;} else if (!brand.equals(other.brand))return false;if (id != other.id)return false;if (serviceId != other.serviceId)return false;return true;}@Overridepublic String toString() {return "ServiceBrandsConfig [id=" + id + ", serviceId=" + serviceId + ", brand=" + brand + "]";}}