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;

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


     private long idContrato;
     private String posicion;

    public DdaTContratoSapId() {
    }

    public DdaTContratoSapId(long idContrato, String posicion) {
       this.idContrato = idContrato;
       this.posicion = posicion;
    }
   


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


    @Column(name="POSICION", nullable=false, length=5)
    public String getPosicion() {
        return this.posicion;
    }
    
    public void setPosicion(String posicion) {
        this.posicion = posicion;
    }


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


}


