/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jpa.demo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Administrator
 */
@Embeddable
public class OrderID implements Serializable {

 @Temporal(TemporalType.DATE)
    private Date CreateDate;

    public Date getCreateDate() {
        return CreateDate;
    }

    public void setCreateDate(Date CreateDate) {
        this.CreateDate = CreateDate;
    }

    public long getSN() {
        return SN;
    }

    public void setSN(long SN) {
        this.SN = SN;
    }
    private long  SN;
@Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final OrderID other = (OrderID) obj;
        if (this.CreateDate != other.CreateDate) {
            return false;
        }
        if (this.SN != other.SN) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 1;
        return hash;
    }

    
}
