Class 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.DateConverter DATE_CONVERTOR  
    • Constructor Summary

      Constructors 
      Constructor Description
      CellUtilities()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String asString​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)
      Convert a DTCellValue52 to it's String representation
      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.
      BigDecimal convertToBigDecimal​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      BigInteger convertToBigInteger​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Boolean convertToBoolean​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Byte convertToByte​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Date convertToDate​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Double convertToDouble​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Float convertToFloat​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Integer convertToInteger​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Long convertToLong​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      Short convertToShort​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      String convertToString​(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 cell)  
      static void injectDateConvertor​(org.kie.soup.project.datamodel.oracle.DateConverter dc)
      Override the default, GWT-centric, Date conversion utility class.
      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
    • Field Detail

      • DATE_CONVERTOR

        protected static org.kie.soup.project.datamodel.oracle.DateConverter DATE_CONVERTOR
    • Constructor Detail

      • CellUtilities

        public CellUtilities()
    • 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)