Class DRLConstraintValueBuilder
- java.lang.Object
-
- org.drools.workbench.models.datamodel.rule.builder.DRLConstraintValueBuilder
-
- Direct Known Subclasses:
MvelDRLConstraintValueBuilder
public abstract class DRLConstraintValueBuilder extends Object
A Helper class for building parts of DRL from higher-order representations (i.e. Guided Rule Editor, Guided Template Rule Editor and Guided Decision Table).
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DIALECT
-
Constructor Summary
Constructors Constructor Description DRLConstraintValueBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidbuildLHSFieldValue(StringBuilder buf, int constraintType, String fieldType, String fieldValue)Concatenate a String to the provided buffer suitable for the fieldValue and fieldType.abstract voidbuildRHSFieldValue(StringBuilder buf, String fieldType, String fieldValue)Concatenate a String to the provided buffer suitable for the fieldType and fieldValue.static DRLConstraintValueBuildergetBuilder(String dialect)
-
-
-
Field Detail
-
DEFAULT_DIALECT
public static final String DEFAULT_DIALECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBuilder
public static DRLConstraintValueBuilder getBuilder(String dialect)
-
buildLHSFieldValue
public abstract 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.- Parameters:
buf-constraintType-fieldType-fieldValue-
-
buildRHSFieldValue
public abstract 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.- Parameters:
buf-fieldType-fieldValue-
-
-