Rev 21720 | Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity;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 javax.persistence.UniqueConstraint;/*** This class basically contains api details** @author ashikali**/@Entity@Table(name="retailer_brand", schema = "dtr", uniqueConstraints = {@UniqueConstraint(columnNames = {"retailer_id", "brand_id"})})@NamedQueries({@NamedQuery(name="RetailerBrand.selectByRetailerId", query="select rb from RetailerBrand rb where rb.retailerId= :retailerId"),@NamedQuery(name="RetailerBrand.deleteByRetailerAndBrandId", query="delete from RetailerBrand rb where rb.retailerId= :retailerId and rb.brandId = :brandId"),@NamedQuery(name = "RetailerBrand.selectBrandNamesByRetailerId", query = "select b.name from RetailerBrand rb join Brand b on b.id = rb.brandId where rb.retailerId = :retailerId")})public class RetailerBrand implements Serializable{private static final long serialVersionUID = 1L;@Id@Column(name="id", unique=true, updatable=false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;public RetailerBrand() {}public int getId() {return id;}public void setId(int id) {this.id = id;}@Column(name="retailer_id", unique=false, updatable=false)private int retailerId;@Column(name="brand_id", unique = false)private int brandId;public int getRetailerId() {return retailerId;}public void setRetailerId(int retailerId) {this.retailerId = retailerId;}public int getBrandId() {return brandId;}public void setBrandId(int brandId) {this.brandId = brandId;}@Overridepublic String toString() {return "RetailerBrand [retailerId=" + retailerId + ", brandId=" + brandId + "]";}}