package modelo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Persistence;
import javax.persistence.Table;




// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.DA892910-74F3-5721-0720-7AC66DFFEEA0]
// </editor-fold>
@Entity
@Table(name="Excepcion")
public class ExcepcionCU implements Serializable{

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name="Excepcionid")
    //@Column(name="Condicion")

    private Long id;

    private String Condicion;

    private String Terminacion;

    private String tipoAccion;

    private boolean accionActor;

    private boolean Inclusion_Extension;

    private String Texto;

    private int Rendimiento;

    private String Unidad;

    private String nombreActor;

    private String nombreCU;


    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.F697EEB9-1BCD-7591-82E3-A354288865DE]
    // </editor-fold>
//    @OneToOne(mappedBy = "mPasoCU")
//    private PasoCU mPasoCU;

    public ExcepcionCU () {
    }

    public String getCondicion(){

        return Condicion;

    }

    public void setCondicion(String val){

        this.Condicion = val;
    }

    public String getTerminacion(){

        return Terminacion;
    }

    public void setTerminacion(String val){

        this.Terminacion = val;
    }

    public String gettipoAccion(){

        return tipoAccion;
    }

    public void settipoAccion(String val){

        this.tipoAccion = val;
    }

    public boolean getAccionActor(){

        return accionActor;
    }

    public void setAccionActor(boolean val){

        this.accionActor = val;
    }

    public boolean getInclusion_Extension(){

        return Inclusion_Extension;
    }

    public void setInclusion_Extension(boolean val){

        this.Inclusion_Extension = val;
    }

    public String getTexto(){

        return Texto;
    }

    public void setTexto(String val){

        this.Texto = val;
    }

    public int getRendimiento(){

        return Rendimiento;
    }

    public void setRendimiento(int val){

        this.Rendimiento = val;
    }

    public String getUnidad(){

        return Unidad;
    }

    public void setUnidad(String val){

        this.Unidad = val;
    }

    public String getNombreActor(){

        return nombreActor;
    }

    public void setNombreActor(String val){

        this.nombreActor = val;
    }

    public String getNombreCU(){

        return nombreCU;
    }

    public void setNombreCU(String val){

        this.nombreCU = val;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ExcepcionCU other = (ExcepcionCU) obj;
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 97 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        return super.toString();
    }



//    public void persist(Object object) {
//        EntityManagerFactory emf = Persistence.createEntityManagerFactory("Persistencia");
//        EntityManager em = emf.createEntityManager();
//        em.getTransaction().begin();
//        try {
//            em.persist(object);
//            em.getTransaction().commit();
//        } catch (Exception e) {
//            e.printStackTrace();
//            em.getTransaction().rollback();
//        } finally {
//            em.close();
//        }
//    }



}

