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;

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


     private long idContratoPtrans;
     private byte idCategoria;
     private String tipoTitulo;

    public DdaTContratoPtrsCatId() {
    }

    public DdaTContratoPtrsCatId(long idContratoPtrans, byte idCategoria, String tipoTitulo) {
       this.idContratoPtrans = idContratoPtrans;
       this.idCategoria = idCategoria;
       this.tipoTitulo = tipoTitulo;
    }
   


    @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="ID_CATEGORIA", nullable=false, precision=2, scale=0)
    public byte getIdCategoria() {
        return this.idCategoria;
    }
    
    public void setIdCategoria(byte idCategoria) {
        this.idCategoria = idCategoria;
    }


    @Column(name="TIPO_TITULO", nullable=false, length=8)
    public String getTipoTitulo() {
        return this.tipoTitulo;
    }
    
    public void setTipoTitulo(String tipoTitulo) {
        this.tipoTitulo = tipoTitulo;
    }


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


}


