コード例 #1
0
  public JwSqlInsert _checkAndComposeInsert(JwList<AcScheduledFlightUpload> v, boolean insertIds) {
    for (AcScheduledFlightUpload e : v) {
      defaultUpdateCount(e);
      e.validate();
      verifyNoMatching(e);
    }

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

    for (AcScheduledFlightUpload e : v) {
      st.startNewRow();
      if (insertIds) st.addIntegerValue(e.getId());
      st.addStringValue(e.getOperatorCarrierCode());
      st.addStringValue(e.getOperatorNumber());
      st.addStringValue(e.getRelationship().getCode());
      st.addStringValue(e.getOriginAirportCode());
      st.addStringValue(e.getDestinationAirportCode());
      st.addTimeValue(e.getDepartureLocalTm());
      st.addTimeValue(e.getArrivalLocalTm());
      st.addIntegerValue(e.getDayOffset());
      st.addDateValue(e.getBoundingStartLocalDt());
      st.addDateValue(e.getBoundingEndLocalDt());
      st.addDayFrequencyValue(e.getFrequency());
      st.addStringValue(e.getEquipmentCode());
      st.addStringValue(e.getSource().getCode());
      st.addStringValue(e.hasAbsoluteSource() ? e.getAbsoluteSource().getCode() : null);
      st.addBooleanValue(e.getCancel());
      st.addTimestampValue(e.getCreatedUtcTs());
      st.addIntegerValue(e.getSequence());
    }
    return st;
  }
コード例 #2
0
 public void update(AcScheduledFlightUpload e) {
   e.validate();
   JwSqlUpdate st = composeUpdate(e);
   int i = execute(st);
   if (i != 1) error("Unable to update AcScheduledFlightUpload.  Rows updated: %s.", i);
 }