⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resturant.java

📁 This is a project used to find a corresondin location from place
💻 JAVA
字号:
/* * Resturant.java *  * Created on Apr 5, 2008, 10:08:48 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 = "resturant")@NamedQueries({@NamedQuery(name = "Resturant.findByResturantId", query = "SELECT r FROM Resturant r WHERE r.resturantId = :resturantId"), @NamedQuery(name = "Resturant.findByResturantName", query = "SELECT r FROM Resturant r WHERE r.resturantName = :resturantName"), @NamedQuery(name = "Resturant.findByResturantType", query = "SELECT r FROM Resturant r WHERE r.resturantType = :resturantType"), @NamedQuery(name = "Resturant.findByResturantMenu", query = "SELECT r FROM Resturant r WHERE r.resturantMenu = :resturantMenu")})public class Resturant implements Serializable {    @Id    @Column(name = "resturant_id", nullable = false)    private Integer resturantId;    @Column(name = "resturant_name")    private String resturantName;    @Column(name = "resturant_type")    private String resturantType;    @Column(name = "resturant_menu")    private String resturantMenu;    @JoinColumn(name = "address_id", referencedColumnName = "address_id")    @ManyToOne    private Address addressId;    public Resturant() {    }    public Resturant(Integer resturantId) {        this.resturantId = resturantId;    }    public Integer getResturantId() {        return resturantId;    }    public void setResturantId(Integer resturantId) {        this.resturantId = resturantId;    }    public String getResturantName() {        return resturantName;    }    public void setResturantName(String resturantName) {        this.resturantName = resturantName;    }    public String getResturantType() {        return resturantType;    }    public void setResturantType(String resturantType) {        this.resturantType = resturantType;    }    public String getResturantMenu() {        return resturantMenu;    }    public void setResturantMenu(String resturantMenu) {        this.resturantMenu = resturantMenu;    }    public Address getAddressId() {        return addressId;    }    public void setAddressId(Address addressId) {        this.addressId = addressId;    }    @Override    public int hashCode() {        int hash = 0;        hash += (resturantId != null ? resturantId.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 Resturant)) {            return false;        }        Resturant other = (Resturant) object;        if ((this.resturantId == null && other.resturantId != null) || (this.resturantId != null && !this.resturantId.equals(other.resturantId))) {            return false;        }        return true;    }    @Override    public String toString() {        return "com.horizongroup.mcompanion.web.model.Resturant[resturantId=" + resturantId + "]";    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -