📄 shopitem.java
字号:
/* * ShopItem.java * * Created on Apr 5, 2008, 10:08:46 AM * * To change this template, choose Tools | Templates * and open the template in the editor. */package com.gecb.mcompanion.web.model;import java.io.Serializable;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.Id;import javax.persistence.JoinColumn;import javax.persistence.ManyToOne;import javax.persistence.NamedQueries;import javax.persistence.NamedQuery;import javax.persistence.Table;/** * * @author User */@Entity@Table(name = "shop_item")@NamedQueries({@NamedQuery(name = "ShopItem.findByShopitemId", query = "SELECT s FROM ShopItem s WHERE s.shopitemId = :shopitemId"), @NamedQuery(name = "ShopItem.findByItemName", query = "SELECT s FROM ShopItem s WHERE s.itemName = :itemName"), @NamedQuery(name = "ShopItem.findByItemCode", query = "SELECT s FROM ShopItem s WHERE s.itemCode = :itemCode"), @NamedQuery(name = "ShopItem.findByItemCategory", query = "SELECT s FROM ShopItem s WHERE s.itemCategory = :itemCategory"), @NamedQuery(name = "ShopItem.findByRate", query = "SELECT s FROM ShopItem s WHERE s.rate = :rate"), @NamedQuery(name = "ShopItem.findByStockAvailable", query = "SELECT s FROM ShopItem s WHERE s.stockAvailable = :stockAvailable"), @NamedQuery(name = "ShopItem.findByQuality", query = "SELECT s FROM ShopItem s WHERE s.quality = :quality"), @NamedQuery(name = "ShopItem.findByBrandname", query = "SELECT s FROM ShopItem s WHERE s.brandname = :brandname"), @NamedQuery(name = "ShopItem.findByItemSpecification", query = "SELECT s FROM ShopItem s WHERE s.itemSpecification = :itemSpecification")})public class ShopItem implements Serializable { @Id @Column(name = "shopitem_id", nullable = false) private Integer shopitemId; @Column(name = "item_name") private String itemName; @Column(name = "item_code", nullable = false) private String itemCode; @Column(name = "item_category") private String itemCategory; @Column(name = "rate") private Double rate; @Column(name = "stock_available") private String stockAvailable; @Column(name = "quality") private String quality; @Column(name = "brandname") private String brandname; @Column(name = "item_specification") private String itemSpecification; @JoinColumn(name = "shop_id", referencedColumnName = "shop_id") @ManyToOne private Shop shopId; public ShopItem() { } public ShopItem(Integer shopitemId) { this.shopitemId = shopitemId; } public ShopItem(Integer shopitemId, String itemCode) { this.shopitemId = shopitemId; this.itemCode = itemCode; } public Integer getShopitemId() { return shopitemId; } public void setShopitemId(Integer shopitemId) { this.shopitemId = shopitemId; } public String getItemName() { return itemName; } public void setItemName(String itemName) { this.itemName = itemName; } public String getItemCode() { return itemCode; } public void setItemCode(String itemCode) { this.itemCode = itemCode; } public String getItemCategory() { return itemCategory; } public void setItemCategory(String itemCategory) { this.itemCategory = itemCategory; } public Double getRate() { return rate; } public void setRate(Double rate) { this.rate = rate; } public String getStockAvailable() { return stockAvailable; } public void setStockAvailable(String stockAvailable) { this.stockAvailable = stockAvailable; } public String getQuality() { return quality; } public void setQuality(String quality) { this.quality = quality; } public String getBrandname() { return brandname; } public void setBrandname(String brandname) { this.brandname = brandname; } public String getItemSpecification() { return itemSpecification; } public void setItemSpecification(String itemSpecification) { this.itemSpecification = itemSpecification; } public Shop getShopId() { return shopId; } public void setShopId(Shop shopId) { this.shopId = shopId; } @Override public int hashCode() { int hash = 0; hash += (shopitemId != null ? shopitemId.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof ShopItem)) { return false; } ShopItem other = (ShopItem) object; if ((this.shopitemId == null && other.shopitemId != null) || (this.shopitemId != null && !this.shopitemId.equals(other.shopitemId))) { return false; } return true; } @Override public String toString() { return "com.horizongroup.mcompanion.web.model.ShopItem[shopitemId=" + shopitemId + "]"; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -