package com.dla.dda.persistence.model;
// Generated Aug 12, 2016 1:06:47 PM by Hibernate Tools 5.0.0.Final


import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * DdaTContratoTerritorio generated by hbm2java
 */
@Entity
@Table(name="DDA_T_CONTRATO_TERRITORIO"
)
public class DdaTContratoTerritorio  implements java.io.Serializable {


     private DdaTContratoTerritorioId id;
     private DdaTContrato ddaTContrato;

    public DdaTContratoTerritorio() {
    }

    public DdaTContratoTerritorio(DdaTContratoTerritorioId id, DdaTContrato ddaTContrato) {
       this.id = id;
       this.ddaTContrato = ddaTContrato;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="idContrato", column=@Column(name="ID_CONTRATO", nullable=false, precision=38, scale=0) ), 
        @AttributeOverride(name="idTerritorio", column=@Column(name="ID_TERRITORIO", nullable=false, precision=3, scale=0) ) } )
    public DdaTContratoTerritorioId getId() {
        return this.id;
    }
    
    public void setId(DdaTContratoTerritorioId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_CONTRATO", nullable=false, insertable=false, updatable=false)
    public DdaTContrato getDdaTContrato() {
        return this.ddaTContrato;
    }
    
    public void setDdaTContrato(DdaTContrato ddaTContrato) {
        this.ddaTContrato = ddaTContrato;
    }




}


