public void deleteSecGroupIncludeByIdIdx(long ClusterId, long SecGroupIncludeId) {
   CFSecuritySecGroupIncludePKey pkey =
       ((ICFInternetSchema) schema.getBackingStore()).getFactorySecGroupInclude().newPKey();
   pkey.setRequiredClusterId(ClusterId);
   pkey.setRequiredSecGroupIncludeId(SecGroupIncludeId);
   ICFSecuritySecGroupIncludeObj obj = readSecGroupInclude(pkey);
   if (obj != null) {
     ICFSecuritySecGroupIncludeEditObj editObj = (ICFSecuritySecGroupIncludeEditObj) obj.getEdit();
     boolean editStarted;
     if (editObj == null) {
       editObj = (ICFSecuritySecGroupIncludeEditObj) obj.beginEdit();
       if (editObj != null) {
         editStarted = true;
       } else {
         editStarted = false;
       }
     } else {
       editStarted = false;
     }
     if (editObj != null) {
       editObj.delete();
       if (editStarted) {
         editObj.endEdit();
       }
     }
     obj.forget(true);
   }
 }
 public ICFSecuritySecGroupIncludeObj readSecGroupIncludeByIdIdx(
     long ClusterId, long SecGroupIncludeId, boolean forceRead) {
   CFSecuritySecGroupIncludePKey pkey =
       ((ICFInternetSchema) schema.getBackingStore()).getFactorySecGroupInclude().newPKey();
   pkey.setRequiredClusterId(ClusterId);
   pkey.setRequiredSecGroupIncludeId(SecGroupIncludeId);
   ICFSecuritySecGroupIncludeObj obj = readSecGroupInclude(pkey, forceRead);
   return (obj);
 }
 public void forgetSecGroupIncludeByIdIdx(long ClusterId, long SecGroupIncludeId) {
   if (members == null) {
     return;
   }
   CFSecuritySecGroupIncludePKey key =
       ((ICFInternetSchema) schema.getBackingStore()).getFactorySecGroupInclude().newPKey();
   key.setRequiredClusterId(ClusterId);
   key.setRequiredSecGroupIncludeId(SecGroupIncludeId);
   if (members.containsKey(key)) {
     ICFSecuritySecGroupIncludeObj probed = members.get(key);
     if (probed != null) {
       probed.forget(true);
     }
   }
 }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFInternetXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      // Primary Key Attributes for Constant Enum support
      String attrClusterId = null;
      String attrSecGroupIncludeId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstSecGroupIncludeLock");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

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

      // Instantiate a PKey buffer for the parsed information
      CFSecuritySecGroupIncludePKey pkey =
          ((ICFInternetSchema) schemaObj.getBackingStore()).getFactorySecGroupInclude().newPKey();

      // 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("SecGroupIncludeId")) {
          if (attrSecGroupIncludeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecGroupIncludeId = 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 ((attrSecGroupIncludeId == null) || (attrSecGroupIncludeId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SecGroupIncludeId");
      }

      // Get current 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);
      pkey.setRequiredClusterId(natClusterId);

      pkey.setRequiredClusterId(natClusterId);
      long natSecGroupIncludeId;
      natSecGroupIncludeId = Long.parseLong(attrSecGroupIncludeId);
      pkey.setRequiredSecGroupIncludeId(natSecGroupIncludeId);

      pkey.setRequiredSecGroupIncludeId(natSecGroupIncludeId);
      // Lock the object
      ICFInternetSecGroupIncludeObj locked =
          ((ICFInternetSecGroupIncludeObj)
              schemaObj.getSecGroupIncludeTableObj().lockSecGroupInclude(pkey));
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFInternetXMsgSecGroupIncludeMessageFormatter.formatSecGroupIncludeRspnLocked(
                  "\n\t\t\t", locked.getSecGroupIncludeBuff())
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      ((CFInternetXMsgRqstHandler) getParser()).appendResponse(response);
    } catch (RuntimeException e) {
      CFInternetXMsgRqstHandler xmsgRqstHandler = ((CFInternetXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFInternetXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFInternetXMsgRqstHandler xmsgRqstHandler = ((CFInternetXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFInternetXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }