Class CellUtilities
- java.lang.Object
-
- org.drools.workbench.screens.guided.dtable.client.widget.table.utilities.CellUtilities
-
public class CellUtilities extends Object
Utilities for Cells
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.kie.soup.project.datamodel.oracle.DateConverterDATE_CONVERTOR
-
Constructor Summary
Constructors Constructor Description CellUtilities()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringasString(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)Convert a DTCellValue52 to it's String representationvoidconvertDTCellValueType(org.kie.soup.project.datamodel.oracle.DataType.DataTypes dataType, org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)The column-data type is looked up from the SuggestionCompletionEngine and represents the *true* data-type that the column represents.BigDecimalconvertToBigDecimal(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)BigIntegerconvertToBigInteger(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)BooleanconvertToBoolean(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)ByteconvertToByte(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)DateconvertToDate(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)DoubleconvertToDouble(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)FloatconvertToFloat(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)IntegerconvertToInteger(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)LongconvertToLong(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)ShortconvertToShort(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)StringconvertToString(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)static voidinjectDateConvertor(org.kie.soup.project.datamodel.oracle.DateConverter dc)Override the default, GWT-centric, Date conversion utility class.voidremoveCommaSeparatedValue(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)Remove a comma-separated value, replacing the comma-separated value with the first in the comma-separated list
-
-
-
Method Detail
-
injectDateConvertor
public static void injectDateConvertor(org.kie.soup.project.datamodel.oracle.DateConverter dc)
Override the default, GWT-centric, Date conversion utility class. Only use to hook-in a JVM Compatible implementation for tests- Parameters:
dc-
-
convertDTCellValueType
public void convertDTCellValueType(org.kie.soup.project.datamodel.oracle.DataType.DataTypes dataType, org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)The column-data type is looked up from the SuggestionCompletionEngine and represents the *true* data-type that the column represents. The data-type associated with the Cell Value can be incorrect for legacy models. For pre-5.2 they will always be String and for pre-5.4 numerical fields are always Numeric- Parameters:
dataType-dcv-
-
asString
public String asString(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)
Convert a DTCellValue52 to it's String representation- Parameters:
dcv-- Returns:
-
removeCommaSeparatedValue
public void removeCommaSeparatedValue(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)
Remove a comma-separated value, replacing the comma-separated value with the first in the comma-separated list- Parameters:
dcv-
-
convertToBigDecimal
public BigDecimal convertToBigDecimal(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToBigInteger
public BigInteger convertToBigInteger(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToByte
public Byte convertToByte(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToDouble
public Double convertToDouble(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToFloat
public Float convertToFloat(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToInteger
public Integer convertToInteger(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToLong
public Long convertToLong(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToShort
public Short convertToShort(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToDate
public Date convertToDate(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToBoolean
public Boolean convertToBoolean(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
convertToString
public String convertToString(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)
-
-