Class FetchResourcePayloadsDAO


  • public class FetchResourcePayloadsDAO
    extends java.lang.Object
    DAO to fetch resource ids using a time range and optional current resource id as a filter. Useful for scanning the database for new resources since a given timestamp (for example in export scenarios).
    • Constructor Summary

      Constructors 
      Constructor Description
      FetchResourcePayloadsDAO​(IDatabaseTranslator translator, java.lang.String schemaName, java.lang.String resourceType, java.time.Instant fromLastUpdated, java.time.Instant toLastUpdated, java.util.function.Function<ResourcePayload,​java.lang.Boolean> processor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int count​(java.sql.Connection c)
      Get a count of the resources matching the filter predicates...for debugging...slows things down a lot
      ResourcePayload run​(java.sql.Connection c)
      Run the query, feeding each result row to the consumer
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FetchResourcePayloadsDAO

        public FetchResourcePayloadsDAO​(IDatabaseTranslator translator,
                                        java.lang.String schemaName,
                                        java.lang.String resourceType,
                                        java.time.Instant fromLastUpdated,
                                        java.time.Instant toLastUpdated,
                                        java.util.function.Function<ResourcePayload,​java.lang.Boolean> processor)