コード例 #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;
  }
コード例 #2
0
  private ItemDataBean copyItemDataBean(ItemDataBean src) {
    ItemDataBean result = new ItemDataBean();
    result.setEventCRFId(src.getEventCRFId());
    result.setItemId(src.getItemId());
    result.setValue(src.getValue());
    result.setOrdinal(src.getOrdinal());
    result.setSelected(src.isSelected());
    result.setAuditLog(src.isAuditLog());
    result.setCreatedDate(src.getCreatedDate());
    result.setUpdatedDate(src.getUpdatedDate());
    result.setOwner(src.getOwner());
    result.setOwnerId(src.getOwnerId());
    result.setUpdater(src.getUpdater());
    result.setUpdaterId(src.getUpdaterId());
    result.setStatus(src.getStatus());

    return result;
  }