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;

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


     private long idApartado;
     private Long idEstudio;

    public DdaTEstudioApartadoId() {
    }

    public DdaTEstudioApartadoId(long idApartado, Long idEstudio) {
       this.idApartado = idApartado;
       this.idEstudio = idEstudio;
    }
   


    @Column(name="ID_APARTADO", nullable=false, precision=38, scale=0)
    public long getIdApartado() {
        return this.idApartado;
    }
    
    public void setIdApartado(long idApartado) {
        this.idApartado = idApartado;
    }


    @Column(name="ID_ESTUDIO", nullable=false, precision=38, scale=0)
    public Long getIdEstudio() {
        return this.idEstudio;
    }
    
    public void setIdEstudio(Long idEstudio) {
        this.idEstudio = idEstudio;
    }


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


}


