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;

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


     private long idContrato;
     private short idTerritorio;

    public DdaTContratoTerritorioId() {
    }

    public DdaTContratoTerritorioId(long idContrato, short idTerritorio) {
       this.idContrato = idContrato;
       this.idTerritorio = idTerritorio;
    }
   


    @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="ID_TERRITORIO", nullable=false, precision=3, scale=0)
    public short getIdTerritorio() {
        return this.idTerritorio;
    }
    
    public void setIdTerritorio(short idTerritorio) {
        this.idTerritorio = idTerritorio;
    }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof DdaTContratoTerritorioId) ) return false;
		 DdaTContratoTerritorioId castOther = ( DdaTContratoTerritorioId ) other; 
         
		 return (this.getIdContrato()==castOther.getIdContrato())
 && (this.getIdTerritorio()==castOther.getIdTerritorio());
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + (int) this.getIdContrato();
         result = 37 * result + this.getIdTerritorio();
         return result;
   }   


}


