use of org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol in project drools-wb by kiegroup.
the class ActionRetractFactPlugin method clone.
ActionRetractFactCol52 clone(final ActionRetractFactCol52 col52) {
final ActionRetractFactCol52 clone;
if (col52 instanceof LimitedEntryCol) {
clone = new LimitedEntryActionRetractFactCol52();
final DTCellValue52 oldValue = ((LimitedEntryCol) col52).getValue();
final DTCellValue52 newValue = new DTCellValue52(oldValue.getStringValue());
((LimitedEntryCol) clone).setValue(newValue);
} else {
clone = new ActionRetractFactCol52();
}
clone.setHeader(col52.getHeader());
clone.setHideColumn(col52.isHideColumn());
return clone;
}
use of org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol in project drools-wb by kiegroup.
the class BaseSynchronizer method makeModelCellValue.
protected DTCellValue52 makeModelCellValue(final BaseColumn modelColumn) {
DTCellValue52 dcv;
final DTCellValue52 defaultValue = modelColumn.getDefaultValue();
final DataType.DataTypes dataType = columnUtilities.getDataType(modelColumn);
if (modelColumn instanceof LimitedEntryCol) {
dcv = new DTCellValue52(Boolean.FALSE);
} else if (dataType == DataType.DataTypes.BOOLEAN) {
if (defaultValue == null) {
dcv = new DTCellValue52(false);
} else if (defaultValue.getBooleanValue() == null) {
dcv = new DTCellValue52(false);
} else {
dcv = new DTCellValue52(defaultValue.getBooleanValue());
}
} else {
dcv = new DTCellValue52(defaultValue);
}
cellUtilities.convertDTCellValueType(dataType, dcv);
return dcv;
}
Aggregations