fix more
This commit is contained in:
@@ -111,12 +111,22 @@ public abstract class ConvertTCompV0ToTckComponentMigrationTask extends Abstract
|
||||
} else {
|
||||
if("COMPONENT_LIST".equals(model.fieldType)) {
|
||||
final Enum<?> referenceType = Enum.class.cast(Property.class.cast(compProperties.getProperty(model.oldPath + ".referenceType")).getStoredValue());
|
||||
ComponentUtilities.addNodeProperty(nodeType, "USE_EXISTING_CONNECTION", "CHECK");
|
||||
//USE_EXISTING_CONNECTION field may exist after migration from javajet to tcompv0, so here consider it
|
||||
final ElementParameterType oldUseConnectionElement = ComponentUtilities.getNodeProperty(nodeType, "USE_EXISTING_CONNECTION");
|
||||
if(oldUseConnectionElement == null) {
|
||||
ComponentUtilities.addNodeProperty(nodeType, "USE_EXISTING_CONNECTION", "CHECK");
|
||||
}
|
||||
|
||||
ComponentUtilities.addNodeProperty(nodeType, model.newPath, "COMPONENT_LIST");
|
||||
if(referenceType == null || "THIS_COMPONENT".equals(referenceType.name())) {
|
||||
ComponentUtilities.setNodeValue(nodeType, "USE_EXISTING_CONNECTION", "false");
|
||||
if(oldUseConnectionElement == null) {
|
||||
ComponentUtilities.setNodeValue(nodeType, "USE_EXISTING_CONNECTION", "false");
|
||||
}
|
||||
} else {
|
||||
ComponentUtilities.setNodeValue(nodeType, "USE_EXISTING_CONNECTION", "true");
|
||||
if(oldUseConnectionElement == null) {
|
||||
ComponentUtilities.setNodeValue(nodeType, "USE_EXISTING_CONNECTION", "true");
|
||||
}
|
||||
|
||||
final Object value = Property.class.cast(compProperties.getProperty(model.oldPath + ".componentInstanceId")).getStoredValue();
|
||||
ComponentUtilities.setNodeValue(nodeType, model.newPath, value == null ? null : String.valueOf(value));
|
||||
}
|
||||
@@ -197,12 +207,15 @@ public abstract class ConvertTCompV0ToTckComponentMigrationTask extends Abstract
|
||||
final String uniqueName = ParameterUtilTool.getParameterValue(nodeType, "UNIQUE_NAME");
|
||||
final EList<MetadataType> metadatas = nodeType.getMetadata();
|
||||
int indexOfFlow = -1;
|
||||
boolean mainExists = false;
|
||||
for (int i=0;i<metadatas.size();i++) {
|
||||
final MetadataType metadataType = metadatas.get(i);
|
||||
|
||||
if("FLOW".equals(metadataType.getConnector()) && uniqueName.equals(metadataType.getName())) {
|
||||
indexOfFlow = i;
|
||||
} if("MAIN".equals(metadataType.getConnector()) && "MAIN".equals(metadataType.getName())) {//tcompV0 use "MAIN" to match connection default
|
||||
mainExists = true;
|
||||
|
||||
metadataType.setConnector("FLOW");
|
||||
metadataType.setName(uniqueName);
|
||||
|
||||
@@ -233,7 +246,9 @@ public abstract class ConvertTCompV0ToTckComponentMigrationTask extends Abstract
|
||||
}
|
||||
}
|
||||
}
|
||||
if(indexOfFlow > -1) {
|
||||
//here consider tcompv0 model and javajet model for schema part both, as common, migration should only consider the lastest status/model,
|
||||
//but seems if old javajet jdbc component import, the schema part keep the old format, not tcompv0 format
|
||||
if(mainExists && indexOfFlow > -1) {
|
||||
metadatas.remove(indexOfFlow);
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ JDBCNewInput.configuration.columnTrims=trimTable.columnName=column;trimTable.tri
|
||||
JDBCNewInput.configuration.enableMapping=enableDBMapping#CHECK
|
||||
JDBCNewInput.configuration.mapping=dbMapping#CLOSED_LIST
|
||||
JDBCNewInput.configuration.usePreparedStatement=usePreparedStatement#CHECK
|
||||
JDBCNewInput.configuration.configuration.preparedStatementParameters=preparedStatementTable.indexs=index;preparedStatementTable.types=type;preparedStatementTable.values=dataValue#TABLE
|
||||
JDBCNewInput.configuration.preparedStatementParameters=preparedStatementTable.indexs=index;preparedStatementTable.types=type;preparedStatementTable.values=dataValue#TABLE
|
||||
JDBCNewInput.configuration.useQueryTimeout=useQueryTimeout#CHECK
|
||||
JDBCNewInput.configuration.queryTimeout=queryTimeout#TEXT
|
||||
JDBCNewInput.configuration.dataSet.__version=-1
|
||||
@@ -79,7 +79,7 @@ JDBCNewRow.configuration.dataSet.sqlQuery=sql#MEMO_SQL
|
||||
JDBCNewRow.configuration.propagateRecordSet=propagateQueryResultSet#CHECK
|
||||
JDBCNewRow.configuration.recordSetColumn=useColumn#TEXT
|
||||
JDBCNewRow.configuration.usePreparedStatement=usePreparedStatement#CHECK
|
||||
JDBCNewRow.configuration.configuration.preparedStatementParameters=preparedStatementTable.indexs=index;preparedStatementTable.types=type;preparedStatementTable.values=dataValue#TABLE
|
||||
JDBCNewRow.configuration.preparedStatementParameters=preparedStatementTable.indexs=index;preparedStatementTable.types=type;preparedStatementTable.values=dataValue#TABLE
|
||||
JDBCNewRow.configuration.detectErrorWhenMultiStatements=detectErrorOnMultipleSQL#CHECK
|
||||
JDBCNewRow.configuration.commitEvery=commitEvery#TEXT
|
||||
JDBCNewRow.configuration.useQueryTimeout=useQueryTimeout#CHECK
|
||||
@@ -100,7 +100,7 @@ JDBCNewSP.configuration.dataStore.dataSourceAlias=dataSource#TEXT
|
||||
JDBCNewSP.configuration.spName=spName#TEXT
|
||||
JDBCNewSP.configuration.isFunction=isFunction#CHECK
|
||||
JDBCNewSP.configuration.resultColumn=returnResultIn#TEXT
|
||||
JDBCNewSP.configuration.configuration.spParameters=spParameterTable.schemaColumns=columnName;spParameterTable.parameterTypes=parameterType#TABLE
|
||||
JDBCNewSP.configuration.spParameters=spParameterTable.schemaColumns=columnName;spParameterTable.parameterTypes=parameterType#TABLE
|
||||
JDBCNewSP.configuration.dataStore.__version=-1
|
||||
|
||||
JDBCNewCommit=tJDBCCommit
|
||||
|
||||
Reference in New Issue
Block a user