@Component public class RepositoryMerger extends Object
| Constructor and Description |
|---|
RepositoryMerger(DataService dataService) |
| Modifier and Type | Method and Description |
|---|---|
CrudRepository |
merge(List<Repository> repositoryList,
List<AttributeMetaData> commonAttributes,
CrudRepository mergedRepository,
String idField)
Create a new merged repository Metadata is merged based on the common attributes (those remain at root level) All
non-common level attributes are organised in 1 compound attribute per repository Data of all repositories is
merged based on the common columns
|
CrudRepository |
merge(List<Repository> repositoryList,
List<AttributeMetaData> commonAttributes,
CrudRepository mergedRepository,
String idField,
int batchSize)
Create a new merged repository Metadata is merged based on the common attributes (those remain at root level) All
non-common level attributes are organised in 1 compound attribute per repository Data of all repositories is
merged based on the common columns
|
EntityMetaData |
mergeMetaData(List<Repository> repositoryList,
List<AttributeMetaData> commonAttributes,
String outRepositoryName)
Create new EntityMetaData with the common attributes at root level, and all other columns in a compound attribute
per original repository
|
@Autowired public RepositoryMerger(DataService dataService)
public CrudRepository merge(List<Repository> repositoryList, List<AttributeMetaData> commonAttributes, CrudRepository mergedRepository, String idField)
repositoryList - list of repositories to be mergedcommonAttributes - list of common attributes, these columns are use to 'join'/'merge' onmergedRepository - the resulting repository default of 1000 for param: batchSize number of records after which the result
is added or updated in the repositorypublic CrudRepository merge(List<Repository> repositoryList, List<AttributeMetaData> commonAttributes, CrudRepository mergedRepository, String idField, int batchSize)
repositoryList - list of repositories to be mergedcommonAttributes - list of common attributes, these columns are use to 'join'/'merge' onmergedRepository - the resulting repositorybatchSize - number of records after which the result is added or updated in the repositorypublic EntityMetaData mergeMetaData(List<Repository> repositoryList, List<AttributeMetaData> commonAttributes, String outRepositoryName)
Copyright © 2015. All Rights Reserved.