Drools Workbench - Guided Decision Table Editor - Client 6.0.1-SNAPSHOT

org.drools.workbench.screens.guided.dtable.client.utils
Class DTCellValueUtilities

java.lang.Object
  extended by org.drools.workbench.screens.guided.dtable.client.utils.DTCellValueUtilities

public class DTCellValueUtilities
extends Object

Utilities relating to the use of DTCellValue's


Field Summary
protected static org.drools.workbench.models.datamodel.oracle.DateConverter DATE_CONVERTOR
           
 
Constructor Summary
DTCellValueUtilities(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 model, org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle oracle)
           
 
Method Summary
 void assertDTCellValue(org.drools.workbench.models.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.
 String asString(org.drools.workbench.models.guided.dtable.shared.model.DTCellValue52 dcv)
          Convert a DTCellValue52 to it's String representation
 org.drools.workbench.models.datamodel.oracle.DataType.DataTypes getDataType(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn column)
          Get the Data Type corresponding to a given column.
 org.drools.workbench.models.datamodel.oracle.DataType.DataTypes getDataType(org.drools.workbench.models.guided.dtable.shared.model.Pattern52 pattern, org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52 action)
          Get the Data Type corresponding to a given column
 org.drools.workbench.models.datamodel.oracle.DataType.DataTypes getDataType(org.drools.workbench.models.guided.dtable.shared.model.Pattern52 pattern, org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52 condition)
          Get the Data Type corresponding to a given column
static void injectDateConvertor(org.drools.workbench.models.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATE_CONVERTOR

protected static org.drools.workbench.models.datamodel.oracle.DateConverter DATE_CONVERTOR
Constructor Detail

DTCellValueUtilities

public DTCellValueUtilities(org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 model,
                            org.kie.workbench.common.widgets.client.datamodel.AsyncPackageDataModelOracle oracle)
Method Detail

injectDateConvertor

public static void injectDateConvertor(org.drools.workbench.models.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 -

getDataType

public org.drools.workbench.models.datamodel.oracle.DataType.DataTypes getDataType(org.drools.workbench.models.guided.dtable.shared.model.BaseColumn column)
Get the Data Type corresponding to a given column. If the column is a ConditonCol52 and it is not associated with a Pattern52 in the decision table (e.g. it has been cloned) the overloaded method getDataType(Pattern52, ConditionCol52) should be used.

Parameters:
column -
Returns:

getDataType

public org.drools.workbench.models.datamodel.oracle.DataType.DataTypes getDataType(org.drools.workbench.models.guided.dtable.shared.model.Pattern52 pattern,
                                                                                   org.drools.workbench.models.guided.dtable.shared.model.ConditionCol52 condition)
Get the Data Type corresponding to a given column

Parameters:
pattern - Pattern52
condition - ConditionCol52
Returns:

getDataType

public org.drools.workbench.models.datamodel.oracle.DataType.DataTypes getDataType(org.drools.workbench.models.guided.dtable.shared.model.Pattern52 pattern,
                                                                                   org.drools.workbench.models.guided.dtable.shared.model.ActionSetFieldCol52 action)
Get the Data Type corresponding to a given column

Parameters:
pattern - Pattern52
action - ActionSetFieldCol52
Returns:

assertDTCellValue

public void assertDTCellValue(org.drools.workbench.models.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 -

Drools Workbench - Guided Decision Table Editor - Client 6.0.1-SNAPSHOT

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.