I was looking at the code to FileListEntityProcessor. In the nextRow
method, the following variables are repeatedly evaluated for every file
returned. Does anyone understand the use case why this would be, and why
they just cannot be evaluated once during initialization?

I've seen a couple of examples where NOW is used in the newThan or
olderThan parameters. But if these are constantly changing during the run,
it seems like you would get inconsistent results as the time windows are
moving during the import. Especially, if the import lasts for days at a
time.


 @Override
  public Map<String, Object> nextRow() {
    if (rowIterator != null)
      return getNext();
    List<Map<String, Object>> fileDetails = new ArrayList<Map<String,
Object>>();
    File dir = new File(baseDir);

    String dateStr = context.getEntityAttribute(NEWER_THAN);
    newerThan = getDate(dateStr);
    dateStr = context.getEntityAttribute(OLDER_THAN);
    olderThan = getDate(dateStr);
    String biggerThanStr = context.getEntityAttribute(BIGGER_THAN);
    if (biggerThanStr != null)
      biggerThan = getSize(biggerThanStr);
    String smallerThanStr = context.getEntityAttribute(SMALLER_THAN);
    if (smallerThanStr != null)
      smallerThan = getSize(smallerThanStr);

    getFolderFiles(dir, fileDetails);
    rowIterator = fileDetails.iterator();
    return getNext();
  }

------------------------------
This e-mail and any files transmitted with it may be proprietary.  Please note 
that any views or opinions presented in this e-mail are solely those of the 
author and do not necessarily represent those of Apogee Integration.

Reply via email to