Subversion Repositories SmartDukaan

Rev

Rev 4685 | Rev 4777 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4685 Rev 4775
Line 486... Line 486...
486
        return true;
486
        return true;
487
    }
487
    }
488
 
488
 
489
    private void populateEntityIdItemMap() {
489
    private void populateEntityIdItemMap() {
490
        Date todate = new Date();
490
        Date todate = new Date();
-
 
491
        Utils.info("Processing " + items.size() + " items");
491
        for (Item item : items) {
492
        for (Item item : items) {
492
            // TODO Can be removed as we are checking in calling function
493
            // TODO Can be removed as we are checking in calling function
493
            if (!(item.getItemStatus() == status.ACTIVE
494
            if (!(item.getItemStatus() == status.ACTIVE
494
                    || item.getItemStatus() == status.CONTENT_COMPLETE || item
495
                    || item.getItemStatus() == status.CONTENT_COMPLETE || item
495
                    .getItemStatus() == status.PAUSED)) {
496
                    .getItemStatus() == status.PAUSED)) {
Line 505... Line 506...
505
            }
506
            }
506
            itemList.add(item);
507
            itemList.add(item);
507
            entityIdItemMap.put(item.getCatalogItemId(), itemList);
508
            entityIdItemMap.put(item.getCatalogItemId(), itemList);
508
        }
509
        }
509
 
510
 
-
 
511
        Utils.info("Processing " + entityIdItemMap.size() + " entities");
510
        // Remove all items which have not been updated since last content
512
        // Remove all items which have not been updated since last content
511
        // generation.
513
        // generation.
512
        List<Long> removeEntities = new ArrayList<Long>();
514
        List<Long> removeEntities = new ArrayList<Long>();
513
        for (Long entityId : entityIdItemMap.keySet()) {
515
        for (Long entityId : entityIdItemMap.keySet()) {
514
            boolean isValidEntity = false;
516
            boolean isValidEntity = false;
Line 524... Line 526...
524
            }
526
            }
525
        }
527
        }
526
        for (Long entityId : removeEntities) {
528
        for (Long entityId : removeEntities) {
527
            entityIdItemMap.remove(entityId);
529
            entityIdItemMap.remove(entityId);
528
        }
530
        }
-
 
531
 
-
 
532
        Utils.info("Final valid entities to be processed: " + entityIdItemMap.size());
529
    }
533
    }
530
}
534
}