package com.sun.ts.tests.jpa.core.override.joincolumn;

import java.io.Serializable;

public class CubiclePK implements Serializable {

    private Integer id;
    private String location;

    public CubiclePK() {
    }

    public Integer getId() {
        return id;
    }

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

    public int hashCode() {
        int hash = 0;
        hash += (this.getId() != null ? this.getId().hashCode() : 0);
        hash += (this.getLocation() != null ? this.getLocation().hashCode() : 0);
        return hash;
    }

    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CubiclePK)) {
            return false;
        }
        CubiclePK other = (CubiclePK) object;
        if (this.getId() != other.getId() && (this.getId() == null ||
                !this.getId().equals(other.getId()))) {
            return false;
        }
        if (this.getLocation() != other.getLocation() &&
                (this.getLocation() == null ||
                !this.getLocation().equals(other.getLocation()))) {
            return false;
        }
        return true;
    }

    public String toString() {
        return "com.sun.ts.tests.jpa.core.override.joincolumn." +
                "CubiclePK[id=" + getId() + " - " + getLocation() + "]";
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
}
