All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.exactpro.sf.messages.impl.templates.MessageStructureTemplateImpl Maven / Gradle / Ivy

There is a newer version: 3.4.260
Show newest version
// Autogenerated Jamon implementation
// /srv/jenkins/workspace/Sailfish/Sailfish-3.3-pipeline@2/Core/BackEnd/Core/sailfish-common/src/main/templates/com/exactpro/sf/messages/impl/templates/MessageStructureTemplate.jamon

package com.exactpro.sf.messages.impl.templates;

// 15, 3
import com.exactpro.sf.common.messages.structures.*;
// 16, 3
import com.exactpro.sf.common.util.CodeGenUtils;

public class MessageStructureTemplateImpl
  extends org.jamon.AbstractTemplateImpl
  implements com.exactpro.sf.messages.impl.templates.MessageStructureTemplate.Intf

{
  private final String[] distPackagePath;
  private final boolean underscoreAsPackageSeparator;
  private final String packageName;
  private final String typeName;
  private final String messageName;
  private final String namespaceName;
  private final java.util.Collection fields;
  private final java.util.Map attributes;
  protected static com.exactpro.sf.messages.impl.templates.MessageStructureTemplate.ImplData __jamon_setOptionalArguments(com.exactpro.sf.messages.impl.templates.MessageStructureTemplate.ImplData p_implData)
  {
    return p_implData;
  }
  public MessageStructureTemplateImpl(org.jamon.TemplateManager p_templateManager, com.exactpro.sf.messages.impl.templates.MessageStructureTemplate.ImplData p_implData)
  {
    super(p_templateManager, __jamon_setOptionalArguments(p_implData));
    distPackagePath = p_implData.getDistPackagePath();
    underscoreAsPackageSeparator = p_implData.getUnderscoreAsPackageSeparator();
    packageName = p_implData.getPackageName();
    typeName = p_implData.getTypeName();
    messageName = p_implData.getMessageName();
    namespaceName = p_implData.getNamespaceName();
    fields = p_implData.getFields();
    attributes = p_implData.getAttributes();
  }
  
  @Override public void renderNoFlush(final java.io.Writer jamonWriter)
    throws java.io.IOException
  {
    // 19, 1
    jamonWriter.write("/******************************************************************************\r\n * Copyright 2009-2018 Exactpro (Exactpro Systems Limited)\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n *     http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n ******************************************************************************/\r\npackage ");
    // 34, 9
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(packageName), jamonWriter);
    // 34, 26
    jamonWriter.write(";\r\n\r\nimport com.exactpro.sf.common.impl.messages.DefaultMessageFactory;\r\nimport com.exactpro.sf.common.impl.messages.BaseMessage;\r\nimport com.exactpro.sf.common.messages.IMessageFactory;\r\nimport com.exactpro.sf.common.messages.IMessage;\r\nimport com.exactpro.sf.common.messages.FieldNotFoundException;\r\nimport com.exactpro.sf.aml.scriptutil.StaticUtil.IFilter;\r\n\r\nimport java.time.LocalDateTime;\r\nimport java.time.LocalDate;\r\nimport java.time.LocalTime;\r\nimport java.math.BigDecimal;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.lang.Deprecated;\r\n\r\n@SuppressWarnings(\"unused\")\r\npublic class ");
    // 52, 14
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 52, 28
    jamonWriter.write(" extends BaseMessage\r\n{\r\n    public static final String MESSAGE_NAME = \"");
    // 54, 48
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(messageName), jamonWriter);
    // 54, 65
    jamonWriter.write("\";\r\n\t");
    // 55, 2
    for (IAttributeStructure attr : attributes.values() )
    {
      // 55, 57
      jamonWriter.write("\r\n\t");
      // 56, 2
      
        String attrTypeName = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(attr.getType());
        String attrValue = CodeGenUtils.getStringValueView(attr.getType(), attr.getCastValue());
    
      // 60, 2
      jamonWriter.write("public static final ");
      // 60, 22
      org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(attrTypeName), jamonWriter);
      // 60, 40
      jamonWriter.write(" ");
      // 60, 41
      org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(attr.getName()), jamonWriter);
      // 60, 61
      jamonWriter.write(" = ");
      // 60, 64
      org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(attrValue), jamonWriter);
      // 60, 79
      jamonWriter.write(";\r\n\t");
    }
    // 61, 9
    jamonWriter.write("\r\n\r\n\tpublic ");
    // 63, 9
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 63, 23
    jamonWriter.write("(IMessageFactory messageFactory)\r\n\t{\r\n\t\t this(messageFactory.createMessage(MESSAGE_NAME, (messageFactory.getNamespace() == null) ? \"");
    // 65, 95
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(namespaceName), jamonWriter);
    // 65, 114
    jamonWriter.write("\" : messageFactory.getNamespace()));\r\n\t}\r\n\r\n\t/**\r\n\t * @deprecated Please use {@link #");
    // 69, 36
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 69, 50
    jamonWriter.write("(IMessageFactory)}\r\n\t */\r\n\t@Deprecated\r\n\tpublic ");
    // 72, 9
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 72, 23
    jamonWriter.write("()\r\n\t{\r\n\t\tthis(DefaultMessageFactory.getFactory());\r\n\t}\r\n\r\n\t/**\r\n\t * @deprecated Please use {@link #");
    // 78, 36
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 78, 50
    jamonWriter.write("(IMessageFactory)}\r\n\t */\r\n\t@Deprecated\r\n    public ");
    // 81, 12
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 81, 26
    jamonWriter.write("(String name, String namespace)\r\n    {\r\n        super(DefaultMessageFactory.getFactory().createMessage(name, namespace));\r\n    }\r\n\r\n\tpublic ");
    // 86, 9
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 86, 23
    jamonWriter.write("(IMessage msg)\r\n\t{\r\n\t\tsuper(msg);\r\n\t}\r\n\r\n    @Override\r\n    public ");
    // 92, 12
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 92, 26
    jamonWriter.write(" clone() {\r\n        return (");
    // 93, 17
    org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
    // 93, 31
    jamonWriter.write(")super.clone();\r\n    }\r\n\r\n\t");
    // 96, 2
    for (String key : attributes.keySet() )
    {
      // 96, 43
      jamonWriter.write("\r\n\t\t");
      // 97, 3
      if ((key.equalsIgnoreCase("IsAdmin")))
      {
        // 97, 43
        jamonWriter.write("\r\n    \t\tpublic boolean isAdmin(){\r\n    \t\t\treturn ");
        // 99, 15
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(key), jamonWriter);
        // 99, 24
        jamonWriter.write(";\r\n    \t\t}\r\n    \t");
      }
      // 101, 12
      jamonWriter.write("\r\n    ");
    }
    // 102, 12
    jamonWriter.write("\r\n\r\n\t");
    // 104, 2
    if (( fields != null ) )
    {
      // 104, 28
      jamonWriter.write("\r\n\t\t");
      // 105, 3
      for (IFieldStructure field : fields )
      {
        // 105, 42
        jamonWriter.write("\r\n\t\t\t");
        // 106, 4
        
				String fieldTypeName = CodeGenUtils.getTypeName(field, distPackagePath, underscoreAsPackageSeparator);
				String methodCall = "";
			
        // 111, 4
        if (( field.isCollection() ) )
        {
          // 111, 36
          jamonWriter.write("\r\n\t\t\t\tpublic ");
          // 112, 12
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
          // 112, 26
          jamonWriter.write(" add");
          // 112, 30
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 112, 51
          jamonWriter.write("(");
          // 112, 52
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(fieldTypeName), jamonWriter);
          // 112, 71
          jamonWriter.write(" value)\r\n\t\t\t\t{\r\n\t\t\t\t\t");
          // 114, 6
          
						String elType = "";
						if ( field.isComplex() ) {
							elType = "IMessage";
						}
						else
						{
							elType = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(field.getJavaType());
						}
					
          // 125, 6
          jamonWriter.write("List<");
          // 125, 11
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(elType), jamonWriter);
          // 125, 23
          jamonWriter.write("> list = this.msg.>getField(\"");
          // 125, 71
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 125, 92
          jamonWriter.write("\");\r\n\t\r\n\t\t\t\t\tif(list == null){\r\n\t\t\t\t\t\tlist = new ArrayList<");
          // 128, 28
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(elType), jamonWriter);
          // 128, 40
          jamonWriter.write(">();\r\n\t\t\t\t\t\tthis.msg.addField(\"");
          // 129, 26
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 129, 47
          jamonWriter.write("\" ,list);\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t");
          // 132, 6
          if (( field.isComplex() ) )
          {
            // 132, 35
            jamonWriter.write("\r\n\t\t\t\t\tlist.add(value.getMessage());\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t\t");
          }
          // 135, 6
          else if (( field.isEnum() ) )
          {
            // 135, 36
            jamonWriter.write("\r\n\t\t\t\t\tlist.add(value.getValue());\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t\t");
          }
          // 138, 6
          else if (( field.isSimple() ) )
          {
            // 138, 38
            jamonWriter.write("\r\n\t\t\t\t\tlist.add(value);\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t\t");
          }
          // 141, 6
          else
          {
            // 141, 13
            jamonWriter.write("\r\n\t\t\t\t\tthrow new EPSCommonException(\"Unknown type\");\r\n\t\t\t\t\t");
          }
          // 143, 12
          jamonWriter.write("\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tpublic List<");
          // 146, 17
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(fieldTypeName), jamonWriter);
          // 146, 36
          jamonWriter.write("> get");
          // 146, 41
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 146, 62
          jamonWriter.write("()\r\n\t\t\t\t{\r\n\t\t\t\t\t");
          // 148, 6
          
						String elemType = "";
						if ( field.isComplex() ) {
							elemType = "IMessage";
						}
						else
						{
							elemType = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(field.getJavaType());
						}
					
          // 159, 21
          jamonWriter.write("List<");
          // 159, 26
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(elemType), jamonWriter);
          // 159, 40
          jamonWriter.write("> value = this.msg.>getField(\"");
          // 159, 91
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 159, 112
          jamonWriter.write("\");\r\n    \r\n                    if(value == null)\r\n                    {\r\n                        throw new FieldNotFoundException(\" ");
          // 163, 60
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 163, 81
          jamonWriter.write(" \");\r\n                    }\r\n    \r\n                    List<");
          // 166, 26
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(fieldTypeName), jamonWriter);
          // 166, 45
          jamonWriter.write("> list = new ArrayList<");
          // 166, 68
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(fieldTypeName), jamonWriter);
          // 166, 87
          jamonWriter.write(">();\r\n\t\r\n\t\t\t\t\t");
          // 168, 6
          
						if ( field.isEnum() )
						{
							String simpleJavaType = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(field.getJavaType());
							methodCall =  fieldTypeName + ".getEnumValue((" + simpleJavaType + ")element)";
						}
						else if ( field.isComplex() )
						{
							methodCall = "new " + fieldTypeName + "((IMessage)element)";
						}
						else
						{
							String simpleJavaType = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(field.getJavaType());
							methodCall = "(" + simpleJavaType + ")element";
						}
					
          // 185, 6
          jamonWriter.write("for( ");
          // 185, 11
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(elemType), jamonWriter);
          // 185, 25
          jamonWriter.write(" element : value )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlist.add(");
          // 187, 16
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(methodCall), jamonWriter);
          // 187, 32
          jamonWriter.write(");\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\treturn list;\r\n\t\t\t\t}\r\n\t\t\t\t");
          // 192, 5
          if ((field.isEnum()) )
          {
            // 192, 29
            jamonWriter.write("\r\n                public List<");
            // 193, 29
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(elemType), jamonWriter);
            // 193, 43
            jamonWriter.write("> getRaw");
            // 193, 51
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 193, 72
            jamonWriter.write("()\r\n                {\r\n                    List<");
            // 195, 26
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(elemType), jamonWriter);
            // 195, 40
            jamonWriter.write("> value = this.msg.>getField(\"");
            // 195, 91
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 195, 112
            jamonWriter.write("\");\r\n\r\n                    if(value == null)\r\n                    {\r\n                        throw new FieldNotFoundException(\" ");
            // 199, 60
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 199, 81
            jamonWriter.write(" \");\r\n                    }\r\n\r\n                    return new ArrayList<>(value);\r\n                }\r\n                ");
          }
          // 204, 23
          jamonWriter.write("\r\n\r\n                ");
          // 206, 17
          if ((!field.isComplex()) )
          {
            // 206, 45
            jamonWriter.write("\r\n                public List getUntyped");
            // 207, 42
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 207, 63
            jamonWriter.write("()\r\n                {\r\n                    List values = this.msg.getField(\"");
            // 209, 57
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 209, 78
            jamonWriter.write("\");\r\n\r\n                    if(values == null)\r\n                    {\r\n                        throw new FieldNotFoundException(\" ");
            // 213, 60
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 213, 81
            jamonWriter.write(" \");\r\n                    }\r\n\r\n                    List result = new ArrayList<>(values.size());\r\n                    result.addAll(values);\r\n                    return result;\r\n                }\r\n                ");
          }
          // 220, 23
          jamonWriter.write("\r\n\t\r\n\t\t\t");
        }
        // 222, 4
        else
        {
          // 222, 11
          jamonWriter.write("\r\n\t\t\t\tpublic ");
          // 223, 12
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
          // 223, 26
          jamonWriter.write(" set");
          // 223, 30
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 223, 51
          jamonWriter.write("(");
          // 223, 52
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(fieldTypeName), jamonWriter);
          // 223, 71
          jamonWriter.write(" value)\r\n\t\t\t\t{\r\n\t\t\t\t\t");
          // 225, 6
          
						if ( field.isEnum() ) {
							methodCall = ".getValue()";
						}
						else if ( field.isComplex() ) {
							if (!field.isCollection()) {
								methodCall = ".getMessage()";
							}
						} else {
							methodCall = "";
						}
					
          // 238, 6
          jamonWriter.write("this.msg.addField(\"");
          // 238, 25
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 238, 46
          jamonWriter.write("\", value");
          // 238, 54
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(methodCall), jamonWriter);
          // 238, 70
          jamonWriter.write(");\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\t");
          // 242, 5
          if ((field.isEnum()) )
          {
            // 242, 29
            jamonWriter.write("\r\n\t\t\t\t\t");
            // 243, 6
            
						String valueType = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(field.getJavaType());
					
            // 246, 6
            jamonWriter.write("public ");
            // 246, 13
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
            // 246, 27
            jamonWriter.write(" set");
            // 246, 31
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 246, 52
            jamonWriter.write("(");
            // 246, 53
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(valueType), jamonWriter);
            // 246, 68
            jamonWriter.write(" value)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tthis.msg.addField(\"");
            // 248, 26
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 248, 47
            jamonWriter.write("\", value);\r\n\t\t\t\t\t\treturn this;\r\n\t\t\t\t\t}\r\n\r\n                    public ");
            // 252, 28
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(valueType), jamonWriter);
            // 252, 43
            jamonWriter.write(" getRaw");
            // 252, 50
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 252, 71
            jamonWriter.write("()\r\n                    {\r\n                        ");
            // 254, 25
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(valueType), jamonWriter);
            // 254, 40
            jamonWriter.write(" value = this.msg.getField(\"");
            // 254, 68
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 254, 89
            jamonWriter.write("\");\r\n                        if(value == null)\r\n                        {\r\n                            throw new FieldNotFoundException(\" ");
            // 257, 64
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 257, 85
            jamonWriter.write(" \");\r\n                        }\r\n                        return value;\r\n                    }\r\n\t\t\t\t");
          }
          // 261, 11
          jamonWriter.write("\r\n\t\r\n\t\t\t\tpublic ");
          // 263, 12
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(fieldTypeName), jamonWriter);
          // 263, 31
          jamonWriter.write(" get");
          // 263, 35
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 263, 56
          jamonWriter.write("()\r\n\t\t\t\t{\r\n\t\t\t\t\tObject value = this.msg.getField(\"");
          // 265, 40
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
          // 265, 61
          jamonWriter.write("\");\r\n\t\r\n\t\t\t\t\t");
          // 267, 6
          if ((!field.isComplex())
							&& !(field.isEnum())
							&& CodeGenUtils.isPrimitive( field.getJavaType() ) )
          {
            // 269, 61
            jamonWriter.write("\r\n\t\t\t\t\t\tif(value == null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tthrow new FieldNotFoundException(\" ");
            // 272, 43
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 272, 64
            jamonWriter.write(" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t");
          }
          // 274, 12
          jamonWriter.write("\r\n\t\r\n\t\t\t\t\t");
          // 276, 6
          
						if ( field.isEnum() )
						{
							String simpleJavaType = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(field.getJavaType());
							methodCall =  fieldTypeName + ".getEnumValue((" + simpleJavaType + ")value)";
						}
						else if ( field.isComplex() )
						{
							methodCall = "new " + fieldTypeName + "((IMessage)value)";
						}
						else
						{
							String simpleJavaType = CodeGenUtils.convertSimpleFieldTypeToJavaObjectType(field.getJavaType());
							methodCall = "(" + simpleJavaType + ")value";
						}
					
          // 293, 6
          jamonWriter.write("return ");
          // 293, 13
          org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(methodCall), jamonWriter);
          // 293, 29
          jamonWriter.write(";\r\n\t\t\t\t}\r\n\r\n                ");
          // 296, 17
          if ((!field.isComplex()) )
          {
            // 296, 45
            jamonWriter.write("\r\n                public Object getUntyped");
            // 297, 41
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 297, 62
            jamonWriter.write("()\r\n                {\r\n                    return this.msg.getField(\"");
            // 299, 47
            org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
            // 299, 68
            jamonWriter.write("\");\r\n                }\r\n                ");
          }
          // 301, 23
          jamonWriter.write("\r\n\t\t\t");
        }
        // 302, 10
        jamonWriter.write("\r\n\t\t\t\r\n            public IFilter get");
        // 304, 31
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 304, 52
        jamonWriter.write("Filter()\r\n            {\r\n                return this.msg.getField(\"");
        // 306, 43
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 306, 64
        jamonWriter.write("\");\r\n            }\r\n\r\n            public ");
        // 309, 20
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
        // 309, 34
        jamonWriter.write(" set");
        // 309, 38
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 309, 59
        jamonWriter.write("Filter(IFilter filter)\r\n            {\r\n                this.msg.addField(\"");
        // 311, 36
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 311, 57
        jamonWriter.write("\", filter);\r\n                return this;\r\n            }\r\n\r\n            public ");
        // 315, 20
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(typeName), jamonWriter);
        // 315, 34
        jamonWriter.write(" remove");
        // 315, 41
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 315, 62
        jamonWriter.write("()\r\n            {\r\n                this.msg.removeField(\"");
        // 317, 39
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 317, 60
        jamonWriter.write("\");\r\n                return this;\r\n            }\r\n\r\n\t\t\tpublic boolean isSet");
        // 321, 24
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 321, 45
        jamonWriter.write("()\r\n\t\t\t{\r\n\t\t\t\treturn this.msg.getField(\"");
        // 323, 31
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 323, 52
        jamonWriter.write("\") != null;\r\n\t\t\t}\r\n\r\n            public boolean isFilter");
        // 326, 36
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 326, 57
        jamonWriter.write("()\r\n            {\r\n                return this.msg.getField(\"");
        // 328, 43
        org.jamon.escaping.Escaping.NONE.write(org.jamon.emit.StandardEmitter.valueOf(field.getName()), jamonWriter);
        // 328, 64
        jamonWriter.write("\") instanceof IFilter;\r\n            }\r\n\t\t");
      }
      // 330, 10
      jamonWriter.write("\r\n\t");
    }
    // 331, 8
    jamonWriter.write("\r\n}\r\n");
  }
  
  
}