コード例 #1
0
 public void _insertAll(
     JwList<AcUploadDownloadFile> v, boolean insertIds, boolean generateIds, String onDupColumn) {
   JwSqlInsert st = _checkAndComposeInsert(v, insertIds);
   st.onDuplicateKeyUpdateColumnNoChange(onDupColumn);
   if (generateIds) executeIntegerKeys(st, v);
   else execute(st);
 }
コード例 #2
0
  public JwSqlInsert _checkAndComposeInsert(JwList<AcGlobalAuditLog> v, boolean insertIds) {
    for (AcGlobalAuditLog e : v) {
      defaultUpdateCount(e);
      e.validate();
      verifyNoMatching(e);
    }

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

    for (AcGlobalAuditLog e : v) {
      st.startNewRow();
      if (insertIds) st.addIntegerValue(e.getId());
      st.addTimestampValue(e.getModifiedUtcTs());
      st.addStringValue(e.getUser());
      st.addIntegerValue(e.getType());
      st.addStringValue(e.getTypeName());
      st.addStringValue(e.getSubject1());
      st.addStringValue(e.getSubject2());
      st.addStringValue(e.getSubject3());
      st.addStringValue(e.getOldValue());
      st.addStringValue(e.getNewValue());
    }
    return st;
  }
コード例 #3
0
 public Integer insertOnDuplicateKeyUpdateColumnNoChange(AcGlobalAuditLog e, String onDupColumn) {
   JwSqlInsert st = _checkAndComposeInsert(e);
   st.onDuplicateKeyUpdateColumnNoChange(onDupColumn);
   Integer id = executeIntegerId(st);
   if (id == null) error("Unable to insert AcGlobalAuditLog.  Reason unknown.");
   return id;
 }
コード例 #4
0
  public JwSqlInsert _checkAndComposeInsert(JwList<AcMobileProfile> v) {
    for (AcMobileProfile e : v) {
      defaultUpdateCount(e);
      e.validate();
      verifyNoMatching(e);
    }

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

    for (AcMobileProfile e : v) {
      st.startNewRow();
      st.addStringValue(e.getName());
    }
    return st;
  }
コード例 #5
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;
  }
コード例 #6
0
  public JwSqlInsert _checkAndComposeInsert(JwList<AcUploadDownloadFile> v, boolean insertIds) {
    for (AcUploadDownloadFile e : v) {
      defaultUpdateCount(e);
      e.validate();
      verifyNoMatching(e);
    }

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

    for (AcUploadDownloadFile e : v) {
      st.startNewRow();
      if (insertIds) st.addIntegerValue(e.getId());
      st.addStringValue(JwUtility.truncate(e.getPath(), PATH_MAX_LENGTH, true));
      st.addStringValue(JwUtility.truncate(e.getFileName(), FILE_NAME_MAX_LENGTH, true));
      st.addStringValue(JwUtility.truncate(e.getDescription(), DESCRIPTION_MAX_LENGTH, true));
      st.addTimestampValue(e.getCreatedUtcTs());
    }
    return st;
  }
コード例 #7
0
 public void _insertAll(JwList<AcDomesticCandidateRouteTmp> v, String onDupColumn) {
   JwSqlInsert st = _checkAndComposeInsert(v);
   st.onDuplicateKeyUpdateColumnNoChange(onDupColumn);
   execute(st);
 }
コード例 #8
0
 public void _insertAll(JwList<AcMobileProfile> v, String onDupColumn) {
   JwSqlInsert st = _checkAndComposeInsert(v);
   st.onDuplicateKeyUpdateColumnNoChange(onDupColumn);
   execute(st);
 }
コード例 #9
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;
  }