Beispiel #1
0
  /**
   * 获取一份新的数据
   *
   * @param idStep
   * @return
   */
  protected Network genInfoCopy(int idStep) {
    Network result = new Network();
    result.setId(_info.getId() + idStep);
    result.setUserId(_info.getUserId());
    result.setStage(_info.getStage());
    result.setNetworkId(_info.getNetworkId() + idStep);
    result.setNetworkName(_info.getNetworkName() + ".new");
    result.setInfoId(_info.getInfoId());
    result.setJoinTime(_info.getJoinTime());
    result.setStatus(_info.getStatus() + idStep);

    return result;
  }
Beispiel #2
0
 protected void setDBAndInfos(int recordId, Network info) {
   String sql =
       "replace into network_history(id,userid,stage,network_id,network_name,info_id,join_time,status) values ("
           + recordId
           + ","
           + info.getUserId()
           + ","
           + info.getStage()
           + ","
           + info.getNetworkId()
           + ",'"
           + info.getNetworkName()
           + "',"
           + info.getInfoId()
           + ",'"
           + DateFormatter.format(info.getJoinTime())
           + "',"
           + info.getStatus()
           + ")";
   writeDB(sql);
   _infos.add(info);
 }