Interface DataSetProvider


  • public interface DataSetProvider
    This service provider interface is designed to provide access to different data set storage implementations with the main goal of providing a unified interface for the data set fetch & lookup operations.
    • Method Detail

      • getDataSetMetadata

        DataSetMetadata getDataSetMetadata​(DataSetDef def)
                                    throws Exception
        Retrieves the metadata for a given data set definition
        Parameters:
        def - The data set definition lookup request
        Returns:
        The data set metadata
        Throws:
        Exception
      • lookupDataSet

        DataSet lookupDataSet​(DataSetDef def,
                              DataSetLookup lookup)
                       throws Exception
        Fetch a data set and optionally apply several operations (filter, sort, group, ...) on top of it.

        For group operations on date columns the grouped column values must stick to the following format:

         GroupStrategy   IntervalType       Output
         ---------------------------------------------------
           DYNAMIC         SECOND        yyyy-MM-dd HH:mm:ss
           DYNAMIC         MINUTE        yyyy-MM-dd HH:mm
           DYNAMIC         HOUR          yyyy-MM-dd HH
           DYNAMIC         DAY           yyyy-MM-dd
           DYNAMIC         MONTH         yyyy-MM
           DYNAMIC         YEAR          yyyy
        
           yyyy=year                 HH=hour from 00 to 23,
           MM=month from 01 to 12    mm=minutes from 00 to 59
           dd=day from 01 to 31      ss=seconds from 00 to 59
        
           FIXED           SECOND        From 0 to 59
           FIXED           MINUTE        From 0 to 59
           FIXED           HOUR          From 0 to 23
           FIXED           DAY_OF_WEEK   From 1 to 7 (1=Sunday, 7=Saturday)
           FIXED           MONTH         From 1 to 12 (1=January, 12=December)
           FIXED           QUARTER       From 1 to 4 (1=Ene,Feb,Mar, 4=Oct,Nov,Dec)
         
        Parameters:
        def - The data set definition lookup request
        lookup - The lookup request over the data set. If null then return the data set as is.
        Returns:
        The resulting data set instance
        Throws:
        Exception
      • isDataSetOutdated

        boolean isDataSetOutdated​(DataSetDef def)
        Check if the specified data set definition is outdated. This means that the data set might have been updated at origin. When this happens, any data hold by the provider can be considered stale and a refresh is needed.
        Parameters:
        def - The data set definition to check for
        Returns:
        true if the data set has become stale. false otherwise.