Interface DataImporter<T>

  • Type Parameters:
    T - the type this data importer handles.

    public interface DataImporter<T>
    Implement this interface to create a data set importer that will handle objects of a specific type. A data importer must be marked with a DataSet annotation to be recognized.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void clear()
      This method is called when the backing persistence must be cleared before import.
      Class<T> getImportedClass()
      Returns the data class managed by the importer.
      void importData​(Stream<T> data)
      This method is called when a stream of objects is ready to import.
      boolean isInitialized()
      This method is used to determine if a data importer should be automatically initialized with data.
    • Method Detail

      • isInitialized

        boolean isInitialized()
        This method is used to determine if a data importer should be automatically initialized with data.
        Returns:
        true if already initialized (and as such won't be automatically initialized), false otherwise.
      • clear

        void clear()
        This method is called when the backing persistence must be cleared before import.
      • importData

        void importData​(Stream<T> data)
        This method is called when a stream of objects is ready to import.
        Parameters:
        data - the object to import.
      • getImportedClass

        Class<T> getImportedClass()
        Returns the data class managed by the importer.
        Returns:
        the data class.