use of org.kie.soup.project.datamodel.oracle.DataType in project drools-wb by kiegroup.
the class BRLActionColumnDefinitionBuilder method makeRowData.
private List<DTCellValue52> makeRowData(final ColumnUtilities columnUtilities, final BRLActionColumn brlColumn) {
final List<DTCellValue52> row = new ArrayList<>();
row.add(new DTCellValue52(1));
row.add(new DTCellValue52("desc"));
for (BRLActionVariableColumn brlVariableColumn : brlColumn.getChildColumns()) {
final DataType.DataTypes dataType = columnUtilities.getDataType(brlVariableColumn);
row.add(makeCell(dataType));
}
return row;
}
use of org.kie.soup.project.datamodel.oracle.DataType in project drools-wb by kiegroup.
the class ActionInsertFactFieldsPage method assertDefaultValue.
@Override
public void assertDefaultValue(final ActionInsertFactCol52 selectedAction) {
final List<String> valueList = Arrays.asList(columnUtilities.getValueList(selectedAction));
if (valueList.size() > 0) {
final String defaultValue = cellUtilities.asString(selectedAction.getDefaultValue());
if (!valueList.contains(defaultValue)) {
selectedAction.getDefaultValue().clearValues();
}
} else {
// Ensure the Default Value has been updated to represent the column's data-type.
final DTCellValue52 defaultValue = selectedAction.getDefaultValue();
final DataType.DataTypes dataType = columnUtilities.getDataType(selectedAction);
cellUtilities.convertDTCellValueType(dataType, defaultValue);
}
}
use of org.kie.soup.project.datamodel.oracle.DataType in project drools-wb by kiegroup.
the class FactPatternConstraintsPage method assertDefaultValue.
@Override
public void assertDefaultValue(final Pattern52 selectedPattern, final ConditionCol52 selectedCondition) {
final List<String> valueList = Arrays.asList(columnUtilities.getValueList(selectedCondition));
if (valueList.size() > 0) {
final String defaultValue = cellUtilities.asString(selectedCondition.getDefaultValue());
if (!valueList.contains(defaultValue)) {
selectedCondition.getDefaultValue().clearValues();
}
} else {
// Ensure the Default Value has been updated to represent the column's data-type.
final DTCellValue52 defaultValue = selectedCondition.getDefaultValue();
final DataType.DataTypes dataType = columnUtilities.getDataType(selectedPattern, selectedCondition);
cellUtilities.convertDTCellValueType(dataType, defaultValue);
}
}
use of org.kie.soup.project.datamodel.oracle.DataType in project drools-wb by kiegroup.
the class ActionSetFieldsPage method assertDefaultValue.
@Override
public void assertDefaultValue(final Pattern52 selectedPattern, final ActionSetFieldCol52 selectedAction) {
final List<String> valueList = Arrays.asList(columnUtilities.getValueList(selectedAction));
if (valueList.size() > 0) {
final String defaultValue = cellUtilities.asString(selectedAction.getDefaultValue());
if (!valueList.contains(defaultValue)) {
selectedAction.getDefaultValue().clearValues();
}
} else {
// Ensure the Default Value has been updated to represent the column's data-type.
final DTCellValue52 defaultValue = selectedAction.getDefaultValue();
final DataType.DataTypes dataType = columnUtilities.getDataType(selectedPattern, selectedAction);
cellUtilities.convertDTCellValueType(dataType, defaultValue);
}
}
use of org.kie.soup.project.datamodel.oracle.DataType in project drools-wb by kiegroup.
the class ConditionColumnPlugin method assertDefaultValue.
void assertDefaultValue() {
final CellUtilities cellUtilities = new CellUtilities();
final AsyncPackageDataModelOracle oracle = presenter.getDataModelOracle();
final ColumnUtilities columnUtilities = new ColumnUtilities(model(), oracle);
final List<String> valueList = Arrays.asList(columnUtilities.getValueList(editingCol));
if (valueList.size() > 0) {
final String defaultValue = cellUtilities.asString(editingCol().getDefaultValue());
if (!valueList.contains(defaultValue)) {
editingCol.getDefaultValue().clearValues();
}
} else {
// Ensure the Default Value has been updated to represent the column's data-type.
final DTCellValue52 defaultValue = editingCol().getDefaultValue();
final DataType.DataTypes dataType = columnUtilities.getDataType(editingPattern(), editingCol());
cellUtilities.convertDTCellValueType(dataType, defaultValue);
}
}
Aggregations