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;

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


     private DdaTEstudioApartadoId id;
     private DdaTApartado ddaTApartado;

    public DdaTEstudioApartado() {
    }

    public DdaTEstudioApartado(DdaTEstudioApartadoId id, DdaTApartado ddaTApartado) {
       this.id = id;
       this.ddaTApartado = ddaTApartado;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="idApartado", column=@Column(name="ID_APARTADO", nullable=false, precision=38, scale=0) ), 
        @AttributeOverride(name="idEstudio", column=@Column(name="ID_ESTUDIO", nullable=false, precision=38, scale=0) ) } )
    public DdaTEstudioApartadoId getId() {
        return this.id;
    }
    
    public void setId(DdaTEstudioApartadoId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_APARTADO", nullable=false, insertable=false, updatable=false)
    public DdaTApartado getDdaTApartado() {
        return this.ddaTApartado;
    }
    
    public void setDdaTApartado(DdaTApartado ddaTApartado) {
        this.ddaTApartado = ddaTApartado;
    }




}


