public CFSecuritySecGroupFormBuff getBuff() {
   if (buff == null) {
     buff =
         ((ICFAsteriskSchema) getOrigAsSecGroupForm().getSchema().getBackingStore())
             .getFactorySecGroupForm()
             .newBuff();
     buff.set(orig.getBuff());
   }
   return (buff);
 }
 public CFAsteriskSecGroupFormEditObj(ICFSecuritySecGroupFormObj argOrig) {
   orig = argOrig;
   getBuff();
   CFSecuritySecGroupFormBuff origBuff = orig.getBuff();
   buff.set(origBuff);
   requiredOwnerCluster = null;
   requiredContainerGroup = null;
   requiredParentApp = null;
   requiredParentForm = null;
 }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFBamXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrClusterId = null;
      String attrSecGroupId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstSecGroupFormReadByGroupIdx");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

      ICFBamSchemaObj schemaObj = xmsgRqstHandler.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("ClusterId")) {
          if (attrClusterId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrClusterId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SecGroupId")) {
          if (attrSecGroupId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecGroupId = 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 ((attrClusterId == null) || (attrClusterId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ClusterId");
      }
      if ((attrSecGroupId == null) || (attrSecGroupId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SecGroupId");
      }

      // Save named attributes to context
      CFLibXmlCoreContext curContext = getParser().getCurContext();
      // Convert string attributes to native Java types
      // and apply the converted attributes to the editBuff.

      long natClusterId;
      natClusterId = Long.parseLong(attrClusterId);

      int natSecGroupId;
      natSecGroupId = Integer.parseInt(attrSecGroupId);

      // Read the objects
      List<ICFSecuritySecGroupFormObj> list =
          schemaObj
              .getSecGroupFormTableObj()
              .readSecGroupFormByGroupIdx(natClusterId, natSecGroupId);
      String responseOpening =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgSecGroupFormMessageFormatter.formatSecGroupFormRspnListOpenTag();
      xmsgRqstHandler.appendResponse(responseOpening);
      Iterator<ICFSecuritySecGroupFormObj> iter = list.iterator();
      ICFSecuritySecGroupFormObj cur;
      String subxml;
      while (iter.hasNext()) {
        cur = iter.next();
        subxml =
            CFBamXMsgSecGroupFormMessageFormatter.formatSecGroupFormRspnDerivedRec(
                "\n\t\t", cur.getSecGroupFormBuff());
        xmsgRqstHandler.appendResponse(subxml);
      }
      String responseClosing =
          "\n"
              + "\t"
              + CFBamXMsgSecGroupFormMessageFormatter.formatSecGroupFormRspnListCloseTag()
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.appendResponse(responseClosing);
    } catch (RuntimeException e) {
      CFBamXMsgRqstHandler xmsgRqstHandler = ((CFBamXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFBamXMsgRqstHandler xmsgRqstHandler = ((CFBamXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
 public void setIsNew(boolean value) {
   orig.setIsNew(value);
 }
 public boolean getIsNew() {
   return (orig.getIsNew());
 }
 public void setPKey(CFSecuritySecGroupFormPKey value) {
   orig.setPKey(value);
   copyPKeyToBuff();
 }
 public CFSecuritySecGroupFormPKey getPKey() {
   return (orig.getPKey());
 }
 public ICFSecuritySchemaObj getSchema() {
   return (orig.getSchema());
 }
 public void endEdit() {
   orig.endEdit();
 }
 public ICFSecuritySecGroupFormTableObj getSecGroupFormTable() {
   return (orig.getSchema().getSecGroupFormTableObj());
 }