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;

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


     private DdaTContratoPtrsPrecioId id;
     private DdaTContratoPtrans ddaTContratoPtrans;
     private String precio;

    public DdaTContratoPtrsPrecio() {
    }

	
    public DdaTContratoPtrsPrecio(DdaTContratoPtrsPrecioId id, DdaTContratoPtrans ddaTContratoPtrans) {
        this.id = id;
        this.ddaTContratoPtrans = ddaTContratoPtrans;
    }
    public DdaTContratoPtrsPrecio(DdaTContratoPtrsPrecioId id, DdaTContratoPtrans ddaTContratoPtrans, String precio) {
       this.id = id;
       this.ddaTContratoPtrans = ddaTContratoPtrans;
       this.precio = precio;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="idCategoria", column=@Column(name="ID_CATEGORIA", nullable=false, precision=2, scale=0) ), 
        @AttributeOverride(name="idContratoPtrans", column=@Column(name="ID_CONTRATO_PTRANS", nullable=false, precision=38, scale=0) ) } )
    public DdaTContratoPtrsPrecioId getId() {
        return this.id;
    }
    
    public void setId(DdaTContratoPtrsPrecioId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="ID_CONTRATO_PTRANS", nullable=false, insertable=false, updatable=false)
    public DdaTContratoPtrans getDdaTContratoPtrans() {
        return this.ddaTContratoPtrans;
    }
    
    public void setDdaTContratoPtrans(DdaTContratoPtrans ddaTContratoPtrans) {
        this.ddaTContratoPtrans = ddaTContratoPtrans;
    }

    
    @Column(name="PRECIO", length=25)
    public String getPrecio() {
        return this.precio;
    }
    
    public void setPrecio(String precio) {
        this.precio = precio;
    }




}


