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

📄 address.java

📁 This is a project used to find a corresondin location from place
💻 JAVA
字号:
/* * Address.java *  * Created on Apr 5, 2008, 10:08:51 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 java.math.BigInteger;import java.util.Collection;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.Id;import javax.persistence.NamedQueries;import javax.persistence.NamedQuery;import javax.persistence.OneToMany;import javax.persistence.Table;/** * * @author User */@Entity@Table(name = "address")@NamedQueries({@NamedQuery(name = "Address.findByAddressId", query = "SELECT a FROM Address a WHERE a.addressId = :addressId"), @NamedQuery(name = "Address.findByAddress", query = "SELECT a FROM Address a WHERE a.address = :address"), @NamedQuery(name = "Address.findByCity", query = "SELECT a FROM Address a WHERE a.city = :city"), @NamedQuery(name = "Address.findByState", query = "SELECT a FROM Address a WHERE a.state = :state"), @NamedQuery(name = "Address.findByCountry", query = "SELECT a FROM Address a WHERE a.country = :country"), @NamedQuery(name = "Address.findByZip", query = "SELECT a FROM Address a WHERE a.zip = :zip"), @NamedQuery(name = "Address.findByContactEmail", query = "SELECT a FROM Address a WHERE a.contactEmail = :contactEmail"), @NamedQuery(name = "Address.findByContactPhone", query = "SELECT a FROM Address a WHERE a.contactPhone = :contactPhone"), @NamedQuery(name = "Address.findByLatitude", query = "SELECT a FROM Address a WHERE a.latitude = :latitude"), @NamedQuery(name = "Address.findByLongitude", query = "SELECT a FROM Address a WHERE a.longitude = :longitude")})public class Address implements Serializable {    @Id    @Column(name = "address_id", nullable = false)    private BigInteger addressId;    @Column(name = "address", nullable = false)    private String address;    @Column(name = "city", nullable = false)    private String city;    @Column(name = "state", nullable = false)    private String state;    @Column(name = "country", nullable = false)    private String country;    @Column(name = "zip", nullable = false)    private String zip;    @Column(name = "contact_email")    private String contactEmail;    @Column(name = "contact_phone")    private String contactPhone;    @Column(name = "latitude", nullable = false)    private double latitude;    @Column(name = "longitude", nullable = false)    private double longitude;    @OneToMany(mappedBy = "addressId")    private Collection<Shop> shopCollection;    @OneToMany(mappedBy = "addressId")    private Collection<UserDetails> userDetailsCollection;    @OneToMany(mappedBy = "addressId")    private Collection<Resturant> resturantCollection;    @OneToMany(mappedBy = "addressId")    private Collection<Airport> airportCollection;    @OneToMany(mappedBy = "addressId")    private Collection<Petrolpump> petrolpumpCollection;    @OneToMany(mappedBy = "addressId")    private Collection<Tourlocation> tourlocationCollection;    @OneToMany(mappedBy = "addressId")    private Collection<Religiousspots> religiousspotsCollection;    @OneToMany(mappedBy = "addressId")    private Collection<Hospital> hospitalCollection;    public Address() {    }    public Address(BigInteger addressId) {        this.addressId = addressId;    }    public Address(BigInteger addressId, String address, String city, String state, String country, String zip, double latitude, double longitude) {        this.addressId = addressId;        this.address = address;        this.city = city;        this.state = state;        this.country = country;        this.zip = zip;        this.latitude = latitude;        this.longitude = longitude;    }    public BigInteger getAddressId() {        return addressId;    }    public void setAddressId(BigInteger addressId) {        this.addressId = addressId;    }    public String getAddress() {        return address;    }    public void setAddress(String address) {        this.address = address;    }    public String getCity() {        return city;    }    public void setCity(String city) {        this.city = city;    }    public String getState() {        return state;    }    public void setState(String state) {        this.state = state;    }    public String getCountry() {        return country;    }    public void setCountry(String country) {        this.country = country;    }    public String getZip() {        return zip;    }    public void setZip(String zip) {        this.zip = zip;    }    public String getContactEmail() {        return contactEmail;    }    public void setContactEmail(String contactEmail) {        this.contactEmail = contactEmail;    }    public String getContactPhone() {        return contactPhone;    }    public void setContactPhone(String contactPhone) {        this.contactPhone = contactPhone;    }    public double getLatitude() {        return latitude;    }    public void setLatitude(double latitude) {        this.latitude = latitude;    }    public double getLongitude() {        return longitude;    }    public void setLongitude(double longitude) {        this.longitude = longitude;    }    public Collection<Shop> getShopCollection() {        return shopCollection;    }    public void setShopCollection(Collection<Shop> shopCollection) {        this.shopCollection = shopCollection;    }    public Collection<UserDetails> getUserDetailsCollection() {        return userDetailsCollection;    }    public void setUserDetailsCollection(Collection<UserDetails> userDetailsCollection) {        this.userDetailsCollection = userDetailsCollection;    }    public Collection<Resturant> getResturantCollection() {        return resturantCollection;    }    public void setResturantCollection(Collection<Resturant> resturantCollection) {        this.resturantCollection = resturantCollection;    }    public Collection<Airport> getAirportCollection() {        return airportCollection;    }    public void setAirportCollection(Collection<Airport> airportCollection) {        this.airportCollection = airportCollection;    }    public Collection<Petrolpump> getPetrolpumpCollection() {        return petrolpumpCollection;    }    public void setPetrolpumpCollection(Collection<Petrolpump> petrolpumpCollection) {        this.petrolpumpCollection = petrolpumpCollection;    }    public Collection<Tourlocation> getTourlocationCollection() {        return tourlocationCollection;    }    public void setTourlocationCollection(Collection<Tourlocation> tourlocationCollection) {        this.tourlocationCollection = tourlocationCollection;    }    public Collection<Religiousspots> getReligiousspotsCollection() {        return religiousspotsCollection;    }    public void setReligiousspotsCollection(Collection<Religiousspots> religiousspotsCollection) {        this.religiousspotsCollection = religiousspotsCollection;    }    public Collection<Hospital> getHospitalCollection() {        return hospitalCollection;    }    public void setHospitalCollection(Collection<Hospital> hospitalCollection) {        this.hospitalCollection = hospitalCollection;    }    @Override    public int hashCode() {        int hash = 0;        hash += (addressId != null ? addressId.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 Address)) {            return false;        }        Address other = (Address) object;        if ((this.addressId == null && other.addressId != null) || (this.addressId != null && !this.addressId.equals(other.addressId))) {            return false;        }        return true;    }    @Override    public String toString() {        return "com.horizongroup.mcompanion.web.model.Address[addressId=" + addressId + "]";    }}

⌨️ 快捷键说明

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