Class ModelFieldUtil


  • public final class ModelFieldUtil
    extends Object
    Utilities for ModelFields
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelFieldUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.kie.soup.project.datamodel.oracle.ModelField[] getAvailableFieldCompletions​(org.kie.soup.project.datamodel.oracle.ModelField[] fieldCompletions, org.drools.workbench.models.datamodel.rule.ActionFieldList afl)
      Returns an array of ModelFields not consumed by the ActionFieldList; i.e. an array of available ModelFields.
      static org.kie.soup.project.datamodel.oracle.ModelField modelField​(String fieldName, String fieldDataType)
      Constructs model field with given name and data type Other three values are hardcoded as - ModelField.FIELD_CLASS_TYPE.REGULAR_CLASS, - ModelField.FIELD_ORIGIN.DECLARED, - FieldAccessorsAndMutators.BOTH,
    • Constructor Detail

      • ModelFieldUtil

        public ModelFieldUtil()
    • Method Detail

      • getAvailableFieldCompletions

        public static org.kie.soup.project.datamodel.oracle.ModelField[] getAvailableFieldCompletions​(org.kie.soup.project.datamodel.oracle.ModelField[] fieldCompletions,
                                                                                                      org.drools.workbench.models.datamodel.rule.ActionFieldList afl)
        Returns an array of ModelFields not consumed by the ActionFieldList; i.e. an array of available ModelFields.
        Parameters:
        fieldCompletions - The complete collection of ModelFields
        afl - The model of ModelFields already used
        Returns:
        An array of unused ModelFields
      • modelField

        public static org.kie.soup.project.datamodel.oracle.ModelField modelField​(String fieldName,
                                                                                  String fieldDataType)
        Constructs model field with given name and data type Other three values are hardcoded as - ModelField.FIELD_CLASS_TYPE.REGULAR_CLASS, - ModelField.FIELD_ORIGIN.DECLARED, - FieldAccessorsAndMutators.BOTH,
        Parameters:
        fieldName - name of the field
        fieldDataType - data type of the field
        Returns:
        constructed new model field