Ejemplo n.º 1
0
  public EntityBean create(EntityBean eb) {
    ItemDataBean idb = (ItemDataBean) eb;
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(idb.getEventCRFId()));
    variables.put(new Integer(2), new Integer(idb.getItemId()));
    variables.put(new Integer(3), new Integer(idb.getStatus().getId()));
    variables.put(new Integer(4), idb.getValue());
    variables.put(new Integer(5), new Integer(idb.getOwnerId()));
    this.execute(digester.getQuery("create"), variables);

    if (isQuerySuccessful()) {
      idb.setId(getCurrentPK());
    }

    return idb;
  }
Ejemplo n.º 2
0
  public EntityBean update(EntityBean eb) {
    ItemDataBean idb = (ItemDataBean) eb;

    idb.setActive(false);

    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(idb.getEventCRFId()));
    variables.put(new Integer(2), new Integer(idb.getItemId()));
    variables.put(new Integer(3), new Integer(idb.getStatus().getId()));
    variables.put(new Integer(4), idb.getValue());
    variables.put(new Integer(5), new Integer(idb.getUpdaterId()));
    variables.put(new Integer(6), new Integer(idb.getId()));
    this.execute(digester.getQuery("update"), variables);

    if (isQuerySuccessful()) {
      idb.setActive(true);
    }

    return idb;
  }