/*
 * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.sun.ts.tests.jpa.core.annotations.orderby;

import javax.persistence.Embeddable;
import java.math.BigInteger;

@Embeddable
public class ZipCode implements java.io.Serializable{

    protected String zip;

    public ZipCode(){
    }

    public ZipCode(String zip) {
        this.zip = zip;
    }

    public String getZip() {
        return zip;
    }

    public void setZip(String zip) {
        this.zip = zip;
    }

    public boolean equals(Object o) {
        ZipCode other;
        boolean result = false;

        if (!(o instanceof Address)) {
            return result;
        }
        other = (ZipCode) o;

        if (this.getZip() == other.getZip()) {
            result = true;
        }

        return result;
    }


    public int hashCode() {
        int myHash;

        myHash = this.getZip().hashCode();

        return myHash;
    }
}
