Search in sources :

Example 6 with LimitedEntryCol

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;
}
Also used : LimitedEntryActionRetractFactCol52(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryActionRetractFactCol52) LimitedEntryActionRetractFactCol52(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryActionRetractFactCol52) ActionRetractFactCol52(org.drools.workbench.models.guided.dtable.shared.model.ActionRetractFactCol52) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) LimitedEntryCol(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol)

Example 7 with LimitedEntryCol

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;
}
Also used : DataType(org.kie.soup.project.datamodel.oracle.DataType) DTCellValue52(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52) LimitedEntryCol(org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol)

Aggregations

LimitedEntryCol (org.drools.workbench.models.guided.dtable.shared.model.LimitedEntryCol)7 DTCellValue52 (org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52)5 ActionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionCol52)3 BaseColumn (org.drools.workbench.models.guided.dtable.shared.model.BaseColumn)3 ConditionCol52 (org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52)3 BaseSingleFieldConstraint (org.drools.workbench.models.datamodel.rule.BaseSingleFieldConstraint)2 FieldConstraint (org.drools.workbench.models.datamodel.rule.FieldConstraint)2 SingleFieldConstraint (org.drools.workbench.models.datamodel.rule.SingleFieldConstraint)2 ActionInsertFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactCol52)2 ActionRetractFactCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionRetractFactCol52)2 ActionSetFieldCol52 (org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52)2 DTColumnConfig52 (org.drools.workbench.models.guided.dtable.shared.model.DTColumnConfig52)2 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)1 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)1 ValueChangeEvent (com.google.gwt.event.logical.shared.ValueChangeEvent)1 ValueChangeHandler (com.google.gwt.event.logical.shared.ValueChangeHandler)1 BigInteger (java.math.BigInteger)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Set (java.util.Set)1