/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.qsoft.rs.sincoar.model;

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

/**
 *
 * @author developer2
 */
@Embeddable
public class TgeneschedulelogPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "EVENTCODE")
    private String eventcode;
    @Basic(optional = false)
    @Column(name = "REALDATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date realdate;

    public TgeneschedulelogPK() {
    }

    public TgeneschedulelogPK(String eventcode, Date realdate) {
        this.eventcode = eventcode;
        this.realdate = realdate;
    }

    public String getEventcode() {
        return eventcode;
    }

    public void setEventcode(String eventcode) {
        this.eventcode = eventcode;
    }

    public Date getRealdate() {
        return realdate;
    }

    public void setRealdate(Date realdate) {
        this.realdate = realdate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (eventcode != null ? eventcode.hashCode() : 0);
        hash += (realdate != null ? realdate.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 TgeneschedulelogPK)) {
            return false;
        }
        TgeneschedulelogPK other = (TgeneschedulelogPK) object;
        if ((this.eventcode == null && other.eventcode != null) || (this.eventcode != null && !this.eventcode.equals(other.eventcode))) {
            return false;
        }
        if ((this.realdate == null && other.realdate != null) || (this.realdate != null && !this.realdate.equals(other.realdate))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgeneschedulelogPK[ eventcode=" + eventcode + ", realdate=" + realdate + " ]";
    }
    
}
