use of com.github.yiuman.citrus.mda.entity.Indexes in project citrus by Yiuman.
the class HistoricConverter method convert.
@Override
public HistoryTable convert(Table table) {
HistoryTable historyTable = Converter.super.convert(table);
historyTable.setUuid(null);
historyTable.setTableUuid(table.getUuid());
List<Column> columnList = TableRelUtils.getTableRelInfos(table.getUuid(), Column.class);
if (!CollectionUtils.isEmpty(columnList)) {
historyTable.setColumns(columnList.parallelStream().map(LambdaUtils.functionWrapper(column -> ConvertUtils.convert(HistoryColumn.class, column))).collect(Collectors.toList()));
}
List<Indexes> indexesList = TableRelUtils.getTableRelInfos(table.getUuid(), Indexes.class);
if (!CollectionUtils.isEmpty(indexesList)) {
historyTable.setIndexes(indexesList.parallelStream().map(LambdaUtils.functionWrapper(indexes -> ConvertUtils.convert(HistoryIndexes.class, indexes))).collect(Collectors.toList()));
}
return historyTable;
}
Aggregations