public class DefaultDbImportAction extends Object implements DbImportAction
DbImportAction that can load DB schema and merge it to a new or an existing
DataMap.| Constructor and Description |
|---|
DefaultDbImportAction(org.slf4j.Logger logger,
ProjectSaver projectSaver,
DataSourceFactory dataSourceFactory,
DbAdapterFactory adapterFactory,
DataMapLoader mapLoader,
MergerTokenFactoryProvider mergerTokenFactoryProvider) |
| Modifier and Type | Method and Description |
|---|---|
protected DbLoader |
createDbLoader(DbAdapter adapter,
Connection connection,
DbImportConfiguration config) |
void |
execute(DbImportConfiguration config) |
protected DataMap |
existingTargetMap(DbImportConfiguration configuration) |
static void |
flattenManyToManyRelationships(DataMap map,
Collection<ObjEntity> loadedObjEntities,
ObjectNameGenerator objectNameGenerator)
Flattens many-to-many relationships in the generated model.
|
protected DataMap |
load(DbImportConfiguration config,
DbAdapter adapter,
Connection connection) |
protected DataMap |
newTargetDataMap(DbImportConfiguration config) |
protected void |
saveLoaded(DataMap dataMap) |
protected static List<MergerToken> |
sort(List<MergerToken> reverse) |
protected void |
transformSourceBeforeMerge(DataMap sourceDataMap,
DataMap targetDataMap,
DbImportConfiguration configuration) |
public DefaultDbImportAction(org.slf4j.Logger logger,
ProjectSaver projectSaver,
DataSourceFactory dataSourceFactory,
DbAdapterFactory adapterFactory,
DataMapLoader mapLoader,
MergerTokenFactoryProvider mergerTokenFactoryProvider)
protected static List<MergerToken> sort(List<MergerToken> reverse)
public static void flattenManyToManyRelationships(DataMap map, Collection<ObjEntity> loadedObjEntities, ObjectNameGenerator objectNameGenerator)
public void execute(DbImportConfiguration config) throws Exception
execute in interface DbImportActionExceptionprotected void transformSourceBeforeMerge(DataMap sourceDataMap, DataMap targetDataMap, DbImportConfiguration configuration)
protected DataMap existingTargetMap(DbImportConfiguration configuration) throws IOException
IOExceptionprotected DataMap newTargetDataMap(DbImportConfiguration config) throws IOException
IOExceptionprotected void saveLoaded(DataMap dataMap) throws FileNotFoundException
FileNotFoundExceptionprotected DataMap load(DbImportConfiguration config, DbAdapter adapter, Connection connection) throws Exception
Exceptionprotected DbLoader createDbLoader(DbAdapter adapter, Connection connection, DbImportConfiguration config)
Copyright © 2001–2017 Apache Cayenne. All rights reserved.