Package org.fastnate.data
Class AbstractDataProvider
java.lang.Object
org.fastnate.data.AbstractDataProvider
- All Implemented Interfaces:
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
Propertiessettings - references to other DataProviders
DataProvider.buildEntities() method of these
providers are called before our DataProvider.buildEntities().- Author:
- Andreas Penski, Tobias Liefke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Collection<?> The list of entities for which INSERT SQL statements will be generated.voidwriteEntities(org.fastnate.generator.EntitySqlGenerator sqlGenerator) The default implementation just writes allentitiesthat were created duringDataProvider.buildEntities().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fastnate.data.DataProvider
buildEntities, getOrder
-
Constructor Details
-
AbstractDataProvider
public AbstractDataProvider()
-
-
Method Details
-
getEntities
The list of entities for which INSERT SQL statements will be generated.- Returns:
- list of entities
-
writeEntities
public void writeEntities(org.fastnate.generator.EntitySqlGenerator sqlGenerator) throws IOException The default implementation just writes allentitiesthat were created duringDataProvider.buildEntities().- Specified by:
writeEntitiesin interfaceDataProvider- Parameters:
sqlGenerator- the SQL file generator- Throws:
IOException- if the generator throws one
-