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

import m05bBD.m05bHisTarjetas;
/**
 * This class is the Bean Implementation for the Entity EJB <tt>M05TarjetasEB</tt>.
 *
 * @see     m05.exe.Tarjetas
 * @see     m05.exe.M05TarjetasEB
 * @see     m05.exe.M05TarjetasEBPK
 * @see     m05.exe.M05TarjetasEBHome
 */
abstract public class m05HisTarjetasBean implements EntityBean {
  private EntityContext ctx;
 
  /**
   * This is the primary key.
   * It is the clave, which is the primary key
   * in table <tt>m0531t00</tt>.
   */
  /**
   * Returns the Seguro information of this E-EJB.
   */
  public m05bHisTarjetas getTarjetas(){
    m05bHisTarjetas tarjetas = new m05bHisTarjetas();
    tarjetas.setTar_hisnumero(getTar_hisnumero());
    tarjetas.setTar_numero(getTar_numero());
    tarjetas.setTar_matricula(getTar_matricula());
    tarjetas.setTar_centro(getTar_centro());
    tarjetas.setTar_limite(getTar_limite());
    tarjetas.setTar_falta(getTar_falta());
    tarjetas.setTar_fbaja(getTar_fbaja());
    tarjetas.setTar_fsolic(getTar_fsolic());
    tarjetas.setTar_fcaduc(getTar_fcaduc());
    tarjetas.setTar_literal(getTar_literal());
    tarjetas.setTar_fexped(getTar_fexped());
    tarjetas.setTar_banco(getTar_banco());
    tarjetas.setTar_plastic(getTar_plastic());
    tarjetas.setTar_situacion(getTar_situacion());
    tarjetas.setTar_incidencia(getTar_incidencia());
    tarjetas.setTar_tag(getTar_tag());
    tarjetas.setTar_tipo(getTar_tipo());
    
    return tarjetas;
  }
  /**
   * Sets the Seguro information of this E-EJB.
   * @exception P2GException
   *              If the given Seguro <tt>seg_codigo</tt> field
   *              does not match the primary key that is in the E-EJB.
   */
  public void setTarjetas(m05bHisTarjetas tarjetas)
    throws Exception{
    //the primary key is never modified!!
    if (getTar_hisnumero() != tarjetas.getTar_hisnumero())
      throw new CreateException ("Cannot modify a different tarjetas");
    setTar_numero(tarjetas.getTar_numero());
    setTar_matricula(tarjetas.getTar_matricula());
    setTar_centro(tarjetas.getTar_centro());
    setTar_limite(tarjetas.getTar_limite());
    setTar_falta(tarjetas.getTar_falta());
    setTar_fbaja(tarjetas.getTar_fbaja());
    setTar_fsolic(tarjetas.getTar_fsolic());
    setTar_fcaduc(tarjetas.getTar_fcaduc());
    setTar_fexped(tarjetas.getTar_fexped());
    setTar_literal(tarjetas.getTar_literal());
    setTar_banco(tarjetas.getTar_banco());
    setTar_plastic(tarjetas.getTar_plastic());
    setTar_situacion(tarjetas.getTar_situacion());
    setTar_incidencia(tarjetas.getTar_incidencia());
    setTar_tag(tarjetas.getTar_tag());
    setTar_tipo(tarjetas.getTar_tipo());
    
  }

  abstract public String getTar_hisnumero();
  abstract public void setTar_hisnumero(String n);

  abstract public String getTar_numero();
  abstract public void setTar_numero(String n);

  abstract public String getTar_matricula();
  abstract public void setTar_matricula(String n);

  abstract public String getTar_centro();
  abstract public void setTar_centro(String n);

  abstract public String getTar_limite();
  abstract public void setTar_limite(String n);

  abstract public String getTar_falta();
  abstract public void setTar_falta(String n);

  abstract public String getTar_fbaja();
  abstract public void setTar_fbaja(String n);

  abstract public String getTar_fsolic();
  abstract public void setTar_fsolic(String n);

  abstract public String getTar_fcaduc();
  abstract public void setTar_fcaduc(String n);

  abstract public String getTar_fexped();
  abstract public void setTar_fexped(String n);

  abstract public String getTar_literal();
  abstract public void setTar_literal(String n);

  abstract public String getTar_banco();
  abstract public void setTar_banco(String n);

  abstract public String getTar_plastic();
  abstract public void setTar_plastic(String n);

  abstract public String getTar_situacion();
  abstract public void setTar_situacion(String n);

  abstract public String getTar_incidencia();
  abstract public void setTar_incidencia(String n);

  abstract public String getTar_tag();
  abstract public void setTar_tag(String n);

  abstract public String getTar_tipo();
  abstract public void setTar_tipo(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 Tarjetas
   * information of this E-EJB.
   * It assigns a new primary key to the Tarjetas.
   */
  public m05HisTarjetasPK ejbCreate(m05bHisTarjetas tarjetas)
    throws CreateException
  {
    try {
      setTar_hisnumero(tarjetas.getTar_hisnumero());
    } catch (Exception e) {
      throw new CreateException (e.getMessage());
    }
    setTar_numero(tarjetas.getTar_numero());
    setTar_matricula(tarjetas.getTar_matricula());
    setTar_centro(tarjetas.getTar_centro());
    setTar_limite(tarjetas.getTar_limite());
    setTar_falta(tarjetas.getTar_falta());
    setTar_fbaja(tarjetas.getTar_fbaja());
    setTar_fsolic(tarjetas.getTar_fsolic());
    setTar_fcaduc(tarjetas.getTar_fcaduc());
    setTar_literal(tarjetas.getTar_literal());
    setTar_banco(tarjetas.getTar_banco());
    setTar_plastic(tarjetas.getTar_plastic());
    setTar_situacion(tarjetas.getTar_situacion());
    setTar_incidencia(tarjetas.getTar_incidencia());
    setTar_tag(tarjetas.getTar_tag());
    setTar_tipo(tarjetas.getTar_tipo());

    return null;
  }

  public void ejbPostCreate(m05bHisTarjetas tarjetas)
  {
  }


}


