All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.epos.handler.dbapi.model.EDMAddress Maven / Gradle / Ivy

package org.epos.handler.dbapi.model;

import javax.persistence.*;
import java.util.Collection;

@Entity
@Table(name = "address")
public class EDMAddress {
    private String id;
    private String country;
    private String countrycode;
    private String street;
    private String postalCode;
    private String locality;
    private Collection facilitiesById;
    private Collection organizationsById;
    private Collection peopleById;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "country")
    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    @Basic
    @Column(name = "countrycode")
    public String getCountrycode() {
        return countrycode;
    }

    public void setCountrycode(String countrycode) {
        this.countrycode = countrycode;
    }

    @Basic
    @Column(name = "street")
    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    @Basic
    @Column(name = "postal_code")
    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    @Basic
    @Column(name = "locality")
    public String getLocality() {
        return locality;
    }

    public void setLocality(String locality) {
        this.locality = locality;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EDMAddress that = (EDMAddress) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (country != null ? !country.equals(that.country) : that.country != null) return false;
        if (street != null ? !street.equals(that.street) : that.street != null) return false;
        if (postalCode != null ? !postalCode.equals(that.postalCode) : that.postalCode != null) return false;
        return locality != null ? locality.equals(that.locality) : that.locality == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (country != null ? country.hashCode() : 0);
        result = 31 * result + (street != null ? street.hashCode() : 0);
        result = 31 * result + (postalCode != null ? postalCode.hashCode() : 0);
        result = 31 * result + (locality != null ? locality.hashCode() : 0);
        return result;
    }

    @OneToMany(mappedBy = "addressByAddressId")
    public Collection getFacilitiesById() {
        return facilitiesById;
    }

    public void setFacilitiesById(Collection facilitiesById) {
        this.facilitiesById = facilitiesById;
    }

    @OneToMany(mappedBy = "addressByAddressId")
    public Collection getOrganizationsById() {
        return organizationsById;
    }

    public void setOrganizationsById(Collection organizationsById) {
        this.organizationsById = organizationsById;
    }

    @OneToMany(mappedBy = "addressByAddressId")
    public Collection getPeopleById() {
        return peopleById;
    }

    public void setPeopleById(Collection peopleById) {
        this.peopleById = peopleById;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy