protected CFSecurityAuditActionBuff unpackAuditActionResultSetToBuff(ResultSet resultSet)
     throws SQLException {
   final String S_ProcName = "unpackAuditActionResultSetToBuff";
   int idxcol = 1;
   CFSecurityAuditActionBuff buff = schema.getFactoryAuditAction().newBuff();
   buff.setRequiredAuditActionId(
       CFSecuritySchema.ordinalToAuditActionEnum(resultSet.getShort(idxcol)));
   idxcol++;
   buff.setRequiredDescription(resultSet.getString(idxcol));
   idxcol++;
   buff.setRequiredRevision(resultSet.getInt(idxcol));
   return (buff);
 }
 public String toString() {
   String ret =
       "<CFSecurityTenantByUNameIdx"
           + " RequiredClusterId="
           + "\""
           + Long.toString(getRequiredClusterId())
           + "\""
           + " RequiredTenantName="
           + "\""
           + CFSecuritySchema.xmlEncodeString(getRequiredTenantName())
           + "\""
           + "/>";
   return (ret);
 }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // AuditAction Attributes
      String attrAuditActionId = null;
      String attrDescription = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RspnAuditActionCreated");

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

      ICFFreeSwitchSchemaObj 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("AuditActionId")) {
          if (attrAuditActionId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrAuditActionId = 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("schemaLocation")) {
          // ignored
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUnrecognizedAttributeException(
                  getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName);
        }
      }

      // Ensure that required attributes have values
      if ((attrAuditActionId == null) || (attrAuditActionId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "AuditActionId");
      }
      if (attrDescription == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Description");
      }
      if ((attrRevision == null) || (attrRevision.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Revision");
      }

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

      // Convert string attributes to native Java types

      ICFSecuritySchema.AuditActionEnum natAuditActionId =
          CFSecuritySchema.parseAuditActionEnum(attrAuditActionId);

      String natDescription = attrDescription;

      int natRevision = Integer.parseInt(attrRevision);
      // Instantiate a buffer for the parsed information
      ICFFreeSwitchAuditActionObj obj =
          (ICFFreeSwitchAuditActionObj) schemaObj.getAuditActionTableObj().newInstance();
      CFSecurityAuditActionBuff dataBuff = obj.getAuditActionBuff();
      dataBuff.setRequiredAuditActionId(natAuditActionId);
      dataBuff.setRequiredDescription(natDescription);
      dataBuff.setRequiredRevision(natRevision);
      obj.copyBuffToPKey();
      ICFFreeSwitchAuditActionObj realized = (ICFFreeSwitchAuditActionObj) obj.realize();
      xmsgRspnHandler.setLastObjectProcessed(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);
    }
  }