public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // ReqMinMaxValue Attributes
      String attrTenantId = null;
      String attrDescription = null;
      String attrTestInt16 = null;
      String attrTestInt32 = null;
      String attrTestInt64 = null;
      String attrTestUInt16 = null;
      String attrTestUInt32 = null;
      String attrTestUInt64 = null;
      String attrTestFloat = null;
      String attrTestDouble = null;
      String attrTestNumber = null;
      String attrTestDate = null;
      String attrTestTimestamp = null;
      String attrTestTZDate = null;
      String attrTestTZTimestamp = null;
      String attrCreatedAt = null;
      String attrCreatedBy = null;
      String attrUpdatedAt = null;
      String attrUpdatedBy = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("ReqMinMaxValue");

      CFDbTestXMsgRspnHandler xmsgRspnHandler = (CFDbTestXMsgRspnHandler) getParser();
      if (xmsgRspnHandler == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "getParser()");
      }

      ICFDbTestSchemaObj schemaObj = xmsgRspnHandler.getSchemaObj();
      if (schemaObj == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()");
      }

      // Extract Attributes
      numAttrs = attrs.getLength();
      for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) {
        attrLocalName = attrs.getLocalName(idxAttr);
        if (attrLocalName.equals("Id")) {
          if (attrId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Revision")) {
          if (attrRevision != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrRevision = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CreatedAt")) {
          if (attrCreatedAt != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCreatedAt = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CreatedBy")) {
          if (attrCreatedBy != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCreatedBy = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("UpdatedAt")) {
          if (attrUpdatedAt != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrUpdatedAt = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("UpdatedBy")) {
          if (attrUpdatedBy != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrUpdatedBy = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TenantId")) {
          if (attrTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Description")) {
          if (attrDescription != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDescription = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestInt16")) {
          if (attrTestInt16 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestInt16 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestInt32")) {
          if (attrTestInt32 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestInt32 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestInt64")) {
          if (attrTestInt64 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestInt64 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestUInt16")) {
          if (attrTestUInt16 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestUInt16 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestUInt32")) {
          if (attrTestUInt32 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestUInt32 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestUInt64")) {
          if (attrTestUInt64 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestUInt64 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestFloat")) {
          if (attrTestFloat != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestFloat = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestDouble")) {
          if (attrTestDouble != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestDouble = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestNumber")) {
          if (attrTestNumber != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestNumber = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestDate")) {
          if (attrTestDate != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestDate = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestTimestamp")) {
          if (attrTestTimestamp != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestTimestamp = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestTZDate")) {
          if (attrTestTZDate != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestTZDate = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestTZTimestamp")) {
          if (attrTestTZTimestamp != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestTZTimestamp = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("schemaLocation")) {
          // ignored
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUnrecognizedAttributeException(
                  getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName);
        }
      }

      // Ensure that required attributes have values
      if ((attrTenantId == null) || (attrTenantId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TenantId");
      }
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrDescription == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Description");
      }
      if ((attrTestInt16 == null) || (attrTestInt16.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestInt16");
      }
      if ((attrTestInt32 == null) || (attrTestInt32.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestInt32");
      }
      if ((attrTestInt64 == null) || (attrTestInt64.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestInt64");
      }
      if ((attrTestUInt16 == null) || (attrTestUInt16.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestUInt16");
      }
      if ((attrTestUInt32 == null) || (attrTestUInt32.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestUInt32");
      }
      if ((attrTestUInt64 == null) || (attrTestUInt64.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestUInt64");
      }
      if ((attrTestFloat == null) || (attrTestFloat.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestFloat");
      }
      if ((attrTestDouble == null) || (attrTestDouble.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestDouble");
      }
      if ((attrTestNumber == null) || (attrTestNumber.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestNumber");
      }
      if ((attrTestDate == null) || (attrTestDate.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestDate");
      }
      if ((attrTestTimestamp == null) || (attrTestTimestamp.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestTimestamp");
      }
      if ((attrTestTZDate == null) || (attrTestTZDate.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestTZDate");
      }
      if ((attrTestTZTimestamp == null) || (attrTestTZTimestamp.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TestTZTimestamp");
      }

      // Save named attributes to context
      CFLibXmlCoreContext curContext = xmsgRspnHandler.getCurContext();

      // Convert string attributes to native Java types

      long natTenantId = Long.parseLong(attrTenantId);

      long natId = Long.parseLong(attrId);

      String natDescription = attrDescription;

      short natTestInt16 = Short.parseShort(attrTestInt16);

      int natTestInt32 = Integer.parseInt(attrTestInt32);

      long natTestInt64 = Long.parseLong(attrTestInt64);

      int natTestUInt16 = Integer.parseInt(attrTestUInt16);

      long natTestUInt32 = Long.parseLong(attrTestUInt32);

      BigDecimal natTestUInt64 = new BigDecimal(attrTestUInt64);

      float natTestFloat = Float.parseFloat(attrTestFloat);

      double natTestDouble = Double.parseDouble(attrTestDouble);

      BigDecimal natTestNumber = new BigDecimal(attrTestNumber);

      Calendar natTestDate;
      try {
        natTestDate = CFLibXmlUtil.parseDate(attrTestDate);
      } catch (RuntimeException e) {
        throw CFLib.getDefaultExceptionFactory()
            .newInvalidArgumentException(getClass(), S_ProcName, 0, "TestDate", attrTestDate, e);
      }

      Calendar natTestTimestamp;
      try {
        natTestTimestamp = CFLibXmlUtil.parseTimestamp(attrTestTimestamp);
      } catch (RuntimeException e) {
        throw CFLib.getDefaultExceptionFactory()
            .newInvalidArgumentException(
                getClass(), S_ProcName, 0, "TestTimestamp", attrTestTimestamp, e);
      }

      Calendar natTestTZDate;
      try {
        natTestTZDate = CFLibXmlUtil.parseTZDate(attrTestTZDate);
      } catch (RuntimeException e) {
        throw CFLib.getDefaultExceptionFactory()
            .newInvalidArgumentException(
                getClass(), S_ProcName, 0, "TestTZDate", attrTestTZDate, e);
      }

      Calendar natTestTZTimestamp;
      try {
        natTestTZTimestamp = CFLibXmlUtil.parseTZTimestamp(attrTestTZTimestamp);
      } catch (RuntimeException e) {
        throw CFLib.getDefaultExceptionFactory()
            .newInvalidArgumentException(
                getClass(), S_ProcName, 0, "TestTZTimestamp", attrTestTZTimestamp, e);
      }

      int natRevision = Integer.parseInt(attrRevision);
      UUID createdBy = null;
      if (attrCreatedBy != null) {
        createdBy = UUID.fromString(attrCreatedBy);
      }
      Calendar createdAt = null;
      if (attrCreatedAt != null) {
        createdAt = CFLibXmlUtil.parseTimestamp(attrCreatedAt);
      }
      UUID updatedBy = null;
      if (attrUpdatedBy != null) {
        updatedBy = UUID.fromString(attrUpdatedBy);
      }
      Calendar updatedAt = null;
      if (attrUpdatedAt != null) {
        updatedAt = CFLibXmlUtil.parseTimestamp(attrUpdatedAt);
      }
      // Get the parent context
      CFLibXmlCoreContext parentContext = curContext.getPrevContext();
      // Instantiate a buffer for the parsed information
      ICFDbTestReqMinMaxValueObj obj =
          (ICFDbTestReqMinMaxValueObj) (schemaObj.getReqMinMaxValueTableObj().newInstance());
      CFDbTestReqMinMaxValueBuff dataBuff = obj.getReqMinMaxValueBuff();
      dataBuff.setRequiredTenantId(natTenantId);
      dataBuff.setRequiredId(natId);
      dataBuff.setRequiredDescription(natDescription);
      dataBuff.setRequiredTestInt16(natTestInt16);
      dataBuff.setRequiredTestInt32(natTestInt32);
      dataBuff.setRequiredTestInt64(natTestInt64);
      dataBuff.setRequiredTestUInt16(natTestUInt16);
      dataBuff.setRequiredTestUInt32(natTestUInt32);
      dataBuff.setRequiredTestUInt64(natTestUInt64);
      dataBuff.setRequiredTestFloat(natTestFloat);
      dataBuff.setRequiredTestDouble(natTestDouble);
      dataBuff.setRequiredTestNumber(natTestNumber);
      dataBuff.setRequiredTestDate(natTestDate);
      dataBuff.setRequiredTestTimestamp(natTestTimestamp);
      dataBuff.setRequiredTestTZDate(natTestTZDate);
      dataBuff.setRequiredTestTZTimestamp(natTestTZTimestamp);
      dataBuff.setRequiredRevision(natRevision);
      if (createdBy != null) {
        dataBuff.setCreatedByUserId(createdBy);
      }
      if (createdAt != null) {
        dataBuff.setCreatedAt(createdAt);
      }
      if (updatedBy != null) {
        dataBuff.setUpdatedByUserId(updatedBy);
      }
      if (updatedAt != null) {
        dataBuff.setUpdatedAt(updatedAt);
      }
      obj.copyBuffToPKey();
      @SuppressWarnings("unchecked")
      List<ICFDbTestReqMinMaxValueObj> list =
          (List<ICFDbTestReqMinMaxValueObj>) xmsgRspnHandler.getListOfObjects();
      ICFDbTestReqMinMaxValueObj realized = (ICFDbTestReqMinMaxValueObj) obj.realize();
      xmsgRspnHandler.setLastObjectProcessed(realized);
      if (list != null) {
        list.add(realized);
      }
    } catch (RuntimeException e) {
      throw new RuntimeException(
          "Near "
              + getParser().getLocationInfo()
              + ": Caught and rethrew "
              + e.getClass().getName()
              + " - "
              + e.getMessage(),
          e);
    } catch (Error e) {
      throw new Error(
          "Near "
              + getParser().getLocationInfo()
              + ": Caught and rethrew "
              + e.getClass().getName()
              + " - "
              + e.getMessage(),
          e);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      // OptMaxValue Attributes
      String attrDescription = null;
      String attrTestInt16 = null;
      String attrTestInt32 = null;
      String attrTestInt64 = null;
      String attrTestUInt16 = null;
      String attrTestUInt32 = null;
      String attrTestUInt64 = null;
      String attrTestFloat = null;
      String attrTestDouble = null;
      String attrTestNumber = null;
      String attrTestDate = null;
      String attrTestTimestamp = null;
      String attrTestTZDate = null;
      String attrTestTZTimestamp = null;
      // OptMaxValue References
      ICFDbTestTenantObj refTenant = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("OptMaxValue");

      CFDbTestSaxLoader saxLoader = (CFDbTestSaxLoader) getParser();
      if (saxLoader == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "getParser()");
      }

      ICFDbTestSchemaObj schemaObj = saxLoader.getSchemaObj();
      if (schemaObj == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "getParser().getSchemaObj()");
      }

      // Instantiate an edit buffer for the parsed information
      ICFDbTestOptMaxValueEditObj editBuff =
          (ICFDbTestOptMaxValueEditObj)
              schemaObj.getOptMaxValueTableObj().newInstance().beginEdit();

      // Extract Attributes
      numAttrs = attrs.getLength();
      for (idxAttr = 0; idxAttr < numAttrs; idxAttr++) {
        attrLocalName = attrs.getLocalName(idxAttr);
        if (attrLocalName.equals("Id")) {
          if (attrId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Description")) {
          if (attrDescription != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDescription = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestInt16")) {
          if (attrTestInt16 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestInt16 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestInt32")) {
          if (attrTestInt32 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestInt32 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestInt64")) {
          if (attrTestInt64 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestInt64 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestUInt16")) {
          if (attrTestUInt16 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestUInt16 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestUInt32")) {
          if (attrTestUInt32 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestUInt32 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestUInt64")) {
          if (attrTestUInt64 != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestUInt64 = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestFloat")) {
          if (attrTestFloat != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestFloat = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestDouble")) {
          if (attrTestDouble != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestDouble = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestNumber")) {
          if (attrTestNumber != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestNumber = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestDate")) {
          if (attrTestDate != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestDate = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestTimestamp")) {
          if (attrTestTimestamp != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestTimestamp = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestTZDate")) {
          if (attrTestTZDate != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestTZDate = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TestTZTimestamp")) {
          if (attrTestTZTimestamp != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTestTZTimestamp = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("schemaLocation")) {
          // ignored
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUnrecognizedAttributeException(
                  getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName);
        }
      }

      // Ensure that required attributes have values
      if (attrDescription == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Description");
      }

      // Save named attributes to context
      CFLibXmlCoreContext curContext = getParser().getCurContext();
      curContext.putNamedValue("Id", attrId);
      curContext.putNamedValue("Description", attrDescription);
      curContext.putNamedValue("TestInt16", attrTestInt16);
      curContext.putNamedValue("TestInt32", attrTestInt32);
      curContext.putNamedValue("TestInt64", attrTestInt64);
      curContext.putNamedValue("TestUInt16", attrTestUInt16);
      curContext.putNamedValue("TestUInt32", attrTestUInt32);
      curContext.putNamedValue("TestUInt64", attrTestUInt64);
      curContext.putNamedValue("TestFloat", attrTestFloat);
      curContext.putNamedValue("TestDouble", attrTestDouble);
      curContext.putNamedValue("TestNumber", attrTestNumber);
      curContext.putNamedValue("TestDate", attrTestDate);
      curContext.putNamedValue("TestTimestamp", attrTestTimestamp);
      curContext.putNamedValue("TestTZDate", attrTestTZDate);
      curContext.putNamedValue("TestTZTimestamp", attrTestTZTimestamp);

      // Convert string attributes to native Java types
      // and apply the converted attributes to the editBuff.

      Integer natId;
      if ((attrId != null) && (attrId.length() > 0)) {
        natId = new Integer(Integer.parseInt(attrId));
      } else {
        natId = null;
      }
      String natDescription = attrDescription;
      editBuff.setRequiredDescription(natDescription);

      Short natTestInt16;
      if ((attrTestInt16 == null) || (attrTestInt16.length() <= 0)) {
        natTestInt16 = null;
      } else {
        natTestInt16 = new Short(Short.parseShort(attrTestInt16));
      }
      editBuff.setOptionalTestInt16(natTestInt16);

      Integer natTestInt32;
      if ((attrTestInt32 == null) || (attrTestInt32.length() <= 0)) {
        natTestInt32 = null;
      } else {
        natTestInt32 = new Integer(Integer.parseInt(attrTestInt32));
      }
      editBuff.setOptionalTestInt32(natTestInt32);

      Long natTestInt64;
      if ((attrTestInt64 == null) || (attrTestInt64.length() <= 0)) {
        natTestInt64 = null;
      } else {
        natTestInt64 = new Long(Long.parseLong(attrTestInt64));
      }
      editBuff.setOptionalTestInt64(natTestInt64);

      Integer natTestUInt16;
      if ((attrTestUInt16 == null) || (attrTestUInt16.length() <= 0)) {
        natTestUInt16 = null;
      } else {
        natTestUInt16 = new Integer(Integer.parseInt(attrTestUInt16));
      }
      editBuff.setOptionalTestUInt16(natTestUInt16);

      Long natTestUInt32;
      if ((attrTestUInt32 == null) || (attrTestUInt32.length() <= 0)) {
        natTestUInt32 = null;
      } else {
        natTestUInt32 = new Long(Long.parseLong(attrTestUInt32));
      }
      editBuff.setOptionalTestUInt32(natTestUInt32);

      BigDecimal natTestUInt64;
      if ((attrTestUInt64 == null) || (attrTestUInt64.length() <= 0)) {
        natTestUInt64 = null;
      } else {
        natTestUInt64 =
            CFLibBigDecimalUtil.parse("CFDbTest.OptMaxValue.TestUInt64", 19, 0, attrTestUInt64);
      }
      editBuff.setOptionalTestUInt64(natTestUInt64);

      Float natTestFloat;
      if ((attrTestFloat == null) || (attrTestFloat.length() <= 0)) {
        natTestFloat = null;
      } else {
        natTestFloat = new Float(Float.parseFloat(attrTestFloat));
      }
      editBuff.setOptionalTestFloat(natTestFloat);

      Double natTestDouble;
      if ((attrTestDouble == null) || (attrTestDouble.length() <= 0)) {
        natTestDouble = null;
      } else {
        natTestDouble = new Double(Double.parseDouble(attrTestDouble));
      }
      editBuff.setOptionalTestDouble(natTestDouble);

      BigDecimal natTestNumber;
      if ((attrTestNumber == null) || (attrTestNumber.length() <= 0)) {
        natTestNumber = null;
      } else {
        natTestNumber =
            CFLibBigDecimalUtil.parse("CFDbTest.OptMaxValue.TestNumber", 20, 0, attrTestNumber);
      }
      editBuff.setOptionalTestNumber(natTestNumber);

      Calendar natTestDate;
      if ((attrTestDate == null) || (attrTestDate.length() <= 0)) {
        natTestDate = null;
      } else {
        try {
          natTestDate = CFLibXmlUtil.parseDate(attrTestDate);
        } catch (RuntimeException e) {
          throw CFLib.getDefaultExceptionFactory()
              .newInvalidArgumentException(getClass(), S_ProcName, 0, "TestDate", attrTestDate, e);
        }
      }
      editBuff.setOptionalTestDate(natTestDate);

      Calendar natTestTimestamp;
      if ((attrTestTimestamp == null) || (attrTestTimestamp.length() <= 0)) {
        natTestTimestamp = null;
      } else {
        try {
          natTestTimestamp = CFLibXmlUtil.parseTimestamp(attrTestTimestamp);
        } catch (RuntimeException e) {
          throw CFLib.getDefaultExceptionFactory()
              .newInvalidArgumentException(
                  getClass(), S_ProcName, 0, "TestTimestamp", attrTestTimestamp, e);
        }
      }
      editBuff.setOptionalTestTimestamp(natTestTimestamp);

      Calendar natTestTZDate;
      if ((attrTestTZDate == null) || (attrTestTZDate.length() <= 0)) {
        natTestTZDate = null;
      } else {
        try {
          natTestTZDate = CFLibXmlUtil.parseTZDate(attrTestTZDate);
        } catch (RuntimeException e) {
          throw CFLib.getDefaultExceptionFactory()
              .newInvalidArgumentException(
                  getClass(), S_ProcName, 0, "TestTZDate", attrTestTZDate, e);
        }
      }
      editBuff.setOptionalTestTZDate(natTestTZDate);

      Calendar natTestTZTimestamp;
      if ((attrTestTZTimestamp == null) || (attrTestTZTimestamp.length() <= 0)) {
        natTestTZTimestamp = null;
      } else {
        try {
          natTestTZTimestamp = CFLibXmlUtil.parseTZTimestamp(attrTestTZTimestamp);
        } catch (RuntimeException e) {
          throw CFLib.getDefaultExceptionFactory()
              .newInvalidArgumentException(
                  getClass(), S_ProcName, 0, "TestTZTimestamp", attrTestTZTimestamp, e);
        }
      }
      editBuff.setOptionalTestTZTimestamp(natTestTZTimestamp);

      // Get the scope/container object

      CFLibXmlCoreContext parentContext = curContext.getPrevContext();
      Object scopeObj;
      if (parentContext != null) {
        scopeObj = parentContext.getNamedValue("Object");
      } else {
        scopeObj = null;
      }

      // Resolve and apply required Container reference

      if (scopeObj == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "scopeObj");
      } else if (scopeObj instanceof ICFDbTestTenantObj) {
        refTenant = (ICFDbTestTenantObj) scopeObj;
        editBuff.setRequiredContainerTenant(refTenant);
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUnsupportedClassException(
                getClass(), S_ProcName, "scopeObj", scopeObj, "ICFDbTestTenantObj");
      }

      CFDbTestSaxLoader.LoaderBehaviourEnum loaderBehaviour =
          saxLoader.getOptMaxValueLoaderBehaviour();
      ICFDbTestOptMaxValueEditObj editOptMaxValue = null;
      ICFDbTestOptMaxValueObj origOptMaxValue =
          (ICFDbTestOptMaxValueObj)
              schemaObj
                  .getOptMaxValueTableObj()
                  .readOptMaxValueByUDescrIdx(
                      refTenant.getRequiredId(), editBuff.getRequiredDescription());
      if (origOptMaxValue == null) {
        editOptMaxValue = editBuff;
      } else {
        switch (loaderBehaviour) {
          case Insert:
            break;
          case Update:
            editOptMaxValue = (ICFDbTestOptMaxValueEditObj) origOptMaxValue.beginEdit();
            editOptMaxValue.setRequiredDescription(editBuff.getRequiredDescription());
            editOptMaxValue.setOptionalTestInt16(editBuff.getOptionalTestInt16());
            editOptMaxValue.setOptionalTestInt32(editBuff.getOptionalTestInt32());
            editOptMaxValue.setOptionalTestInt64(editBuff.getOptionalTestInt64());
            editOptMaxValue.setOptionalTestUInt16(editBuff.getOptionalTestUInt16());
            editOptMaxValue.setOptionalTestUInt32(editBuff.getOptionalTestUInt32());
            editOptMaxValue.setOptionalTestUInt64(editBuff.getOptionalTestUInt64());
            editOptMaxValue.setOptionalTestFloat(editBuff.getOptionalTestFloat());
            editOptMaxValue.setOptionalTestDouble(editBuff.getOptionalTestDouble());
            editOptMaxValue.setOptionalTestNumber(editBuff.getOptionalTestNumber());
            editOptMaxValue.setOptionalTestDate(editBuff.getOptionalTestDate());
            editOptMaxValue.setOptionalTestTimestamp(editBuff.getOptionalTestTimestamp());
            editOptMaxValue.setOptionalTestTZDate(editBuff.getOptionalTestTZDate());
            editOptMaxValue.setOptionalTestTZTimestamp(editBuff.getOptionalTestTZTimestamp());
            break;
          case Replace:
            editOptMaxValue = (ICFDbTestOptMaxValueEditObj) origOptMaxValue.beginEdit();
            editOptMaxValue.delete();
            editOptMaxValue.endEdit();
            origOptMaxValue = null;
            editOptMaxValue = editBuff;
            break;
        }
      }

      if (editOptMaxValue != null) {
        if (origOptMaxValue != null) {
          editOptMaxValue.update();
        } else {
          origOptMaxValue = (ICFDbTestOptMaxValueObj) editOptMaxValue.create();
        }
        editOptMaxValue.endEdit();
      }

      curContext.putNamedValue("Object", origOptMaxValue);
    } catch (RuntimeException e) {
      throw new RuntimeException(
          "Near "
              + getParser().getLocationInfo()
              + ": Caught and rethrew "
              + e.getClass().getName()
              + " - "
              + e.getMessage(),
          e);
    } catch (Error e) {
      throw new Error(
          "Near "
              + getParser().getLocationInfo()
              + ": Caught and rethrew "
              + e.getClass().getName()
              + " - "
              + e.getMessage(),
          e);
    }
  }