Drools Workbench - Common Model 6.1.0.Beta3

org.drools.workbench.models.commons.backend.rule
Class MvelDRLConstraintValueBuilder

java.lang.Object
  extended by org.drools.workbench.models.commons.backend.rule.DRLConstraintValueBuilder
      extended by org.drools.workbench.models.commons.backend.rule.MvelDRLConstraintValueBuilder
Direct Known Subclasses:
JavaDRLConstraintValueBuilder

public class MvelDRLConstraintValueBuilder
extends DRLConstraintValueBuilder

Specific implementation for MVEL


Constructor Summary
MvelDRLConstraintValueBuilder()
           
 
Method Summary
 void buildLHSFieldValue(StringBuilder buf, int constraintType, String fieldType, String fieldValue)
          Concatenate a String to the provided buffer suitable for the fieldValue and fieldType.
 void buildRHSFieldValue(StringBuilder buf, String fieldType, String fieldValue)
          Concatenate a String to the provided buffer suitable for the fieldType and fieldValue.
 
Methods inherited from class org.drools.workbench.models.commons.backend.rule.DRLConstraintValueBuilder
getBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MvelDRLConstraintValueBuilder

public MvelDRLConstraintValueBuilder()
Method Detail

buildLHSFieldValue

public void buildLHSFieldValue(StringBuilder buf,
                               int constraintType,
                               String fieldType,
                               String fieldValue)
Concatenate a String to the provided buffer suitable for the fieldValue and fieldType. Strings and Dates are escaped with double-quotes, whilst Numerics, Booleans, (Java 1.5+) enums and all other fieldTypes are not escaped at all. Guvnor-type enums are really a pick list of Strings and in these cases the underlying fieldType is a String.

Specified by:
buildLHSFieldValue in class DRLConstraintValueBuilder
Parameters:
buf -
constraintType -
fieldType -
fieldValue -

buildRHSFieldValue

public void buildRHSFieldValue(StringBuilder buf,
                               String fieldType,
                               String fieldValue)
Concatenate a String to the provided buffer suitable for the fieldType and fieldValue. Strings are escaped with double-quotes, Dates are wrapped with a call to a pre-constructed SimpleDateFormatter, whilst Numerics, Booleans, (Java 1.5+) enums and all other fieldTypes are not escaped at all. Guvnor-type enums are really a pick list of Strings and in these cases the underlying fieldType is a String.

Specified by:
buildRHSFieldValue in class DRLConstraintValueBuilder
Parameters:
buf -
fieldType -
fieldValue -

Drools Workbench - Common Model 6.1.0.Beta3

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