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;

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


     private Long idContratoPtrans;
     private String annio;

    public DdaTContratoPtAnnioId() {
    }

    public DdaTContratoPtAnnioId(Long idContratoPtrans, String annio) {
       this.idContratoPtrans = idContratoPtrans;
       this.annio = annio;
    }
   


    @Column(name="ID_CONTRATO_PTRANS", nullable=false, precision=38, scale=0)
    public Long getIdContratoPtrans() {
        return this.idContratoPtrans;
    }
    
    public void setIdContratoPtrans(Long idContratoPtrans) {
        this.idContratoPtrans = idContratoPtrans;
    }


    @Column(name="ANNIO", nullable=false, length=2)
    public String getAnnio() {
        return this.annio;
    }
    
    public void setAnnio(String annio) {
        this.annio = annio;
    }


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


}


