Interface DataProvider

All Known Implementing Classes:
AbstractDataProvider, EntityRegistration, GenericDataProvider, GenericXmlDataProvider

public interface DataProvider
Implementations of this class will automatically instantiated by the EntityImporter. The constructor must either be the "no arguments constructor" - or accept one or more of the following parameters:
  • the data directory as File
  • the Properties settings
  • references to other DataProviders
If references to other DataProviders are used in the constructor, the buildEntities() method of these providers are called before our buildEntities().
Author:
Andreas Penski, Tobias Liefke
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Builds the entities that are accessed later using writeEntities(EntitySqlGenerator).
    default int
    An additional helper to sort the output by its precedence.
    void
    writeEntities(org.fastnate.generator.EntitySqlGenerator sqlGenerator)
    Adds all entities to the SQL file using the given generator.
  • Method Details

    • buildEntities

      void buildEntities() throws IOException
      Builds the entities that are accessed later using writeEntities(EntitySqlGenerator).
      Throws:
      IOException - if something happens during any possible import of the generated entities
    • getOrder

      default int getOrder()
      An additional helper to sort the output by its precedence. Providers with a smaller order criteria will write their data before providers with a higher order criteria, except in the case that the first is depending on the second.
      Returns:
      the order criteria - defaults to 0
    • writeEntities

      void writeEntities(org.fastnate.generator.EntitySqlGenerator sqlGenerator) throws IOException
      Adds all entities to the SQL file using the given generator.
      Parameters:
      sqlGenerator - the SQL file generator
      Throws:
      IOException - if the generator throws one