package m05bVehiculosEJB;

import javax.ejb.CreateException;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
import javax.ejb.RemoveException;

import m05bBD.m05bVehiculos;

/**
 * This class is the Bean Implementation for the Entity EJB <tt>M05VehiculosEB</tt>.
 *
 * @see     m05.exe.Vehiculos
 * @see     m05.exe.M05VehiculosEB
 * @see     m05.exe.M05VehiculosEBPK
 * @see     m05.exe.M05VehiculosEBHome
 */

abstract public class m05VehiculosBean implements EntityBean {
    private EntityContext ctx;

      /**
       * This is the static initializer,
       * executed the first time this class is referred to.
       * It makes sure the JDBC JTS driver is loaded.
       */


  /**
   * This is the primary key.
   * It is the clave, which is the primary key
   * in table <tt>m0537t00</tt>.
   */

   /**
   * Returns the Seguro information of this E-EJB.
   */

   public m05bVehiculos getVehiculos(){


    m05bVehiculos vehiculos = new m05bVehiculos();

    vehiculos.setVeh_matricula(getVeh_matricula());
    vehiculos.setVeh_marca(getVeh_marca());
    vehiculos.setVeh_rango(getVeh_rango());
    vehiculos.setVeh_color(getVeh_color());
    vehiculos.setVeh_fmatric(getVeh_fmatric());
    vehiculos.setVeh_vcontab(getVeh_vcontab());
    vehiculos.setVeh_vidautil(getVeh_vidautil());
    vehiculos.setVeh_impbaja(getVeh_impbaja());
    vehiculos.setVeh_desdpto(getVeh_desdpto());
    vehiculos.setVeh_motbaja(getVeh_motbaja());
    vehiculos.setVeh_mesrevis(getVeh_mesrevis());
    vehiculos.setVeh_aparcado(getVeh_aparcado());
    vehiculos.setVeh_observ(getVeh_observ());
    vehiculos.setVeh_kmact(getVeh_kmact());
    vehiculos.setVeh_fkmact(getVeh_fkmact());
    vehiculos.setVeh_fgarantia(getVeh_fgarantia());
    vehiculos.setVeh_expte(getVeh_expte());
    vehiculos.setVeh_nserie(getVeh_nserie());
    vehiculos.setVeh_falta(getVeh_falta());
    vehiculos.setVeh_fbaja(getVeh_fbaja());
    vehiculos.setVeh_poliza(getVeh_poliza());
    vehiculos.setVeh_precio(getVeh_precio());
    vehiculos.setVeh_amoanual(getVeh_amoanual());
    vehiculos.setVeh_situacion(getVeh_situacion());
    vehiculos.setVeh_fadquis(getVeh_fadquis());
    vehiculos.setVeh_destino(getVeh_destino());
    vehiculos.setVeh_autaparc(getVeh_autaparc());
    vehiculos.setVeh_iadic1(getVeh_iadic1());
    vehiculos.setVeh_modelo(getVeh_modelo());
    vehiculos.setVeh_coddpto(getVeh_coddpto());
    vehiculos.setVeh_amoacum(getVeh_amoacum());
    vehiculos.setVeh_regadq(getVeh_regadq());
    vehiculos.setVeh_kmrevis(getVeh_kmrevis());
    vehiculos.setVeh_rotul(getVeh_rotul());
    vehiculos.setVeh_iadic2(getVeh_iadic2());
    vehiculos.setVeh_matricant(getVeh_matricant());
    vehiculos.setVeh_cvfisc(getVeh_cvfisc());
    vehiculos.setVeh_cvreal(getVeh_cvreal());
    vehiculos.setVeh_fbajatemp(getVeh_fbajatemp());
    vehiculos.setVeh_fcedido(getVeh_fcedido());
    
    return vehiculos;
  }


  /**
   * Sets the Seguro information of this E-EJB.
   * @exception P2GException
   *              If the given Seguro <tt>veh_matricula</tt> field
   *              does not match the primary key that is in the E-EJB.
   */

    public void setVehiculos(m05bVehiculos vehiculos)
    throws Exception{

    //the primary key is never modified!!
    if (getVeh_matricula() != vehiculos.getVeh_matricula())
      throw new CreateException ("Cannot modify a different seguro");

          setVeh_matricula(vehiculos.getVeh_matricula());
          setVeh_marca(vehiculos.getVeh_marca());
          setVeh_rango(vehiculos.getVeh_rango());
          setVeh_color(vehiculos.getVeh_color());
          setVeh_fmatric(vehiculos.getVeh_fmatric());
          setVeh_vcontab(vehiculos.getVeh_vcontab());
          setVeh_vidautil(vehiculos.getVeh_vidautil());
          setVeh_impbaja(vehiculos.getVeh_impbaja());
          setVeh_desdpto(vehiculos.getVeh_desdpto());
          setVeh_motbaja(vehiculos.getVeh_motbaja());
          setVeh_mesrevis(vehiculos.getVeh_mesrevis());
          setVeh_aparcado(vehiculos.getVeh_aparcado());
          setVeh_observ(vehiculos.getVeh_observ());
          setVeh_kmact(vehiculos.getVeh_kmact());
          setVeh_fkmact(vehiculos.getVeh_fkmact());
          setVeh_fgarantia(vehiculos.getVeh_fgarantia());
          setVeh_expte(vehiculos.getVeh_expte());
          setVeh_nserie(vehiculos.getVeh_nserie());
          setVeh_falta(vehiculos.getVeh_falta());
          setVeh_fbaja(vehiculos.getVeh_fbaja());
          setVeh_poliza(vehiculos.getVeh_poliza());
          setVeh_precio(vehiculos.getVeh_precio());
          setVeh_amoanual(vehiculos.getVeh_amoanual());
          setVeh_situacion(vehiculos.getVeh_situacion());
          setVeh_fadquis(vehiculos.getVeh_fadquis());
          setVeh_destino(vehiculos.getVeh_destino());
          setVeh_autaparc(vehiculos.getVeh_autaparc());
          setVeh_iadic1(vehiculos.getVeh_iadic1());
          setVeh_modelo(vehiculos.getVeh_modelo());
          setVeh_coddpto(vehiculos.getVeh_coddpto());
          setVeh_amoacum(vehiculos.getVeh_amoacum());
          setVeh_regadq(vehiculos.getVeh_regadq());
          setVeh_kmrevis(vehiculos.getVeh_kmrevis());
          setVeh_rotul(vehiculos.getVeh_rotul());
          setVeh_iadic2(vehiculos.getVeh_iadic2());
          setVeh_matricant(vehiculos.getVeh_matricant());
          setVeh_cvfisc(vehiculos.getVeh_cvfisc());
          setVeh_cvreal(vehiculos.getVeh_cvreal());
          setVeh_fbajatemp(vehiculos.getVeh_fbajatemp());
          setVeh_fcedido(vehiculos.getVeh_fcedido());          

  }

      abstract public String getVeh_matricula();
      abstract public void setVeh_matricula(String n);

      abstract public String getVeh_marca();
      abstract public void setVeh_marca(String n);

      abstract public String getVeh_rango();
      abstract public void setVeh_rango(String n);

      abstract public String getVeh_poliza();
      abstract public void setVeh_poliza(String n);

      abstract public String getVeh_color();
      abstract public void setVeh_color(String n);

      abstract public String getVeh_matricant();
      abstract public void setVeh_matricant(String n);

      abstract public String getVeh_cvfisc();
      abstract public void setVeh_cvfisc(String n);

      abstract public String getVeh_rotul();
      abstract public void setVeh_rotul(String n);

       abstract public String getVeh_fmatric();
      abstract public void setVeh_fmatric(String n);

      abstract public String getVeh_iadic2();
      abstract public void setVeh_iadic2(String n);

      abstract public String getVeh_iadic1();
      abstract public void setVeh_iadic1(String n);

      abstract public String getVeh_modelo();
      abstract public void setVeh_modelo(String n);

      abstract public String getVeh_precio();
      abstract public void setVeh_precio(String n);

      abstract public String getVeh_fbaja();
      abstract public void setVeh_fbaja(String n);

      abstract public String getVeh_destino();
      abstract public void setVeh_destino(String n);

      abstract public String getVeh_kmrevis();
      abstract public void setVeh_kmrevis(String n);

      abstract public String getVeh_vidautil();
      abstract public void setVeh_vidautil(String n);

      abstract public String getVeh_mesrevis();
      abstract public void setVeh_mesrevis(String n);

      abstract public String getVeh_aparcado();
      abstract public void setVeh_aparcado(String n);

      abstract public String getVeh_situacion();
      abstract public void setVeh_situacion(String n);

      abstract public String getVeh_falta();
      abstract public void setVeh_falta(String n);

      abstract public String getVeh_kmact();
      abstract public void setVeh_kmact(String n);

      abstract public String getVeh_fkmact();
      abstract public void setVeh_fkmact(String n);

      abstract public String getVeh_fgarantia();
      abstract public void setVeh_fgarantia(String n);

      abstract public String getVeh_nserie();
      abstract public void setVeh_nserie(String n);

       abstract public String getVeh_observ();
      abstract public void setVeh_observ(String n);

      abstract public String getVeh_expte();
      abstract public void setVeh_expte(String n);

      abstract public String getVeh_motbaja();
      abstract public void setVeh_motbaja(String n);

      abstract public String getVeh_amoacum();
      abstract public void setVeh_amoacum(String n);

      abstract public String getVeh_amoanual();
      abstract public void setVeh_amoanual(String n);

      abstract public String getVeh_vcontab();
      abstract public void setVeh_vcontab(String n);

      abstract public String getVeh_impbaja();
      abstract public void setVeh_impbaja(String n);

      abstract public String getVeh_desdpto();
      abstract public void setVeh_desdpto(String n);

      abstract public String getVeh_autaparc();
      abstract public void setVeh_autaparc(String n);

      abstract public String getVeh_fadquis();
      abstract public void setVeh_fadquis(String n);

      abstract public String getVeh_coddpto();
      abstract public void setVeh_coddpto(String n);

      abstract public String getVeh_regadq();
      abstract public void setVeh_regadq(String n);
      
      abstract public String getVeh_cvreal();
      abstract public void setVeh_cvreal(String n);

      abstract public String getVeh_fbajatemp();
      abstract public void setVeh_fbajatemp(String n);
      
      abstract public String getVeh_fcedido();
      abstract public void setVeh_fcedido(String n);


    public void ejbActivate() {
    }

    public void ejbPassivate() {
    }

    public void setEntityContext(EntityContext ctx) {
      this.ctx = ctx;
    }

    public void unsetEntityContext() {
      this.ctx = null;
    }

    public void ejbLoad() {
    }

    public void ejbStore() {
    }

    public void ejbRemove()
      throws RemoveException
    {
    }

    /**
       * This function initializes the Seguro
       * information of this E-EJB.
       * It assigns a new primary key to the Seguro.
       */
    public m05VehiculosPK ejbCreate(m05bVehiculos vehiculos) throws CreateException
      {
        try {
          setVeh_matricula(vehiculos.getVeh_matricula());
        } catch (Exception e) {
          throw new CreateException (e.getMessage());
        }
        setVeh_marca(vehiculos.getVeh_marca());
          setVeh_rango(vehiculos.getVeh_rango());
          setVeh_color(vehiculos.getVeh_color());
          setVeh_fmatric(vehiculos.getVeh_fmatric());
          setVeh_vcontab(vehiculos.getVeh_vcontab());
          setVeh_vidautil(vehiculos.getVeh_vidautil());
          setVeh_impbaja(vehiculos.getVeh_impbaja());
          setVeh_desdpto(vehiculos.getVeh_desdpto());
          setVeh_motbaja(vehiculos.getVeh_motbaja());
          setVeh_mesrevis(vehiculos.getVeh_mesrevis());
          setVeh_aparcado(vehiculos.getVeh_aparcado());
          setVeh_observ(vehiculos.getVeh_observ());
          setVeh_kmact(vehiculos.getVeh_kmact());
          setVeh_fkmact(vehiculos.getVeh_fkmact());
          setVeh_fgarantia(vehiculos.getVeh_fgarantia());
          setVeh_expte(vehiculos.getVeh_expte());
          setVeh_nserie(vehiculos.getVeh_nserie());
          setVeh_falta(vehiculos.getVeh_falta());
          setVeh_fbaja(vehiculos.getVeh_fbaja());
          setVeh_poliza(vehiculos.getVeh_poliza());
          setVeh_precio(vehiculos.getVeh_precio());
          setVeh_amoanual(vehiculos.getVeh_amoanual());
          setVeh_situacion(vehiculos.getVeh_situacion());
          setVeh_fadquis(vehiculos.getVeh_fadquis());
          setVeh_destino(vehiculos.getVeh_destino());
          setVeh_autaparc(vehiculos.getVeh_autaparc());
          setVeh_iadic1(vehiculos.getVeh_iadic1());
          setVeh_modelo(vehiculos.getVeh_modelo());
          setVeh_coddpto(vehiculos.getVeh_coddpto());
          setVeh_amoacum(vehiculos.getVeh_amoacum());
          setVeh_regadq(vehiculos.getVeh_regadq());
          setVeh_kmrevis(vehiculos.getVeh_kmrevis());
          setVeh_rotul(vehiculos.getVeh_rotul());
          setVeh_iadic2(vehiculos.getVeh_iadic2());
          setVeh_matricant(vehiculos.getVeh_matricant());
          setVeh_cvfisc(vehiculos.getVeh_cvfisc());
          setVeh_cvreal(vehiculos.getVeh_cvreal());
          setVeh_fbajatemp(vehiculos.getVeh_fbajatemp());
          setVeh_fcedido(vehiculos.getVeh_fcedido());          
          
        return null;
      }


  public void ejbPostCreate(m05bVehiculos vehiculos)
    {
    }
}









