Rev 22859 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.dtr;import java.io.Serializable;import javax.persistence.Column;import javax.persistence.Entity;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="dtr.shop_address", uniqueConstraints = {@UniqueConstraint(columnNames = {"shop_id","address_id"})})@NamedQueries({@NamedQuery(name="ShopAddress.selectAddressByShopId", query="select a from ShopAddress sa join Address a on a.id = sa.addressId where sa.shopId= :shopId"),@NamedQuery(name="ShopAddress.deleteByShopId", query="delete from ShopAddress sa where sa.shopId= :shopId")})public class ShopAddress implements Serializable{private static final long serialVersionUID = 1L;public ShopAddress() {}@Id@Column(name="shop_id", unique=false, updatable=false)private int shopId;@Id@Column(name="address_id", unique = false)private int addressId;public int getShopId() {return shopId;}public void setShopId(int shopId) {this.shopId = shopId;}public int getAddressId() {return addressId;}public void setAddressId(int addressId) {this.addressId = addressId;}@Overridepublic int hashCode() {final int prime = 31;int result = 1;result = prime * result + addressId;result = prime * result + shopId;return result;}@Overridepublic boolean equals(Object obj) {if (this == obj)return true;if (obj == null)return false;if (getClass() != obj.getClass())return false;ShopAddress other = (ShopAddress) obj;if (addressId != other.addressId)return false;if (shopId != other.shopId)return false;return true;}@Overridepublic String toString() {return "ShopAddress [shopId=" + shopId + ", addressId=" + addressId + "]";}}