com.univocity.api.entity.custom
Class DataStoreConfiguration

java.lang.Object
  extended by com.univocity.api.entity.custom.DataStoreConfiguration
Direct Known Subclasses:
JdbcDataStoreConfiguration, TextDataStoreConfiguration

public abstract class DataStoreConfiguration
extends Object

This is the base class of all configuration classes for data stores. It provides the most basic configuration elements to enable data processing by uniVocity.

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
CustomDataStoreFactory, DataStoreMapping

Constructor Summary
DataStoreConfiguration(String dataStoreName)
          Creates a new configuration object for a data store.
 
Method Summary
 void enableDatabaseOperationsIn(Collection<String> entityNames)
          If this data store is not backed by a database, you can move data from your custom entities to an in-memory database managed by uniVocity.
 void enableDatabaseOperationsIn(String... entityNames)
          If this data store is not backed by a database, you can move data from your custom entities to an in-memory database managed by uniVocity.
 Set<String> getDatabaseEnabledEntities()
          Returns the entity names that must have their data loaded into an in-memory database managed by uniVocity before a each data migration cycle.
 String getDataStoreName()
          Returns the name of the data store whose configuration is maintained by this object .
abstract  int getLimitOfRowsLoadedInMemory()
          Obtains the maximum number of rows loaded in memory at a time when extracting information from entities and queries managed by this data store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataStoreConfiguration

public DataStoreConfiguration(String dataStoreName)
Creates a new configuration object for a data store. uniVocity refers to data stores by their name (most importantly in DataIntegrationEngine.map(String, String)).

Parameters:
dataStoreName - the name of the data store being configured. Leading and trailing white spaces, if any, will be removed.
Method Detail

getDataStoreName

public final String getDataStoreName()
Returns the name of the data store whose configuration is maintained by this object .

Returns:
the data store name.

getDatabaseEnabledEntities

public Set<String> getDatabaseEnabledEntities()
Returns the entity names that must have their data loaded into an in-memory database managed by uniVocity before a each data migration cycle.

Returns:
a unmodifiable set containing the database-enabled entity names.

enableDatabaseOperationsIn

public void enableDatabaseOperationsIn(Collection<String> entityNames)
If this data store is not backed by a database, you can move data from your custom entities to an in-memory database managed by uniVocity.
This enables operations such as SQL queries that can be executed against data stored in plain text files for example.

By providing the names of these entities using this method, uniVocity will load all their data into a in-memory database automatically, and any data modifications will be dumped back to the original entity at the end of each data migration cycle (started in DataIntegrationEngine.executeCycle().

Parameters:
entityNames - the entity names that must have their data loaded into an in-memory database managed by uniVocity

enableDatabaseOperationsIn

public void enableDatabaseOperationsIn(String... entityNames)
If this data store is not backed by a database, you can move data from your custom entities to an in-memory database managed by uniVocity.
This enables operations such as SQL queries that can be executed against data stored in plain text files for example.

By providing the names of these entities using this method, uniVocity will load all their data into a in-memory database automatically, and any data modifications will be dumped back to the original entity at the end of each data migration cycle (started in DataIntegrationEngine.executeCycle().

Parameters:
entityNames - the entity names that must have their data loaded into an in-memory database managed by uniVocity

getLimitOfRowsLoadedInMemory

public abstract int getLimitOfRowsLoadedInMemory()
Obtains the maximum number of rows loaded in memory at a time when extracting information from entities and queries managed by this data store.

Returns:
the maximum number of rows kept in memory at any given time when reading values from any entity or query of this data store.


Copyright © 2015 uniVocity Software Pty Ltd. All rights reserved.