public JwList<AcGlobalAuditLog> getAllById(Collection<Integer> ids) {
   JwList<AcGlobalAuditLog> v = new JwList<AcGlobalAuditLog>();
   for (Integer id : ids) {
     JwSqlSelect st = getSelect();
     st.where().isEqual(ALIAS, ID, id);
     v.addAll(composeList(st));
   }
   return v;
 }
 public JwList<AcUploadDownloadFile> getAllById(Collection<Integer> ids) {
   JwList<AcUploadDownloadFile> v = new JwList<AcUploadDownloadFile>();
   for (Integer id : ids) {
     JwSqlSelect st = getSelect();
     st.where().isEqual(ALIAS, ID, id);
     v.addAll(composeList(st));
   }
   return v;
 }
 private void initializeRemoteTargetDirectory() {
   JwFtpClient logFtpClient = null;
   try {
     logFtpClient = AcFtpClient.getLogFtpClient();
     JwList<String> v = logFtpClient.getDirectoryNames(getTargetRootPath());
     if (!v.contains(getLocalHostname())) logFtpClient.createDir(getTargetLogPath());
   } finally {
     if (logFtpClient != null) logFtpClient.close();
   }
 }
  private JwList<String> getLocalFilenames(String path) {
    File f = new File(path);
    if (!f.exists()) return new JwList<String>();

    JwList<String> v = new JwList<String>();
    for (File e : f.listFiles()) {
      if (e.isFile()) v.add(e.getName());
    }
    return v;
  }
  public void run() {
    if (_currentLog == null) return;
    if (!isLogCopyEnabled()) return;

    initializeTargetDirectory();
    JwList<String> sourceFilenames = getSourceLogFilenames();
    if (sourceFilenames.isEmpty()) return;
    sourceFilenames.remove(_currentLog.getFilename());

    JwList<String> targetFilenames = getTargetLogFilenames();
    JwList<String> missingFilenames = getMissingFilenames(sourceFilenames, targetFilenames);
    copyMissingSourceLogsToTargetLogs(missingFilenames);
  }
  private void copyMissingSourceLogsToTargetLogs(JwList<String> missingFilenames) {
    if (missingFilenames.isEmpty()) return;

    String targetPath = getTargetLogPath();
    String sourcePath = getSourceLogPath();
    if (isFtpEnabled()) ftpMissingLogs(missingFilenames, targetPath, sourcePath);
    else copyMissingLogs(missingFilenames, targetPath, sourcePath);
  }
 public void insertAll(
     JwList<AcScheduledFlightUpload> v,
     boolean insertIds,
     boolean generateIds,
     String onDupColumn) {
   JwList<JwList<AcScheduledFlightUpload>> groups = v.splitByGroupSize(getBatchInsertGroupSize());
   for (JwList<AcScheduledFlightUpload> g : groups)
     _insertAll(g, insertIds, generateIds, onDupColumn);
 }
 public JwSqlInsert _checkAndComposeInsert(AcMobileProfile e) {
   JwList<AcMobileProfile> v;
   v = new JwList<AcMobileProfile>();
   v.add(e);
   return _checkAndComposeInsert(v);
 }
 public void insertAllOnDuplicateKeyUpdateColumnNoChange(
     JwList<AcMobileProfile> v, String onDupColumn) {
   JwList<JwList<AcMobileProfile>> groups = v.splitByGroupSize(getBatchInsertGroupSize());
   for (JwList<AcMobileProfile> g : groups) _insertAll(g, onDupColumn);
 }
Esempio n. 10
0
 public void insertAll(JwList<AcMobileProfile> v) {
   JwList<JwList<AcMobileProfile>> groups = v.splitByGroupSize(getBatchInsertGroupSize());
   String onDupColumn = null;
   for (JwList<AcMobileProfile> g : groups) _insertAll(g, onDupColumn);
 }
 public JwSqlInsert _checkAndComposeInsert(AcUploadDownloadFile e) {
   JwList<AcUploadDownloadFile> v;
   v = new JwList<AcUploadDownloadFile>();
   v.add(e);
   return _checkAndComposeInsert(v, false);
 }
 private JwList<String> getMissingFilenames(
     JwList<String> sourceFilenames, JwList<String> targetFilenames) {
   JwList<String> v = new JwList<String>();
   for (String e : sourceFilenames) if (!targetFilenames.contains(e)) v.add(e);
   return v;
 }
 public JwSqlInsert _checkAndComposeInsert(AcDomesticCandidateRouteTmp e) {
   JwList<AcDomesticCandidateRouteTmp> v;
   v = new JwList<AcDomesticCandidateRouteTmp>();
   v.add(e);
   return _checkAndComposeInsert(v);
 }
 public JwSqlInsert _checkAndComposeInsert(AcGlobalAuditLog e) {
   JwList<AcGlobalAuditLog> v;
   v = new JwList<AcGlobalAuditLog>();
   v.add(e);
   return _checkAndComposeInsert(v, false);
 }
 public void insertAll(
     JwList<AcGlobalAuditLog> v, boolean insertIds, boolean generateIds, String onDupColumn) {
   JwList<JwList<AcGlobalAuditLog>> groups = v.splitByGroupSize(getBatchInsertGroupSize());
   for (JwList<AcGlobalAuditLog> g : groups) _insertAll(g, insertIds, generateIds, onDupColumn);
 }
 public void insertAll(JwList<AcDomesticCandidateRouteTmp> v) {
   JwList<JwList<AcDomesticCandidateRouteTmp>> groups =
       v.splitByGroupSize(getBatchInsertGroupSize());
   String onDupColumn = null;
   for (JwList<AcDomesticCandidateRouteTmp> g : groups) _insertAll(g, onDupColumn);
 }
 public void insertAllOnDuplicateKeyUpdateColumnNoChange(
     JwList<AcDomesticCandidateRouteTmp> v, String onDupColumn) {
   JwList<JwList<AcDomesticCandidateRouteTmp>> groups =
       v.splitByGroupSize(getBatchInsertGroupSize());
   for (JwList<AcDomesticCandidateRouteTmp> g : groups) _insertAll(g, onDupColumn);
 }
 public JwSqlInsert _checkAndComposeInsert(AcScheduledFlightUpload e) {
   JwList<AcScheduledFlightUpload> v;
   v = new JwList<AcScheduledFlightUpload>();
   v.add(e);
   return _checkAndComposeInsert(v, false);
 }
 public boolean composeSg5(AcEdiSegmentAbstract segment, JwList<AcEdiSegmentAbstract> segments) {
   AcEdiUpuResdit10Sg5Model sg5Model = new AcEdiUpuResdit10Sg5Model();
   sg5Model.compose(segment, segments);
   _sg5Models.add(sg5Model);
   return true;
 }
 public void insertAll(
     JwList<AcUploadDownloadFile> v, boolean insertIds, boolean generateIds, String onDupColumn) {
   JwList<JwList<AcUploadDownloadFile>> groups = v.splitByGroupSize(getBatchInsertGroupSize());
   for (JwList<AcUploadDownloadFile> g : groups)
     _insertAll(g, insertIds, generateIds, onDupColumn);
 }