package com.dla.dda.persistence.model;
// Generated Aug 12, 2016 1:06:47 PM by Hibernate Tools 5.0.0.Final


import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * DdaTContratoPlfAnnioId generated by hbm2java
 */
@Embeddable
public class DdaTContratoPlfAnnioId  implements java.io.Serializable {


     private byte annio;
     private Long idContrato;

    public DdaTContratoPlfAnnioId() {
    }

    public DdaTContratoPlfAnnioId(byte annio, Long idContrato) {
       this.annio = annio;
       this.idContrato = idContrato;
    }
   


    @Column(name="ANNIO", nullable=false, precision=2, scale=0)
    public byte getAnnio() {
        return this.annio;
    }
    
    public void setAnnio(byte annio) {
        this.annio = annio;
    }


    @Column(name="ID_CONTRATO", nullable=false, precision=38, scale=0)
    public Long getIdContrato() {
        return this.idContrato;
    }
    
    public void setIdContrato(Long idContrato) {
        this.idContrato = idContrato;
    }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof DdaTContratoPlfAnnioId) ) return false;
		 DdaTContratoPlfAnnioId castOther = ( DdaTContratoPlfAnnioId ) other; 
         
		 return (this.getAnnio()==castOther.getAnnio())
 && ( (this.getIdContrato()==castOther.getIdContrato()) || ( this.getIdContrato()!=null && castOther.getIdContrato()!=null && this.getIdContrato().equals(castOther.getIdContrato()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + this.getAnnio();
         result = 37 * result + ( getIdContrato() == null ? 0 : this.getIdContrato().hashCode() );
         return result;
   }   


}


