use of com.mulesoft.tools.migration.library.tools.mel.DefaultMelCompatibilityResolver in project mule-migration-assistant by mulesoft.
the class DbSelect method execute.
@Override
public void execute(Element object, MigrationReport report) throws RuntimeException {
migrateSql(object);
migrateInputParams(object);
if (object.getAttribute("streaming") == null || "false".equals(object.getAttributeValue("streaming"))) {
report.report("db.streaming", object, object);
}
object.removeAttribute("streaming");
if (object.getAttribute("source") != null) {
report.report("db.source", object, object);
object.removeAttribute("source");
}
migrateOperationStructure(getApplicationModel(), object, report, false, getExpressionMigrator(), new DefaultMelCompatibilityResolver());
}
use of com.mulesoft.tools.migration.library.tools.mel.DefaultMelCompatibilityResolver in project mule-migration-assistant by mulesoft.
the class DbStoredProcedure method execute.
@Override
public void execute(Element object, MigrationReport report) throws RuntimeException {
migrateSql(object);
migrateInputParamTypes(object);
migrateInputParams(object);
List<Element> outParams = object.getChildren("out-param", DB_NAMESPACE).stream().map(ip -> new Element("output-parameter", DB_NAMESPACE).setAttribute("key", ip.getAttributeValue("name"))).collect(toList());
if (!outParams.isEmpty()) {
object.addContent(new Element("output-parameters", DB_NAMESPACE).addContent(outParams));
}
object.removeChildren("out-param", DB_NAMESPACE);
List<Element> inoutParams = object.getChildren("inout-param", DB_NAMESPACE).stream().map(ip -> new Element("in-out-parameter", DB_NAMESPACE).setAttribute("key", ip.getAttributeValue("name")).setAttribute("value", ip.getAttributeValue("value"))).collect(toList());
if (!inoutParams.isEmpty()) {
object.addContent(new Element("in-out-parameters", DB_NAMESPACE).addContent(inoutParams));
}
object.removeChildren("inout-param", DB_NAMESPACE);
if (object.getAttribute("streaming") == null || "false".equals(object.getAttributeValue("streaming"))) {
report.report("db.streaming", object, object);
}
object.removeAttribute("streaming");
if (object.getAttribute("source") != null) {
report.report("db.source", object, object);
object.removeAttribute("source");
}
migrateOperationStructure(getApplicationModel(), object, report, false, getExpressionMigrator(), new DefaultMelCompatibilityResolver());
}
use of com.mulesoft.tools.migration.library.tools.mel.DefaultMelCompatibilityResolver in project mule-migration-assistant by mulesoft.
the class DbUpdate method execute.
@Override
public void execute(Element object, MigrationReport report) throws RuntimeException {
migrateSql(object);
if ("true".equals(object.getAttributeValue("bulkMode"))) {
object.setName("bulk-update");
object.removeAttribute("bulkMode");
migrateBulkInputParams(object);
} else {
migrateInputParams(object);
}
if (object.getAttribute("source") != null) {
report.report("db.source", object, object);
object.removeAttribute("source");
}
migrateOperationStructure(getApplicationModel(), object, report, false, getExpressionMigrator(), new DefaultMelCompatibilityResolver());
}
Aggregations