Class SynchronisationHelper


  • @Component
    public class SynchronisationHelper
    extends Object
    • Constructor Detail

      • SynchronisationHelper

        public SynchronisationHelper()
    • Method Detail

      • writeToSyncReport

        public void writeToSyncReport​(List<String> records,
                                      String fileName)
        Parameters:
        records - - make sure to pass mutable list to this method
      • createFileWithHeader

        public void createFileWithHeader​(String header,
                                         String syncName,
                                         String rootAuditLogId)
      • isWriteToFile

        public boolean isWriteToFile​(String rootAuditLogId,
                                     String syncConfigName)
      • generateAndWriteContentToReport

        public void generateAndWriteContentToReport​(String entityName,
                                                    String result,
                                                    Exception e,
                                                    String syncName,
                                                    String rootAuditLogId)
      • sweep

        @Scheduled(fixedDelay=10000L,
                   initialDelay=100L)
        public void sweep()
      • getParts

        public static <T> List<Part> getParts​(List<T> allObjects,
                                              int recordCountInBatch,
                                              Function<Part,​List<T>> fieldAccessor)