public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFSecuritySysClusterHBuff) {
     CFSecuritySysClusterHBuff rhs = (CFSecuritySysClusterHBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecuritySysClusterBuff) {
     CFSecuritySysClusterBuff rhs = (CFSecuritySysClusterBuff) obj;
     if (!super.equals(obj)) {
       return (false);
     }
     if (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecuritySysClusterByClusterIdxKey) {
     CFSecuritySysClusterByClusterIdxKey rhs = (CFSecuritySysClusterByClusterIdxKey) obj;
     if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecuritySysClusterHPKey) {
     CFSecuritySysClusterHPKey rhs = (CFSecuritySysClusterHPKey) obj;
     {
       long lhsClusterId = getAuditClusterId();
       long rhsClusterId = rhs.getAuditClusterId();
       if (lhsClusterId != rhsClusterId) {
         return (false);
       }
     }
     {
       Calendar lhsAuditStamp = getAuditStamp();
       Calendar rhsAuditStamp = rhs.getAuditStamp();
       if (lhsAuditStamp != null) {
         if (rhsAuditStamp != null) {
           if (!lhsAuditStamp.equals(rhsAuditStamp)) {
             return (false);
           }
         } else {
           return (false);
         }
       } else {
         return (false);
       }
     }
     {
       short lhsActionId = getAuditActionId();
       short rhsActionId = rhs.getAuditActionId();
       if (lhsActionId != rhsActionId) {
         return (false);
       }
     }
     {
       int lhsRevision = getRequiredRevision();
       int rhsRevision = rhs.getRequiredRevision();
       if (lhsRevision != rhsRevision) {
         return (false);
       }
     }
     {
       UUID lhsAuditSessionId = getAuditSessionId();
       UUID rhsAuditSessionId = rhs.getAuditSessionId();
       if (lhsAuditSessionId != null) {
         if (rhsAuditSessionId != null) {
           if (!lhsAuditSessionId.equals(rhsAuditSessionId)) {
             return (false);
           }
         } else {
           return (false);
         }
       } else {
         return (false);
       }
     }
     if (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFSecurityHPKey) {
     CFSecurityHPKey rhs = (CFSecurityHPKey) obj;
     {
       long lhsClusterId = getAuditClusterId();
       long rhsClusterId = rhs.getAuditClusterId();
       if (lhsClusterId != rhsClusterId) {
         return (false);
       }
     }
     {
       Calendar lhsAuditStamp = getAuditStamp();
       Calendar rhsAuditStamp = rhs.getAuditStamp();
       if (lhsAuditStamp != null) {
         if (rhsAuditStamp != null) {
           if (!lhsAuditStamp.equals(rhsAuditStamp)) {
             return (false);
           }
         } else {
           return (false);
         }
       } else {
         return (false);
       }
     }
     {
       short lhsActionId = getAuditActionId();
       short rhsActionId = rhs.getAuditActionId();
       if (lhsActionId != rhsActionId) {
         return (false);
       }
     }
     {
       int lhsRevision = getRequiredRevision();
       int rhsRevision = rhs.getRequiredRevision();
       if (lhsRevision != rhsRevision) {
         return (false);
       }
     }
     {
       UUID lhsAuditSessionId = getAuditSessionId();
       UUID rhsAuditSessionId = rhs.getAuditSessionId();
       if (lhsAuditSessionId != null) {
         if (rhsAuditSessionId != null) {
           if (!lhsAuditSessionId.equals(rhsAuditSessionId)) {
             return (false);
           }
         } else {
           return (false);
         }
       } else {
         return (false);
       }
     }
     return (true);
   } else if (obj instanceof CFSecuritySysClusterPKey) {
     CFSecuritySysClusterPKey rhs = (CFSecuritySysClusterPKey) obj;
     if (getRequiredSingletonId() != rhs.getRequiredSingletonId()) {
       return (false);
     }
     return (true);
   } else {
     return (super.equals(obj));
   }
 }
 public void copyPKeyToBuff() {
   if (buff != null) {
     buff.setRequiredSingletonId(getPKey().getRequiredSingletonId());
   }
   if (edit != null) {
     edit.copyPKeyToBuff();
   }
 }
 public void setSysClusterBuff(CFSecuritySysClusterBuff src) {
   setRequiredSingletonId(src.getRequiredSingletonId());
   setRequiredClusterId(src.getRequiredClusterId());
   setRequiredRevision(src.getRequiredRevision());
 }
 public void copyBuffToPKey() {
   getPKey().setRequiredSingletonId(buff.getRequiredSingletonId());
 }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFAsteriskXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // SysCluster Attributes
      String attrSingletonId = null;
      String attrClusterId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstSysClusterCreate");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

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

      // Instantiate an edit buffer for the parsed information
      ICFAsteriskSysClusterEditObj editBuff =
          (ICFAsteriskSysClusterEditObj)
              schemaObj.getSysClusterTableObj().newInstance().beginEdit();
      CFSecuritySysClusterBuff dataBuff = (CFSecuritySysClusterBuff) editBuff.getSysClusterBuff();
      // 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("schemaLocation")) {
          // ignored
        } 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("SingletonId")) {
          if (attrSingletonId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSingletonId = 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 {
          throw CFLib.getDefaultExceptionFactory()
              .newUnrecognizedAttributeException(
                  getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName);
        }
      }

      // Ensure that required attributes have values
      if ((attrSingletonId == null) || (attrSingletonId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SingletonId");
      }
      if ((attrClusterId == null) || (attrClusterId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ClusterId");
      }

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

      // Convert string attributes to native Java types
      // and apply the converted attributes to the editBuff.
      int natSingletonId = Integer.parseInt(attrSingletonId);

      dataBuff.setRequiredSingletonId(natSingletonId);

      long natClusterId = Long.parseLong(attrClusterId);

      dataBuff.setRequiredClusterId(natClusterId);

      //	Attempt the create
      editBuff.copyBuffToPKey(); // Allow for predefined ids
      ICFAsteriskSysClusterObj created = (ICFAsteriskSysClusterObj) editBuff.create();
      editBuff.endEdit();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFAsteriskXMsgSysClusterMessageFormatter.formatSysClusterRspnCreated(
                  "\n\t\t\t", created.getSysClusterBuff())
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      ((CFAsteriskXMsgRqstHandler) getParser()).appendResponse(response);
    } catch (RuntimeException e) {
      CFAsteriskXMsgRqstHandler xmsgRqstHandler = ((CFAsteriskXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFAsteriskXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFAsteriskXMsgRqstHandler xmsgRqstHandler = ((CFAsteriskXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFAsteriskXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }