コード例 #1
0
 public JwSqlUpdate composeUpdate(AcDomesticCandidateRouteTmp e) {
   JwSqlUpdate st = createUpdate();
   st.setTable(TABLE);
   st.setValue(CREATED_UTC_TS, e.getCreatedUtcTs());
   st.setValue(BLOCK_BEGIN_UTC_DT, e.getBlockBeginUtcDt());
   st.setValue(BLOCK_END_UTC_DT, e.getBlockEndUtcDt());
   st.setValue(ROUTE_BEGIN_UTC_DT, e.getRouteBeginUtcDt());
   st.setValue(ROUTE_END_UTC_DT, e.getRouteEndUtcDt());
   st.setValue(ERROR, e.hasError() ? e.getError().getCode() : null);
   st.where().isEqual(LOGIN, e.getLogin());
   return st;
 }
コード例 #2
0
  public JwSqlInsert _checkAndComposeInsert(JwList<AcDomesticCandidateRouteTmp> v) {
    for (AcDomesticCandidateRouteTmp e : v) {
      defaultUpdateCount(e);
      e.validate();
      verifyNoMatching(e);
    }

    JwSqlInsert st = createInsert();
    st.setTable(TABLE);
    populateInsertColumns(st);

    for (AcDomesticCandidateRouteTmp e : v) {
      st.startNewRow();
      st.addStringValue(e.getLogin());
      st.addTimestampValue(e.getCreatedUtcTs());
      st.addDateValue(e.getBlockBeginUtcDt());
      st.addDateValue(e.getBlockEndUtcDt());
      st.addDateValue(e.getRouteBeginUtcDt());
      st.addDateValue(e.getRouteEndUtcDt());
      st.addIntegerValue(e.hasError() ? e.getError().getCode() : null);
    }
    return st;
  }