fluid-api/src/main/java/com/fluidbpm/program/api/vo/ABaseFluidElasticSearchJSONObject.java
@XmlTransient
    public Field convertTo(SQLFormFieldUtil.FormFieldMapping formFieldMappingParam)
    {
        switch (formFieldMappingParam.dataType.intValue())
        {
            //Text...
            case UtilGlobal.FieldTypeId._1_TEXT:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null, Field.Type.Text);

            //True False...
            case UtilGlobal.FieldTypeId._2_TRUE_FALSE:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null, Field.Type.TrueFalse);
            //Paragraph Text...
            case UtilGlobal.FieldTypeId._3_PARAGRAPH_TEXT:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.ParagraphText);
            //Multiple Choice...
            case UtilGlobal.FieldTypeId._4_MULTI_CHOICE:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.MultipleChoice);
            //Date Time...
            case UtilGlobal.FieldTypeId._5_DATE_TIME:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.DateTime);
            //Decimal...
            case UtilGlobal.FieldTypeId._6_DECIMAL:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.Decimal);
            //Table Field...
            case UtilGlobal.FieldTypeId._7_TABLE_FIELD:

                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.Table);
            //TODO __8__ encrypted field...
            //Label...
            case UtilGlobal.FieldTypeId._9_LABEL:

                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        formFieldMappingParam.description,
                        Field.Type.Label);
            default:
                throw new IllegalStateException("Unable to map '"+
                        formFieldMappingParam.dataType.intValue() +"', to Form Field value.");
        }
    }
@XmlTransient
    public Field convertTo(SQLFormFieldUtil.FormFieldMapping formFieldMappingParam)
    {
        switch (formFieldMappingParam.dataType.intValue())
        {
            //Text...
            case UtilGlobal.FieldTypeId._1_TEXT:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null, Field.Type.Text);

            //True False...
            case UtilGlobal.FieldTypeId._2_TRUE_FALSE:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null, Field.Type.TrueFalse);
            //Paragraph Text...
            case UtilGlobal.FieldTypeId._3_PARAGRAPH_TEXT:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.ParagraphText);
            //Multiple Choice...
            case UtilGlobal.FieldTypeId._4_MULTI_CHOICE:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.MultipleChoice);
            //Date Time...
            case UtilGlobal.FieldTypeId._5_DATE_TIME:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.DateTime);
            //Decimal...
            case UtilGlobal.FieldTypeId._6_DECIMAL:
                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.Decimal);
            //Table Field...
            case UtilGlobal.FieldTypeId._7_TABLE_FIELD:

                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        null,
                        Field.Type.Table);
            //TODO __8__ encrypted field...
            //Label...
            case UtilGlobal.FieldTypeId._9_LABEL:

                return new Field(
                        formFieldMappingParam.formFieldId,
                        formFieldMappingParam.name,
                        formFieldMappingParam.description,
                        Field.Type.Label);
            default:
                throw new IllegalStateException("Unable to map '"+
                        formFieldMappingParam.dataType.intValue() +"', to Form Field value.");
        }
    }
Utility method to convert from a {@code SQLFormFieldUtil.FormFieldMapping} to a {@code Field}.

@param formFieldMappingParam The {@code SQLFormFieldUtil.FormFieldMapping} to convert.

@return Converted {@code Field} from {@code SQLFormFieldUtil.FormFieldMapping}.