public class CFBamClusterBuff implements Comparable<Object>, Serializable {
  public static final String CLASS_CODE = "CLUS";
  public static final String S_INIT_CREATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_CREATEDBY = UUID.fromString(S_INIT_CREATEDBY);
  public static final String S_INIT_UPDATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_UPDATEDBY = UUID.fromString(S_INIT_UPDATEDBY);
  public static final long ID_INIT_VALUE = 0L;
  public static final String FULLDOMAINNAME_INIT_VALUE = new String("");
  public static final String DESCRIPTION_INIT_VALUE = new String("");
  public static final long ID_MIN_VALUE = 0L;
  protected UUID createdByUserId = CFBamClusterBuff.INIT_CREATEDBY;
  protected Calendar createdAt = Calendar.getInstance();
  protected UUID updatedByUserId = CFBamClusterBuff.INIT_UPDATEDBY;
  protected Calendar updatedAt = Calendar.getInstance();
  protected long requiredId;
  protected String requiredFullDomainName;
  protected String requiredDescription;
  protected int requiredRevision;

  public CFBamClusterBuff() {
    requiredId = CFBamClusterBuff.ID_INIT_VALUE;
    requiredFullDomainName = new String(CFBamClusterBuff.FULLDOMAINNAME_INIT_VALUE);
    requiredDescription = new String(CFBamClusterBuff.DESCRIPTION_INIT_VALUE);
  }

  public String getClassCode() {
    return (CLASS_CODE);
  }

  public UUID getCreatedByUserId() {
    return (createdByUserId);
  }

  public void setCreatedByUserId(UUID value) {
    createdByUserId = value;
  }

  public Calendar getCreatedAt() {
    return (createdAt);
  }

  public void setCreatedAt(Calendar value) {
    createdAt = value;
  }

  public UUID getUpdatedByUserId() {
    return (updatedByUserId);
  }

  public void setUpdatedByUserId(UUID value) {
    updatedByUserId = value;
  }

  public Calendar getUpdatedAt() {
    return (updatedAt);
  }

  public void setUpdatedAt(Calendar value) {
    updatedAt = value;
  }

  public long getRequiredId() {
    return (requiredId);
  }

  public void setRequiredId(long value) {
    if (value < CFBamClusterBuff.ID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(), "setRequiredId", 1, "value", value, CFBamClusterBuff.ID_MIN_VALUE);
    }
    requiredId = value;
  }

  public String getRequiredFullDomainName() {
    return (requiredFullDomainName);
  }

  public void setRequiredFullDomainName(String value) {
    if (value == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "setRequiredFullDomainName", 1, "value");
    }
    if (value.length() > 192) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentOverflowException(
              getClass(), "setRequiredFullDomainName", 1, "value.length()", value.length(), 192);
    }
    requiredFullDomainName = value;
  }

  public String getRequiredDescription() {
    return (requiredDescription);
  }

  public void setRequiredDescription(String value) {
    if (value == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), "setRequiredDescription", 1, "value");
    }
    if (value.length() > 128) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentOverflowException(
              getClass(), "setRequiredDescription", 1, "value.length()", value.length(), 128);
    }
    requiredDescription = value;
  }

  public int getRequiredRevision() {
    return (requiredRevision);
  }

  public void setRequiredRevision(int value) {
    requiredRevision = value;
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return (false);
    } else if (obj instanceof CFBamClusterBuff) {
      CFBamClusterBuff rhs = (CFBamClusterBuff) obj;
      if (!getCreatedByUserId().equals(rhs.getCreatedByUserId())) {
        return (false);
      }
      if (!getCreatedAt().equals(rhs.getCreatedAt())) {
        return (false);
      }
      if (!getUpdatedByUserId().equals(rhs.getUpdatedByUserId())) {
        return (false);
      }
      if (!getUpdatedAt().equals(rhs.getUpdatedAt())) {
        return (false);
      }
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
        return (false);
      }
      if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterPKey) {
      CFBamClusterPKey rhs = (CFBamClusterPKey) obj;
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterHBuff) {
      CFBamClusterHBuff rhs = (CFBamClusterHBuff) obj;
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
        return (false);
      }
      if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterHPKey) {
      CFBamClusterHPKey rhs = (CFBamClusterHPKey) obj;
      if (getRequiredId() != rhs.getRequiredId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterByUDomainNameIdxKey) {
      CFBamClusterByUDomainNameIdxKey rhs = (CFBamClusterByUDomainNameIdxKey) obj;
      if (!getRequiredFullDomainName().equals(rhs.getRequiredFullDomainName())) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFBamClusterByUDescrIdxKey) {
      CFBamClusterByUDescrIdxKey rhs = (CFBamClusterByUDescrIdxKey) obj;
      if (!getRequiredDescription().equals(rhs.getRequiredDescription())) {
        return (false);
      }
      return (true);
    } else {
      boolean retval = super.equals(obj);
      return (retval);
    }
  }

  public int hashCode() {
    int hashCode = 0;
    hashCode = hashCode + getCreatedByUserId().hashCode();
    hashCode = hashCode + getCreatedAt().hashCode();
    hashCode = hashCode + getUpdatedByUserId().hashCode();
    hashCode = hashCode + getUpdatedAt().hashCode();
    hashCode = hashCode + (int) (getRequiredId());
    if (getRequiredFullDomainName() != null) {
      hashCode = hashCode + getRequiredFullDomainName().hashCode();
    }
    if (getRequiredDescription() != null) {
      hashCode = hashCode + getRequiredDescription().hashCode();
    }
    return (hashCode & 0x7fffffff);
  }

  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFBamClusterBuff) {
      CFBamClusterBuff rhs = (CFBamClusterBuff) obj;
      int retval = 0;
      {
        int cmp = getCreatedByUserId().compareTo(rhs.getCreatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getCreatedAt().compareTo(rhs.getCreatedAt());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedByUserId().compareTo(rhs.getUpdatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedAt().compareTo(rhs.getUpdatedAt());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamClusterPKey) {
      CFBamClusterPKey rhs = (CFBamClusterPKey) obj;
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamClusterHPKey) {
      CFBamClusterHPKey rhs = (CFBamClusterHPKey) obj;
      {
        int lhsRequiredRevision = getRequiredRevision();
        int rhsRequiredRevision = rhs.getRequiredRevision();
        if (lhsRequiredRevision < rhsRequiredRevision) {
          return (-1);
        } else if (lhsRequiredRevision > rhsRequiredRevision) {
          return (1);
        }
      }
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFBamClusterHBuff) {
      CFBamClusterHBuff rhs = (CFBamClusterHBuff) obj;
      int retval = 0;
      if (getRequiredId() < rhs.getRequiredId()) {
        return (-1);
      } else if (getRequiredId() > rhs.getRequiredId()) {
        return (1);
      }
      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamClusterByUDomainNameIdxKey) {
      CFBamClusterByUDomainNameIdxKey rhs = (CFBamClusterByUDomainNameIdxKey) obj;

      {
        int cmp = getRequiredFullDomainName().compareTo(rhs.getRequiredFullDomainName());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else if (obj instanceof CFBamClusterByUDescrIdxKey) {
      CFBamClusterByUDescrIdxKey rhs = (CFBamClusterByUDescrIdxKey) obj;

      {
        int cmp = getRequiredDescription().compareTo(rhs.getRequiredDescription());
        if (cmp != 0) {
          return (cmp);
        }
      }
      return (0);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
    }
  }

  public void set(CFBamClusterBuff src) {
    setClusterBuff(src);
  }

  public void setClusterBuff(CFBamClusterBuff src) {
    setRequiredId(src.getRequiredId());
    setCreatedByUserId(src.getCreatedByUserId());
    setCreatedAt(src.getCreatedAt());
    setUpdatedByUserId(src.getUpdatedByUserId());
    setUpdatedAt(src.getUpdatedAt());
    setRequiredFullDomainName(src.getRequiredFullDomainName());
    setRequiredDescription(src.getRequiredDescription());
    setRequiredRevision(src.getRequiredRevision());
  }

  public void set(CFBamClusterHBuff src) {
    setClusterBuff(src);
  }

  public void setClusterBuff(CFBamClusterHBuff src) {
    setRequiredId(src.getRequiredId());
    setRequiredFullDomainName(src.getRequiredFullDomainName());
    setRequiredDescription(src.getRequiredDescription());
  }
}
  protected CFSecurityTSecGroupBuff unpackTSecGroupResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackTSecGroupResultSetToBuff";
    int idxcol = 1;
    CFSecurityTSecGroupBuff buff = schema.getFactoryTSecGroup().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFSecurityMySqlSchema.convertTimestampString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFSecurityMySqlSchema.convertTimestampString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
    }
    idxcol++;
    buff.setRequiredTenantId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredTSecGroupId(resultSet.getInt(idxcol));
    idxcol++;
    buff.setRequiredName(resultSet.getString(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  protected CFAccFeeDetailBuff unpackFeeDetailResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackFeeDetailResultSetToBuff";
    int idxcol = 1;
    CFAccFeeDetailBuff buff = schema.getFactoryFeeDetail().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFAccSybaseSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFAccSybaseSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredTenantId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredFeeId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredFeeDetailId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredDescription(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredAmountCharged(resultSet.getBigDecimal(idxcol));
    idxcol++;
    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  protected CFSecurityHostNodeBuff unpackHostNodeResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackHostNodeResultSetToBuff";
    int idxcol = 1;
    CFSecurityHostNodeBuff buff = schema.getFactoryHostNode().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFSecurityPgSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFSecurityPgSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredClusterId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredHostNodeId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredDescription(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredHostName(resultSet.getString(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  protected CFSecurityISOCountryLanguageBuff unpackISOCountryLanguageResultSetToBuff(
      ResultSet resultSet) throws SQLException {
    final String S_ProcName = "unpackISOCountryLanguageResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOCountryLanguageBuff buff = schema.getFactoryISOCountryLanguage().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFCrmMySqlSchema.convertTimestampString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFCrmMySqlSchema.convertTimestampString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
    }
    idxcol++;
    buff.setRequiredISOCountryId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISOLanguageId(resultSet.getShort(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  protected CFSecuritySecFormBuff unpackSecFormResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackSecFormResultSetToBuff";
    int idxcol = 1;
    CFSecuritySecFormBuff buff = schema.getFactorySecForm().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFCrmDb2LUWSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFCrmDb2LUWSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredClusterId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredSecFormId(resultSet.getInt(idxcol));
    idxcol++;
    buff.setRequiredSecAppId(resultSet.getInt(idxcol));
    idxcol++;
    buff.setRequiredJEEServletMapName(resultSet.getString(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  protected CFInternetURLProtocolBuff unpackURLProtocolResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackURLProtocolResultSetToBuff";
    int idxcol = 1;
    CFInternetURLProtocolBuff buff = schema.getFactoryURLProtocol().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFDbTestPgSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFDbTestPgSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredURLProtocolId(resultSet.getInt(idxcol));
    idxcol++;
    buff.setRequiredName(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredDescription(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredIsSecure(resultSet.getBoolean(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  protected CFCrmMemoDataBuff unpackMemoDataResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackMemoDataResultSetToBuff";
    int idxcol = 1;
    CFCrmMemoDataBuff buff = schema.getFactoryMemoData().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFCrmMSSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFCrmMSSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredTenantId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredMemoId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredContactId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredMemo(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
 public CFSecurityTSecGroupMemberHBuff() {
   super();
   requiredTenantId = CFSecurityTSecGroupMemberBuff.TENANTID_INIT_VALUE;
   requiredTSecGroupMemberId = CFSecurityTSecGroupMemberBuff.TSECGROUPMEMBERID_INIT_VALUE;
   requiredTSecGroupId = CFSecurityTSecGroupMemberBuff.TSECGROUPID_INIT_VALUE;
   requiredSecUserId =
       UUID.fromString(CFSecurityTSecGroupMemberBuff.SECUSERID_INIT_VALUE.toString());
 }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFBamXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Value Attributes
      String attrTenantId = null;
      String attrScopeId = null;
      String attrDefSchemaTenantId = null;
      String attrDefSchemaId = null;
      String attrName = null;
      String attrShortName = null;
      String attrLabel = null;
      String attrShortDescription = null;
      String attrDescription = null;
      String attrIsNullable = null;
      String attrGenerateId = null;
      String attrDataScopeId = null;
      String attrViewAccessSecurityId = null;
      String attrEditAccessSecurityId = null;
      String attrViewAccessFrequencyId = null;
      String attrEditAccessFrequencyId = null;
      String attrPrevTenantId = null;
      String attrPrevId = null;
      String attrNextTenantId = null;
      String attrNextId = null;
      String attrDefaultVisibility = null;
      String attrCreatedAt = null;
      String attrCreatedBy = null;
      String attrUpdatedAt = null;
      String attrUpdatedBy = null;
      // Atom Attributes
      String attrDbName = null;
      // BlobDef Attributes
      String attrMaxLen = null;
      String attrInitValue = null;
      String attrDefaultValue = null;
      String attrNullValue = null;
      String attrUnknownValue = null;
      // BlobType Attributes
      String attrSchemaDefId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstBlobTypeCreate");

      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()");
      }

      // Instantiate an edit buffer for the parsed information
      ICFBamBlobTypeEditObj editBuff =
          (ICFBamBlobTypeEditObj) schemaObj.getBlobTypeTableObj().newInstance().beginEdit();
      CFBamBlobTypeBuff dataBuff = (CFBamBlobTypeBuff) editBuff.getBlobTypeBuff();
      // 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("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("ScopeId")) {
          if (attrScopeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrScopeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaTenantId")) {
          if (attrDefSchemaTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaId")) {
          if (attrDefSchemaId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ShortName")) {
          if (attrShortName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrShortName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Label")) {
          if (attrLabel != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrLabel = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ShortDescription")) {
          if (attrShortDescription != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrShortDescription = 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("IsNullable")) {
          if (attrIsNullable != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrIsNullable = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("GenerateId")) {
          if (attrGenerateId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrGenerateId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DataScopeId")) {
          if (attrDataScopeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDataScopeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ViewAccessSecurityId")) {
          if (attrViewAccessSecurityId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrViewAccessSecurityId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EditAccessSecurityId")) {
          if (attrEditAccessSecurityId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEditAccessSecurityId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ViewAccessFrequencyId")) {
          if (attrViewAccessFrequencyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrViewAccessFrequencyId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EditAccessFrequencyId")) {
          if (attrEditAccessFrequencyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEditAccessFrequencyId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevTenantId")) {
          if (attrPrevTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevId")) {
          if (attrPrevId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextTenantId")) {
          if (attrNextTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextId")) {
          if (attrNextId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefaultVisibility")) {
          if (attrDefaultVisibility != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefaultVisibility = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DbName")) {
          if (attrDbName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDbName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MaxLen")) {
          if (attrMaxLen != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMaxLen = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("InitValue")) {
          if (attrInitValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrInitValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefaultValue")) {
          if (attrDefaultValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefaultValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NullValue")) {
          if (attrNullValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNullValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("UnknownValue")) {
          if (attrUnknownValue != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrUnknownValue = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SchemaDefId")) {
          if (attrSchemaDefId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSchemaDefId = attrs.getValue(idxAttr);
        } 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 ((attrScopeId == null) || (attrScopeId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ScopeId");
      }
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if ((attrIsNullable == null) || (attrIsNullable.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "IsNullable");
      }
      if ((attrDefaultVisibility == null) || (attrDefaultVisibility.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "DefaultVisibility");
      }
      if ((attrMaxLen == null) || (attrMaxLen.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "MaxLen");
      }
      if ((attrSchemaDefId == null) || (attrSchemaDefId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SchemaDefId");
      }

      // 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 natTenantId = Long.parseLong(attrTenantId);

      dataBuff.setRequiredTenantId(natTenantId);

      long natScopeId = Long.parseLong(attrScopeId);

      dataBuff.setRequiredScopeId(natScopeId);

      Long natDefSchemaTenantId;
      if ((attrDefSchemaTenantId == null) || (attrDefSchemaTenantId.length() <= 0)) {
        natDefSchemaTenantId = null;
      } else {
        natDefSchemaTenantId = new Long(Long.parseLong(attrDefSchemaTenantId));
      }

      dataBuff.setOptionalDefSchemaTenantId(natDefSchemaTenantId);

      Long natDefSchemaId;
      if ((attrDefSchemaId == null) || (attrDefSchemaId.length() <= 0)) {
        natDefSchemaId = null;
      } else {
        natDefSchemaId = new Long(Long.parseLong(attrDefSchemaId));
      }

      dataBuff.setOptionalDefSchemaId(natDefSchemaId);

      String natName = attrName;

      dataBuff.setRequiredName(natName);

      String natShortName = attrShortName;

      dataBuff.setOptionalShortName(natShortName);

      String natLabel = attrLabel;

      dataBuff.setOptionalLabel(natLabel);

      String natShortDescription = attrShortDescription;

      dataBuff.setOptionalShortDescription(natShortDescription);

      String natDescription = attrDescription;

      dataBuff.setOptionalDescription(natDescription);

      boolean natIsNullable;
      if (attrIsNullable.equals("true")
          || attrIsNullable.equals("yes")
          || attrIsNullable.equals("1")) {
        natIsNullable = true;
      } else if (attrIsNullable.equals("false")
          || attrIsNullable.equals("no")
          || attrIsNullable.equals("0")) {
        natIsNullable = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected IsNullable value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrIsNullable
                    + "\"");
      }

      dataBuff.setRequiredIsNullable(natIsNullable);

      Boolean natGenerateId;
      if ((attrGenerateId == null) || (attrGenerateId.length() <= 0)) {
        natGenerateId = null;
      } else if (attrGenerateId.equals("true")
          || attrGenerateId.equals("yes")
          || attrGenerateId.equals("1")) {
        natGenerateId = true;
      } else if (attrGenerateId.equals("false")
          || attrGenerateId.equals("no")
          || attrGenerateId.equals("0")) {
        natGenerateId = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected GenerateId value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrGenerateId
                    + "\"");
      }

      dataBuff.setOptionalGenerateId(natGenerateId);

      Short natDataScopeId;
      if ((attrDataScopeId == null) || (attrDataScopeId.length() <= 0)) {
        natDataScopeId = null;
      } else {
        natDataScopeId = new Short(Short.parseShort(attrDataScopeId));
      }

      dataBuff.setOptionalDataScopeId(natDataScopeId);

      Short natViewAccessSecurityId;
      if ((attrViewAccessSecurityId == null) || (attrViewAccessSecurityId.length() <= 0)) {
        natViewAccessSecurityId = null;
      } else {
        natViewAccessSecurityId = new Short(Short.parseShort(attrViewAccessSecurityId));
      }

      dataBuff.setOptionalViewAccessSecurityId(natViewAccessSecurityId);

      Short natEditAccessSecurityId;
      if ((attrEditAccessSecurityId == null) || (attrEditAccessSecurityId.length() <= 0)) {
        natEditAccessSecurityId = null;
      } else {
        natEditAccessSecurityId = new Short(Short.parseShort(attrEditAccessSecurityId));
      }

      dataBuff.setOptionalEditAccessSecurityId(natEditAccessSecurityId);

      Short natViewAccessFrequencyId;
      if ((attrViewAccessFrequencyId == null) || (attrViewAccessFrequencyId.length() <= 0)) {
        natViewAccessFrequencyId = null;
      } else {
        natViewAccessFrequencyId = new Short(Short.parseShort(attrViewAccessFrequencyId));
      }

      dataBuff.setOptionalViewAccessFrequencyId(natViewAccessFrequencyId);

      Short natEditAccessFrequencyId;
      if ((attrEditAccessFrequencyId == null) || (attrEditAccessFrequencyId.length() <= 0)) {
        natEditAccessFrequencyId = null;
      } else {
        natEditAccessFrequencyId = new Short(Short.parseShort(attrEditAccessFrequencyId));
      }

      dataBuff.setOptionalEditAccessFrequencyId(natEditAccessFrequencyId);

      Long natPrevTenantId;
      if ((attrPrevTenantId == null) || (attrPrevTenantId.length() <= 0)) {
        natPrevTenantId = null;
      } else {
        natPrevTenantId = new Long(Long.parseLong(attrPrevTenantId));
      }

      dataBuff.setOptionalPrevTenantId(natPrevTenantId);

      Long natPrevId;
      if ((attrPrevId == null) || (attrPrevId.length() <= 0)) {
        natPrevId = null;
      } else {
        natPrevId = new Long(Long.parseLong(attrPrevId));
      }

      dataBuff.setOptionalPrevId(natPrevId);

      Long natNextTenantId;
      if ((attrNextTenantId == null) || (attrNextTenantId.length() <= 0)) {
        natNextTenantId = null;
      } else {
        natNextTenantId = new Long(Long.parseLong(attrNextTenantId));
      }

      dataBuff.setOptionalNextTenantId(natNextTenantId);

      Long natNextId;
      if ((attrNextId == null) || (attrNextId.length() <= 0)) {
        natNextId = null;
      } else {
        natNextId = new Long(Long.parseLong(attrNextId));
      }

      dataBuff.setOptionalNextId(natNextId);

      boolean natDefaultVisibility;
      if (attrDefaultVisibility.equals("true")
          || attrDefaultVisibility.equals("yes")
          || attrDefaultVisibility.equals("1")) {
        natDefaultVisibility = true;
      } else if (attrDefaultVisibility.equals("false")
          || attrDefaultVisibility.equals("no")
          || attrDefaultVisibility.equals("0")) {
        natDefaultVisibility = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected DefaultVisibility value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrDefaultVisibility
                    + "\"");
      }

      dataBuff.setRequiredDefaultVisibility(natDefaultVisibility);

      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);
      }
      if (createdBy != null) {
        dataBuff.setCreatedByUserId(createdBy);
      }
      if (createdAt != null) {
        dataBuff.setCreatedAt(createdAt);
      }
      if (updatedBy != null) {
        dataBuff.setUpdatedByUserId(updatedBy);
      }
      if (updatedAt != null) {
        dataBuff.setUpdatedAt(updatedAt);
      }
      String natDbName = attrDbName;

      dataBuff.setOptionalDbName(natDbName);

      int natMaxLen = Integer.parseInt(attrMaxLen);

      dataBuff.setRequiredMaxLen(natMaxLen);

      byte[] natInitValue;
      if (attrInitValue == null) {
        natInitValue = null;
      } else if (attrInitValue.length() <= 0) {
        natInitValue = new byte[0];
      } else {
        natInitValue = Base64.decodeBase64(attrInitValue.getBytes());
      }

      dataBuff.setOptionalInitValue(natInitValue);

      byte[] natDefaultValue;
      if (attrDefaultValue == null) {
        natDefaultValue = null;
      } else if (attrDefaultValue.length() <= 0) {
        natDefaultValue = new byte[0];
      } else {
        natDefaultValue = Base64.decodeBase64(attrDefaultValue.getBytes());
      }

      dataBuff.setOptionalDefaultValue(natDefaultValue);

      byte[] natNullValue;
      if (attrNullValue == null) {
        natNullValue = null;
      } else if (attrNullValue.length() <= 0) {
        natNullValue = new byte[0];
      } else {
        natNullValue = Base64.decodeBase64(attrNullValue.getBytes());
      }

      dataBuff.setOptionalNullValue(natNullValue);

      byte[] natUnknownValue;
      if (attrUnknownValue == null) {
        natUnknownValue = null;
      } else if (attrUnknownValue.length() <= 0) {
        natUnknownValue = new byte[0];
      } else {
        natUnknownValue = Base64.decodeBase64(attrUnknownValue.getBytes());
      }

      dataBuff.setOptionalUnknownValue(natUnknownValue);

      long natSchemaDefId = Long.parseLong(attrSchemaDefId);

      dataBuff.setRequiredSchemaDefId(natSchemaDefId);

      //	Attempt the create
      editBuff.copyBuffToPKey(); // Allow for predefined ids
      ICFBamBlobTypeObj created = (ICFBamBlobTypeObj) editBuff.create();
      editBuff.endEdit();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFBamXMsgBlobTypeMessageFormatter.formatBlobTypeRspnCreated(
                  "\n\t\t\t", created.getBlobTypeBuff())
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      ((CFBamXMsgRqstHandler) getParser()).appendResponse(response);
    } 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);
    }
  }
  protected CFSecurityISOCurrencyBuff unpackISOCurrencyResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackISOCurrencyResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOCurrencyBuff buff = schema.getFactoryISOCurrency().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFInternetMSSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFInternetMSSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredISOCurrencyId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISOCode(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredName(resultSet.getString(idxcol));
    idxcol++;
    {
      String colVal = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setOptionalUnitSymbol(null);
      } else {
        buff.setOptionalUnitSymbol(colVal);
      }
    }
    idxcol++;
    buff.setRequiredPrecis(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFCrmXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Primary Key Attributes for Constant Enum support
      String attrSecSessionId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstSecSessionDelete");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

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

      // Instantiate a PKey buffer for the parsed information
      CFSecuritySecSessionPKey pkey =
          ((ICFCrmSchema) schemaObj.getBackingStore()).getFactorySecSession().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("Revision")) {
          if (attrRevision != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrRevision = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SecSessionId")) {
          if (attrSecSessionId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecSessionId = 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 ((attrSecSessionId == null) || (attrSecSessionId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SecSessionId");
      }
      if ((attrRevision == null) || (attrRevision.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Revision");
      }

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

      UUID natSecSessionId;
      if ((attrSecSessionId == null) || (attrSecSessionId.length() <= 0)) {
        natSecSessionId = null;
      } else {
        natSecSessionId = UUID.fromString(attrSecSessionId);
      }
      pkey.setRequiredSecSessionId(natSecSessionId);

      pkey.setRequiredSecSessionId(natSecSessionId);
      int natRevision = Integer.parseInt(attrRevision);
      // Delete the object
      ICFCrmSecSessionObj read =
          ((ICFCrmSecSessionObj) schemaObj.getSecSessionTableObj().readSecSession(pkey));
      if (read != null) {
        if (read.getSecSessionBuff().getRequiredRevision() > natRevision) {
          throw CFLib.getDefaultExceptionFactory()
              .newCollisionDetectedException(
                  getClass(), S_ProcName, "Collision detected preparing to delete SecSession");
        } else {
          ICFCrmSecSessionEditObj editBuff = (ICFCrmSecSessionEditObj) read.beginEdit();
          if (editBuff != null) {
            editBuff.delete();
            editBuff.endEdit();
            String response =
                schemaFormatter.formatRspnXmlPreamble()
                    + "\n"
                    + "\t"
                    + CFCrmXMsgSecSessionMessageFormatter.formatSecSessionRspnDeleted()
                    + "\n"
                    + schemaFormatter.formatRspnXmlPostamble();
            ((CFCrmXMsgRqstHandler) getParser()).appendResponse(response);
          } else {
            throw CFLib.getDefaultExceptionFactory()
                .newNullArgumentException(getClass(), S_ProcName, 0, "read.beginEdit()");
          }
        }
      } else {
        String response =
            schemaFormatter.formatRspnXmlPreamble()
                + "\n"
                + "\t"
                + CFCrmXMsgSchemaMessageFormatter.formatRspnNoDataFound()
                + "\n"
                + schemaFormatter.formatRspnXmlPostamble();
        ((CFCrmXMsgRqstHandler) getParser()).appendResponse(response);
      }
    } catch (RuntimeException e) {
      CFCrmXMsgRqstHandler xmsgRqstHandler = ((CFCrmXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFCrmXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFCrmXMsgRqstHandler xmsgRqstHandler = ((CFCrmXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFCrmXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
  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);
    }
  }
  protected CFSecurityISOTimezoneBuff unpackISOTimezoneResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackISOTimezoneResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOTimezoneBuff buff = schema.getFactoryISOTimezone().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFDbTestPgSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFDbTestPgSqlSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredISOTimezoneId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredIso8601(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredTZName(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredTZHourOffset(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredTZMinOffset(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredDescription(resultSet.getString(idxcol));
    idxcol++;
    buff.setRequiredVisible(resultSet.getBoolean(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFSecurityXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrSecProxyId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstSecSessionDeleteBySecProxyIdx");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

      ICFSecuritySchemaObj 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("SecProxyId")) {
          if (attrSecProxyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecProxyId = 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

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

      UUID natSecProxyId;
      if ((attrSecProxyId == null) || (attrSecProxyId.length() <= 0)) {
        natSecProxyId = null;
      } else {
        natSecProxyId = UUID.fromString(attrSecProxyId);
      }

      // Delete the objects
      schemaObj.getSecSessionTableObj().deleteSecSessionBySecProxyIdx(natSecProxyId);
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFSecurityXMsgSecSessionMessageFormatter.formatSecSessionRspnDeleted()
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      ((CFSecurityXMsgRqstHandler) getParser()).appendResponse(response);
    } catch (RuntimeException e) {
      CFSecurityXMsgRqstHandler xmsgRqstHandler = ((CFSecurityXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFSecurityXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFSecurityXMsgRqstHandler xmsgRqstHandler = ((CFSecurityXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFSecurityXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFDbTestXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Value Attributes
      String attrTenantId = null;
      String attrScopeId = null;
      String attrName = null;
      String attrDefaultVisibility = null;
      String attrPrevTenantId = null;
      String attrPrevId = null;
      String attrNextTenantId = null;
      String attrNextId = null;
      String attrCreatedAt = null;
      String attrCreatedBy = null;
      String attrUpdatedAt = null;
      String attrUpdatedBy = null;
      // Atom Attributes
      // TokenDef Attributes
      // TokenType Attributes
      String attrSchemaDefId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstTokenTypeUpdate");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

      ICFDbTestSchemaObj 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("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("ScopeId")) {
          if (attrScopeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrScopeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefaultVisibility")) {
          if (attrDefaultVisibility != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefaultVisibility = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevTenantId")) {
          if (attrPrevTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevId")) {
          if (attrPrevId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextTenantId")) {
          if (attrNextTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextId")) {
          if (attrNextId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SchemaDefId")) {
          if (attrSchemaDefId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSchemaDefId = 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 ((attrScopeId == null) || (attrScopeId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ScopeId");
      }
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if ((attrDefaultVisibility == null) || (attrDefaultVisibility.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "DefaultVisibility");
      }
      if ((attrRevision == null) || (attrRevision.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Revision");
      }
      if ((attrCreatedAt == null) || (attrCreatedAt.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CreatedAt");
      }
      if ((attrCreatedBy == null) || (attrCreatedBy.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CreatedBy");
      }
      if ((attrUpdatedAt == null) || (attrUpdatedAt.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "UpdatedAt");
      }
      if ((attrUpdatedBy == null) || (attrUpdatedBy.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "UpdatedBy");
      }
      if ((attrSchemaDefId == null) || (attrSchemaDefId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SchemaDefId");
      }

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

      // Instantiate a PKey buffer for the parsed information
      CFDbTestValuePKey pkey =
          ((ICFDbTestSchema) schemaObj.getBackingStore()).getFactoryValue().newPKey();

      long natTenantId;
      natTenantId = Long.parseLong(attrTenantId);
      pkey.setRequiredTenantId(natTenantId);
      long natId;
      natId = Long.parseLong(attrId);
      pkey.setRequiredId(natId);
      // Read the instance
      ICFDbTestTokenTypeObj origBuff =
          ((ICFDbTestTokenTypeObj) schemaObj.getTokenTypeTableObj().readTokenType(pkey));
      if (origBuff == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(
                getClass(), S_ProcName, 0, "getTokenTypeTableObj().readTokenType()");
      } else {
        // Edit the instance
        ICFDbTestTokenTypeEditObj editBuff = (ICFDbTestTokenTypeEditObj) origBuff.beginEdit();
        CFDbTestTokenTypeBuff dataBuff = editBuff.getTokenTypeBuff();
        // Convert string attributes to native Java types
        // and apply the converted attributes to the editBuff.
        long natScopeId = Long.parseLong(attrScopeId);

        dataBuff.setRequiredScopeId(natScopeId);

        String natName = attrName;

        dataBuff.setRequiredName(natName);

        boolean natDefaultVisibility;
        if (attrDefaultVisibility.equals("true")
            || attrDefaultVisibility.equals("yes")
            || attrDefaultVisibility.equals("1")) {
          natDefaultVisibility = true;
        } else if (attrDefaultVisibility.equals("false")
            || attrDefaultVisibility.equals("no")
            || attrDefaultVisibility.equals("0")) {
          natDefaultVisibility = false;
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUsageException(
                  getClass(),
                  S_ProcName,
                  "Unexpected DefaultVisibility value, must be one of true, false, yes, no, 1, or 0, not \""
                      + attrDefaultVisibility
                      + "\"");
        }

        dataBuff.setRequiredDefaultVisibility(natDefaultVisibility);

        Long natPrevTenantId;
        if ((attrPrevTenantId == null) || (attrPrevTenantId.length() <= 0)) {
          natPrevTenantId = null;
        } else {
          natPrevTenantId = new Long(Long.parseLong(attrPrevTenantId));
        }

        dataBuff.setOptionalPrevTenantId(natPrevTenantId);

        Long natPrevId;
        if ((attrPrevId == null) || (attrPrevId.length() <= 0)) {
          natPrevId = null;
        } else {
          natPrevId = new Long(Long.parseLong(attrPrevId));
        }

        dataBuff.setOptionalPrevId(natPrevId);

        Long natNextTenantId;
        if ((attrNextTenantId == null) || (attrNextTenantId.length() <= 0)) {
          natNextTenantId = null;
        } else {
          natNextTenantId = new Long(Long.parseLong(attrNextTenantId));
        }

        dataBuff.setOptionalNextTenantId(natNextTenantId);

        Long natNextId;
        if ((attrNextId == null) || (attrNextId.length() <= 0)) {
          natNextId = null;
        } else {
          natNextId = new Long(Long.parseLong(attrNextId));
        }

        dataBuff.setOptionalNextId(natNextId);

        int natRevision = Integer.parseInt(attrRevision);
        dataBuff.setRequiredRevision(natRevision);
        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);
        }
        if (createdBy != null) {
          dataBuff.setCreatedByUserId(createdBy);
        }
        if (createdAt != null) {
          dataBuff.setCreatedAt(createdAt);
        }
        if (updatedBy != null) {
          dataBuff.setUpdatedByUserId(updatedBy);
        }
        if (updatedAt != null) {
          dataBuff.setUpdatedAt(updatedAt);
        }
        long natSchemaDefId = Long.parseLong(attrSchemaDefId);

        dataBuff.setRequiredSchemaDefId(natSchemaDefId);

        //	Attempt the update
        editBuff.update();
        editBuff.endEdit();
        String response =
            schemaFormatter.formatRspnXmlPreamble()
                + "\n"
                + "\t"
                + CFDbTestXMsgTokenTypeMessageFormatter.formatTokenTypeRspnUpdated(
                    "\n\t\t\t", origBuff.getTokenTypeBuff())
                + "\n"
                + schemaFormatter.formatRspnXmlPostamble();
        ((CFDbTestXMsgRqstHandler) getParser()).appendResponse(response);
      }
    } catch (RuntimeException e) {
      CFDbTestXMsgRqstHandler xmsgRqstHandler = ((CFDbTestXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFDbTestXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFDbTestXMsgRqstHandler xmsgRqstHandler = ((CFDbTestXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFDbTestXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
public class CFSecurityServiceBuff {
  public static final String CLASS_CODE = "HSVC";
  public static final String S_INIT_CREATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_CREATEDBY = UUID.fromString(S_INIT_CREATEDBY);
  public static final String S_INIT_UPDATEDBY = "654dbba0-eda7-11e1-aff1-0800200c9a66";
  public static final UUID INIT_UPDATEDBY = UUID.fromString(S_INIT_UPDATEDBY);
  public static final long CLUSTERID_INIT_VALUE = 0L;
  public static final long SERVICEID_INIT_VALUE = 0L;
  public static final long HOSTNODEID_INIT_VALUE = 0L;
  public static final int SERVICETYPEID_INIT_VALUE = 0;
  public static final short HOSTPORT_INIT_VALUE = (short) 0;
  public static final long CLUSTERID_MIN_VALUE = 0L;
  public static final long SERVICEID_MIN_VALUE = 0L;
  public static final long HOSTNODEID_MIN_VALUE = 0L;
  public static final int SERVICETYPEID_MIN_VALUE = 0;
  public static final short HOSTPORT_MIN_VALUE = (short) 0;
  protected UUID createdByUserId = CFSecurityServiceBuff.INIT_CREATEDBY;
  protected Calendar createdAt = Calendar.getInstance();
  protected UUID updatedByUserId = CFSecurityServiceBuff.INIT_UPDATEDBY;
  protected Calendar updatedAt = Calendar.getInstance();
  protected long requiredClusterId;
  protected long requiredServiceId;
  protected long requiredHostNodeId;
  protected int requiredServiceTypeId;
  protected short requiredHostPort;
  protected int requiredRevision;

  public CFSecurityServiceBuff() {
    requiredClusterId = CFSecurityServiceBuff.CLUSTERID_INIT_VALUE;
    requiredServiceId = CFSecurityServiceBuff.SERVICEID_INIT_VALUE;
    requiredHostNodeId = CFSecurityServiceBuff.HOSTNODEID_INIT_VALUE;
    requiredServiceTypeId = CFSecurityServiceBuff.SERVICETYPEID_INIT_VALUE;
    requiredHostPort = CFSecurityServiceBuff.HOSTPORT_INIT_VALUE;
  }

  public String getClassCode() {
    return (CLASS_CODE);
  }

  public UUID getCreatedByUserId() {
    return (createdByUserId);
  }

  public void setCreatedByUserId(UUID value) {
    createdByUserId = value;
  }

  public Calendar getCreatedAt() {
    return (createdAt);
  }

  public void setCreatedAt(Calendar value) {
    createdAt = value;
  }

  public UUID getUpdatedByUserId() {
    return (updatedByUserId);
  }

  public void setUpdatedByUserId(UUID value) {
    updatedByUserId = value;
  }

  public Calendar getUpdatedAt() {
    return (updatedAt);
  }

  public void setUpdatedAt(Calendar value) {
    updatedAt = value;
  }

  public long getRequiredClusterId() {
    return (requiredClusterId);
  }

  public void setRequiredClusterId(long value) {
    if (value < CFSecurityServiceBuff.CLUSTERID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredClusterId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.CLUSTERID_MIN_VALUE);
    }
    requiredClusterId = value;
  }

  public long getRequiredServiceId() {
    return (requiredServiceId);
  }

  public void setRequiredServiceId(long value) {
    if (value < CFSecurityServiceBuff.SERVICEID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredServiceId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.SERVICEID_MIN_VALUE);
    }
    requiredServiceId = value;
  }

  public long getRequiredHostNodeId() {
    return (requiredHostNodeId);
  }

  public void setRequiredHostNodeId(long value) {
    if (value < CFSecurityServiceBuff.HOSTNODEID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredHostNodeId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.HOSTNODEID_MIN_VALUE);
    }
    requiredHostNodeId = value;
  }

  public int getRequiredServiceTypeId() {
    return (requiredServiceTypeId);
  }

  public void setRequiredServiceTypeId(int value) {
    if (value < CFSecurityServiceBuff.SERVICETYPEID_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredServiceTypeId",
              1,
              "value",
              value,
              CFSecurityServiceBuff.SERVICETYPEID_MIN_VALUE);
    }
    requiredServiceTypeId = value;
  }

  public short getRequiredHostPort() {
    return (requiredHostPort);
  }

  public void setRequiredHostPort(short value) {
    if (value < CFSecurityServiceBuff.HOSTPORT_MIN_VALUE) {
      throw CFLib.getDefaultExceptionFactory()
          .newArgumentUnderflowException(
              getClass(),
              "setRequiredHostPort",
              1,
              "value",
              value,
              CFSecurityServiceBuff.HOSTPORT_MIN_VALUE);
    }
    requiredHostPort = value;
  }

  public int getRequiredRevision() {
    return (requiredRevision);
  }

  public void setRequiredRevision(int value) {
    requiredRevision = value;
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return (false);
    } else if (obj instanceof CFSecurityServiceBuff) {
      CFSecurityServiceBuff rhs = (CFSecurityServiceBuff) obj;
      if (!getCreatedByUserId().equals(rhs.getCreatedByUserId())) {
        return (false);
      }
      if (!getCreatedAt().equals(rhs.getCreatedAt())) {
        return (false);
      }
      if (!getUpdatedByUserId().equals(rhs.getUpdatedByUserId())) {
        return (false);
      }
      if (!getUpdatedAt().equals(rhs.getUpdatedAt())) {
        return (false);
      }
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      if (getRequiredHostPort() != rhs.getRequiredHostPort()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServicePKey) {
      CFSecurityServicePKey rhs = (CFSecurityServicePKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceHBuff) {
      CFSecurityServiceHBuff rhs = (CFSecurityServiceHBuff) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      if (getRequiredHostPort() != rhs.getRequiredHostPort()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceHPKey) {
      CFSecurityServiceHPKey rhs = (CFSecurityServiceHPKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredServiceId() != rhs.getRequiredServiceId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByClusterIdxKey) {
      CFSecurityServiceByClusterIdxKey rhs = (CFSecurityServiceByClusterIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByHostIdxKey) {
      CFSecurityServiceByHostIdxKey rhs = (CFSecurityServiceByHostIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByTypeIdxKey) {
      CFSecurityServiceByTypeIdxKey rhs = (CFSecurityServiceByTypeIdxKey) obj;
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByUTypeIdxKey) {
      CFSecurityServiceByUTypeIdxKey rhs = (CFSecurityServiceByUTypeIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredServiceTypeId() != rhs.getRequiredServiceTypeId()) {
        return (false);
      }
      return (true);
    } else if (obj instanceof CFSecurityServiceByUHostPortIdxKey) {
      CFSecurityServiceByUHostPortIdxKey rhs = (CFSecurityServiceByUHostPortIdxKey) obj;
      if (getRequiredClusterId() != rhs.getRequiredClusterId()) {
        return (false);
      }
      if (getRequiredHostNodeId() != rhs.getRequiredHostNodeId()) {
        return (false);
      }
      if (getRequiredHostPort() != rhs.getRequiredHostPort()) {
        return (false);
      }
      return (true);
    } else {
      boolean retval = super.equals(obj);
      return (retval);
    }
  }

  public int hashCode() {
    int hashCode = 0;
    hashCode = hashCode + getCreatedByUserId().hashCode();
    hashCode = hashCode + getCreatedAt().hashCode();
    hashCode = hashCode + getUpdatedByUserId().hashCode();
    hashCode = hashCode + getUpdatedAt().hashCode();
    hashCode = hashCode + (int) (getRequiredClusterId());
    hashCode = hashCode + (int) (getRequiredServiceId());
    hashCode = hashCode + (int) (getRequiredHostNodeId());
    hashCode = hashCode + getRequiredServiceTypeId();
    hashCode = (hashCode * 0x10000) + getRequiredHostPort();
    return (hashCode & 0x7fffffff);
  }

  public int compareTo(Object obj) {
    if (obj == null) {
      return (-1);
    } else if (obj instanceof CFSecurityServiceBuff) {
      CFSecurityServiceBuff rhs = (CFSecurityServiceBuff) obj;
      int retval = 0;
      {
        int cmp = getCreatedByUserId().compareTo(rhs.getCreatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getCreatedAt().compareTo(rhs.getCreatedAt());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedByUserId().compareTo(rhs.getUpdatedByUserId());
        if (cmp != 0) {
          return (cmp);
        }

        cmp = getUpdatedAt().compareTo(rhs.getUpdatedAt());
        if (cmp != 0) {
          return (cmp);
        }
      }
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      if (getRequiredServiceTypeId() < rhs.getRequiredServiceTypeId()) {
        return (-1);
      } else if (getRequiredServiceTypeId() > rhs.getRequiredServiceTypeId()) {
        return (1);
      }
      if (getRequiredHostPort() < rhs.getRequiredHostPort()) {
        return (-1);
      } else if (getRequiredHostPort() > rhs.getRequiredHostPort()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServicePKey) {
      CFSecurityServicePKey rhs = (CFSecurityServicePKey) obj;
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceHPKey) {
      CFSecurityServiceHPKey rhs = (CFSecurityServiceHPKey) obj;
      {
        int lhsRequiredRevision = getRequiredRevision();
        int rhsRequiredRevision = rhs.getRequiredRevision();
        if (lhsRequiredRevision < rhsRequiredRevision) {
          return (-1);
        } else if (lhsRequiredRevision > rhsRequiredRevision) {
          return (1);
        }
      }
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceHBuff) {
      CFSecurityServiceHBuff rhs = (CFSecurityServiceHBuff) obj;
      int retval = 0;
      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredServiceId() < rhs.getRequiredServiceId()) {
        return (-1);
      } else if (getRequiredServiceId() > rhs.getRequiredServiceId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      if (getRequiredServiceTypeId() < rhs.getRequiredServiceTypeId()) {
        return (-1);
      } else if (getRequiredServiceTypeId() > rhs.getRequiredServiceTypeId()) {
        return (1);
      }
      if (getRequiredHostPort() < rhs.getRequiredHostPort()) {
        return (-1);
      } else if (getRequiredHostPort() > rhs.getRequiredHostPort()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceByClusterIdxKey) {
      CFSecurityServiceByClusterIdxKey rhs = (CFSecurityServiceByClusterIdxKey) obj;

      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceByHostIdxKey) {
      CFSecurityServiceByHostIdxKey rhs = (CFSecurityServiceByHostIdxKey) obj;

      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceByTypeIdxKey) {
      CFSecurityServiceByTypeIdxKey rhs = (CFSecurityServiceByTypeIdxKey) obj;

      if (getRequiredServiceTypeId() < rhs.getRequiredServiceTypeId()) {
        return (-1);
      } else if (getRequiredServiceTypeId() > rhs.getRequiredServiceTypeId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceByUTypeIdxKey) {
      CFSecurityServiceByUTypeIdxKey rhs = (CFSecurityServiceByUTypeIdxKey) obj;

      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      if (getRequiredServiceTypeId() < rhs.getRequiredServiceTypeId()) {
        return (-1);
      } else if (getRequiredServiceTypeId() > rhs.getRequiredServiceTypeId()) {
        return (1);
      }
      return (0);
    } else if (obj instanceof CFSecurityServiceByUHostPortIdxKey) {
      CFSecurityServiceByUHostPortIdxKey rhs = (CFSecurityServiceByUHostPortIdxKey) obj;

      if (getRequiredClusterId() < rhs.getRequiredClusterId()) {
        return (-1);
      } else if (getRequiredClusterId() > rhs.getRequiredClusterId()) {
        return (1);
      }
      if (getRequiredHostNodeId() < rhs.getRequiredHostNodeId()) {
        return (-1);
      } else if (getRequiredHostNodeId() > rhs.getRequiredHostNodeId()) {
        return (1);
      }
      if (getRequiredHostPort() < rhs.getRequiredHostPort()) {
        return (-1);
      } else if (getRequiredHostPort() > rhs.getRequiredHostPort()) {
        return (1);
      }
      return (0);
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
    }
  }

  public void set(CFSecurityServiceBuff src) {
    setServiceBuff(src);
  }

  public void setServiceBuff(CFSecurityServiceBuff src) {
    setRequiredClusterId(src.getRequiredClusterId());
    setRequiredServiceId(src.getRequiredServiceId());
    setCreatedByUserId(src.getCreatedByUserId());
    setCreatedAt(src.getCreatedAt());
    setUpdatedByUserId(src.getUpdatedByUserId());
    setUpdatedAt(src.getUpdatedAt());
    setRequiredHostNodeId(src.getRequiredHostNodeId());
    setRequiredServiceTypeId(src.getRequiredServiceTypeId());
    setRequiredHostPort(src.getRequiredHostPort());
    setRequiredRevision(src.getRequiredRevision());
  }

  public void set(CFSecurityServiceHBuff src) {
    setServiceBuff(src);
  }

  public void setServiceBuff(CFSecurityServiceHBuff src) {
    setRequiredClusterId(src.getRequiredClusterId());
    setRequiredServiceId(src.getRequiredServiceId());
    setRequiredHostNodeId(src.getRequiredHostNodeId());
    setRequiredServiceTypeId(src.getRequiredServiceTypeId());
    setRequiredHostPort(src.getRequiredHostPort());
  }
}
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFInternetXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // SecSession Attributes
      String attrSecSessionId = null;
      String attrSecUserId = null;
      String attrSecDevName = null;
      String attrStart = null;
      String attrFinish = null;
      String attrSecProxyId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstSecSessionCreate");

      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 an edit buffer for the parsed information
      ICFInternetSecSessionEditObj editBuff =
          (ICFInternetSecSessionEditObj)
              schemaObj.getSecSessionTableObj().newInstance().beginEdit();
      CFSecuritySecSessionBuff dataBuff = (CFSecuritySecSessionBuff) editBuff.getSecSessionBuff();
      // 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("SecSessionId")) {
          if (attrSecSessionId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecSessionId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SecUserId")) {
          if (attrSecUserId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecUserId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SecDevName")) {
          if (attrSecDevName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecDevName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Start")) {
          if (attrStart != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrStart = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Finish")) {
          if (attrFinish != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrFinish = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SecProxyId")) {
          if (attrSecProxyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSecProxyId = attrs.getValue(idxAttr);
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUnrecognizedAttributeException(
                  getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName);
        }
      }

      // Ensure that required attributes have values
      if ((attrSecSessionId == null) || (attrSecSessionId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SecSessionId");
      }
      if ((attrSecUserId == null) || (attrSecUserId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SecUserId");
      }
      if ((attrStart == null) || (attrStart.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Start");
      }

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

      // Convert string attributes to native Java types
      // and apply the converted attributes to the editBuff.
      UUID natSecUserId = UUID.fromString(attrSecUserId);

      dataBuff.setRequiredSecUserId(natSecUserId);

      String natSecDevName = attrSecDevName;

      dataBuff.setOptionalSecDevName(natSecDevName);

      Calendar natStart;
      try {
        natStart = CFLibXmlUtil.parseTimestamp(attrStart);
      } catch (RuntimeException e) {
        throw CFLib.getDefaultExceptionFactory()
            .newInvalidArgumentException(getClass(), S_ProcName, 0, "Start", attrStart, e);
      }

      dataBuff.setRequiredStart(natStart);

      Calendar natFinish;
      if ((attrFinish == null) || (attrFinish.length() <= 0)) {
        natFinish = null;
      } else {
        try {
          natFinish = CFLibXmlUtil.parseTimestamp(attrFinish);
        } catch (RuntimeException e) {
          throw CFLib.getDefaultExceptionFactory()
              .newInvalidArgumentException(getClass(), S_ProcName, 0, "Finish", attrFinish, e);
        }
      }

      dataBuff.setOptionalFinish(natFinish);

      UUID natSecProxyId;
      if ((attrSecProxyId == null) || (attrSecProxyId.length() <= 0)) {
        natSecProxyId = null;
      } else {
        natSecProxyId = UUID.fromString(attrSecProxyId);
      }

      dataBuff.setOptionalSecProxyId(natSecProxyId);

      //	Attempt the create
      editBuff.copyBuffToPKey(); // Allow for predefined ids
      ICFInternetSecSessionObj created = (ICFInternetSecSessionObj) editBuff.create();
      editBuff.endEdit();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFInternetXMsgSecSessionMessageFormatter.formatSecSessionRspnCreated(
                  "\n\t\t\t", created.getSecSessionBuff())
              + "\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);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFBamXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Scope Attributes
      String attrTenantId = null;
      String attrCreatedAt = null;
      String attrCreatedBy = null;
      String attrUpdatedAt = null;
      String attrUpdatedBy = null;
      // ClearDep Attributes
      String attrRelationId = null;
      // ClearSubDep3 Attributes
      String attrContClearDep2TenantId = null;
      String attrContClearDep2Id = null;
      String attrName = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstClearSubDep3Update");

      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("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("RelationId")) {
          if (attrRelationId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrRelationId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ContClearDep2TenantId")) {
          if (attrContClearDep2TenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrContClearDep2TenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ContClearDep2Id")) {
          if (attrContClearDep2Id != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrContClearDep2Id = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = 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 ((attrRevision == null) || (attrRevision.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Revision");
      }
      if ((attrCreatedAt == null) || (attrCreatedAt.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CreatedAt");
      }
      if ((attrCreatedBy == null) || (attrCreatedBy.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CreatedBy");
      }
      if ((attrUpdatedAt == null) || (attrUpdatedAt.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "UpdatedAt");
      }
      if ((attrUpdatedBy == null) || (attrUpdatedBy.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "UpdatedBy");
      }
      if ((attrRelationId == null) || (attrRelationId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "RelationId");
      }
      if ((attrContClearDep2TenantId == null) || (attrContClearDep2TenantId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ContClearDep2TenantId");
      }
      if ((attrContClearDep2Id == null) || (attrContClearDep2Id.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ContClearDep2Id");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }

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

      // Instantiate a PKey buffer for the parsed information
      CFBamScopePKey pkey =
          ((ICFBamSchema) schemaObj.getBackingStore()).getFactoryScope().newPKey();

      long natTenantId;
      natTenantId = Long.parseLong(attrTenantId);
      pkey.setRequiredTenantId(natTenantId);
      long natId;
      natId = Long.parseLong(attrId);
      pkey.setRequiredId(natId);
      // Read the instance
      ICFBamClearSubDep3Obj origBuff =
          ((ICFBamClearSubDep3Obj) schemaObj.getClearSubDep3TableObj().readClearSubDep3(pkey));
      if (origBuff == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(
                getClass(), S_ProcName, 0, "getClearSubDep3TableObj().readClearSubDep3()");
      } else {
        // Edit the instance
        ICFBamClearSubDep3EditObj editBuff = (ICFBamClearSubDep3EditObj) origBuff.beginEdit();
        CFBamClearSubDep3Buff dataBuff = editBuff.getClearSubDep3Buff();
        // Convert string attributes to native Java types
        // and apply the converted attributes to the editBuff.
        int natRevision = Integer.parseInt(attrRevision);
        dataBuff.setRequiredRevision(natRevision);
        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);
        }
        if (createdBy != null) {
          dataBuff.setCreatedByUserId(createdBy);
        }
        if (createdAt != null) {
          dataBuff.setCreatedAt(createdAt);
        }
        if (updatedBy != null) {
          dataBuff.setUpdatedByUserId(updatedBy);
        }
        if (updatedAt != null) {
          dataBuff.setUpdatedAt(updatedAt);
        }
        long natRelationId = Long.parseLong(attrRelationId);

        dataBuff.setRequiredRelationId(natRelationId);

        long natContClearDep2TenantId = Long.parseLong(attrContClearDep2TenantId);

        dataBuff.setRequiredContClearDep2TenantId(natContClearDep2TenantId);

        long natContClearDep2Id = Long.parseLong(attrContClearDep2Id);

        dataBuff.setRequiredContClearDep2Id(natContClearDep2Id);

        String natName = attrName;

        dataBuff.setRequiredName(natName);

        //	Attempt the update
        editBuff.update();
        editBuff.endEdit();
        String response =
            schemaFormatter.formatRspnXmlPreamble()
                + "\n"
                + "\t"
                + CFBamXMsgClearSubDep3MessageFormatter.formatClearSubDep3RspnUpdated(
                    "\n\t\t\t", origBuff.getClearSubDep3Buff())
                + "\n"
                + schemaFormatter.formatRspnXmlPostamble();
        ((CFBamXMsgRqstHandler) getParser()).appendResponse(response);
      }
    } 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 startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // TSecGroup Attributes
      String attrTenantId = null;
      String attrTSecGroupId = null;
      String attrName = null;
      String attrIsVisible = 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("RspnTSecGroupLocked");

      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("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("TSecGroupId")) {
          if (attrTSecGroupId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTSecGroupId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("IsVisible")) {
          if (attrIsVisible != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrIsVisible = 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 ((attrTSecGroupId == null) || (attrTSecGroupId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TSecGroupId");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if ((attrIsVisible == null) || (attrIsVisible.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "IsVisible");
      }
      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

      long natTenantId = Long.parseLong(attrTenantId);

      int natTSecGroupId = Integer.parseInt(attrTSecGroupId);

      String natName = attrName;

      boolean natIsVisible;
      if (attrIsVisible.equals("true")
          || attrIsVisible.equals("yes")
          || attrIsVisible.equals("1")) {
        natIsVisible = true;
      } else if (attrIsVisible.equals("false")
          || attrIsVisible.equals("no")
          || attrIsVisible.equals("0")) {
        natIsVisible = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected IsVisible value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrIsVisible
                    + "\"");
      }

      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);
      }
      // Instantiate a buffer for the parsed information
      ICFFreeSwitchTSecGroupObj obj =
          (ICFFreeSwitchTSecGroupObj) schemaObj.getTSecGroupTableObj().newInstance();
      CFSecurityTSecGroupBuff dataBuff = obj.getTSecGroupBuff();
      dataBuff.setRequiredTenantId(natTenantId);
      dataBuff.setRequiredTSecGroupId(natTSecGroupId);
      dataBuff.setRequiredName(natName);
      dataBuff.setRequiredIsVisible(natIsVisible);
      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();
      ICFFreeSwitchTSecGroupObj realized = (ICFFreeSwitchTSecGroupObj) 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);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // ContactList Attributes
      String attrContactListId = null;
      String attrTenantId = null;
      String attrDescription = null;
      String attrStripDigits = 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("ContactList");

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

      ICFAccSchemaObj 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("ContactListId")) {
          if (attrContactListId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrContactListId = 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("StripDigits")) {
          if (attrStripDigits != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrStripDigits = 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 ((attrContactListId == null) || (attrContactListId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ContactListId");
      }
      if ((attrTenantId == null) || (attrTenantId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TenantId");
      }
      if (attrDescription == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Description");
      }

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

      // Convert string attributes to native Java types

      long natContactListId = Long.parseLong(attrContactListId);

      long natTenantId = Long.parseLong(attrTenantId);

      String natDescription = attrDescription;

      Integer natStripDigits;
      if ((attrStripDigits == null) || (attrStripDigits.length() <= 0)) {
        natStripDigits = null;
      } else {
        natStripDigits = new Integer(Integer.parseInt(attrStripDigits));
      }

      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
      ICFAccContactListObj obj =
          (ICFAccContactListObj) (schemaObj.getContactListTableObj().newInstance());
      CFCrmContactListBuff dataBuff = obj.getContactListBuff();
      dataBuff.setRequiredContactListId(natContactListId);
      dataBuff.setRequiredTenantId(natTenantId);
      dataBuff.setRequiredDescription(natDescription);
      dataBuff.setOptionalStripDigits(natStripDigits);
      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<ICFCrmContactListObj> list =
          (List<ICFCrmContactListObj>) xmsgRspnHandler.getListOfObjects();
      ICFCrmContactListObj realized = (ICFCrmContactListObj) 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);
    }
  }
  protected CFSecuritySecDeviceBuff unpackSecDeviceResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackSecDeviceResultSetToBuff";
    int idxcol = 1;
    CFSecuritySecDeviceBuff buff = schema.getFactorySecDevice().newBuff();
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFSecurityMySqlSchema.convertTimestampString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFSecurityMySqlSchema.convertTimestampString(colString));
      }
    }
    idxcol++;
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
    }
    idxcol++;
    buff.setRequiredSecUserId(CFSecurityMySqlSchema.convertUuidString(resultSet.getString(idxcol)));
    idxcol++;
    buff.setRequiredDevName(resultSet.getString(idxcol));
    idxcol++;
    {
      String colVal = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setOptionalPubKey(null);
      } else {
        buff.setOptionalPubKey(colVal);
      }
    }
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFDbTestXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrClusterId = null;
      String attrSecGroupId = null;
      String attrSecUserId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstSecGroupMemberReadByUUserIdx");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

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

      // 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);

      UUID natSecUserId;
      if ((attrSecUserId == null) || (attrSecUserId.length() <= 0)) {
        natSecUserId = null;
      } else {
        natSecUserId = UUID.fromString(attrSecUserId);
      }

      // Read the object
      ICFDbTestSecGroupMemberObj read =
          ((ICFDbTestSecGroupMemberObj)
              schemaObj
                  .getSecGroupMemberTableObj()
                  .readSecGroupMemberByUUserIdx(natClusterId, natSecGroupId, natSecUserId, true));
      if (read != null) {
        String response =
            schemaFormatter.formatRspnXmlPreamble()
                + "\n"
                + "\t"
                + CFDbTestXMsgSecGroupMemberMessageFormatter.formatSecGroupMemberRspnSingleOpenTag()
                + CFDbTestXMsgSecGroupMemberMessageFormatter.formatSecGroupMemberRspnDerivedRec(
                    "\n\t\t", read.getSecGroupMemberBuff())
                + "\n"
                + "\t"
                + CFDbTestXMsgSecGroupMemberMessageFormatter
                    .formatSecGroupMemberRspnSingleCloseTag()
                + schemaFormatter.formatRspnXmlPostamble();
        ((CFDbTestXMsgRqstHandler) getParser()).appendResponse(response);
      } else {
        String response =
            schemaFormatter.formatRspnXmlPreamble()
                + "\n"
                + "\t"
                + CFDbTestXMsgSchemaMessageFormatter.formatRspnNoDataFound()
                + "\n"
                + schemaFormatter.formatRspnXmlPostamble();
        xmsgRqstHandler.appendResponse(response);
      }
    } catch (RuntimeException e) {
      CFDbTestXMsgRqstHandler xmsgRqstHandler = ((CFDbTestXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFDbTestXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFDbTestXMsgRqstHandler xmsgRqstHandler = ((CFDbTestXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFDbTestXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFFreeSwitchXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // FSSFConferenceProfile Attributes
      String attrTenantId = null;
      String attrFSSFConferenceProfileId = null;
      String attrFSSFConferenceId = null;
      String attrName = null;
      String attrSoundPrefix = null;
      String attrAckSound = null;
      String attrAloneSound = null;
      String attrBadPinSound = null;
      String attrEnterSound = null;
      String attrExitSound = null;
      String attrIsLockedSound = null;
      String attrKickedSound = null;
      String attrLockedSound = null;
      String attrMaxMembersSound = null;
      String attrMOHSound = null;
      String attrMuteDetectSound = null;
      String attrMutedSound = null;
      String attrNackSound = null;
      String attrPerpetualSound = null;
      String attrPinSound = null;
      String attrPin = null;
      String attrUnmutedSound = null;
      String attrRate = null;
      String attrAutoRecord = null;
      String attrValInterval = null;
      String attrEnergyLevel = null;
      String attrMemberFlags = null;
      String attrConferenceFlags = null;
      String attrCallerControls = null;
      String attrTTSEngine = null;
      String attrTTSVoice = null;
      String attrMaxMembers = null;
      String attrComfortNoise = null;
      String attrAnnounceCount = null;
      String attrSuppressEvents = null;
      String attrVerboseEvents = null;
      String attrCallerIdName = null;
      String attrCallerIdNumber = 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("RqstFSSFConferenceProfileCreate");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

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

      // Instantiate an edit buffer for the parsed information
      ICFFreeSwitchFSSFConferenceProfileEditObj editBuff =
          (ICFFreeSwitchFSSFConferenceProfileEditObj)
              schemaObj.getFSSFConferenceProfileTableObj().newInstance().beginEdit();
      CFFreeSwitchFSSFConferenceProfileBuff dataBuff =
          (CFFreeSwitchFSSFConferenceProfileBuff) editBuff.getFSSFConferenceProfileBuff();
      // 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("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("FSSFConferenceProfileId")) {
          if (attrFSSFConferenceProfileId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrFSSFConferenceProfileId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("FSSFConferenceId")) {
          if (attrFSSFConferenceId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrFSSFConferenceId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SoundPrefix")) {
          if (attrSoundPrefix != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSoundPrefix = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("AckSound")) {
          if (attrAckSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrAckSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("AloneSound")) {
          if (attrAloneSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrAloneSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("BadPinSound")) {
          if (attrBadPinSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrBadPinSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EnterSound")) {
          if (attrEnterSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEnterSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ExitSound")) {
          if (attrExitSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrExitSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("IsLockedSound")) {
          if (attrIsLockedSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrIsLockedSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("KickedSound")) {
          if (attrKickedSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrKickedSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("LockedSound")) {
          if (attrLockedSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrLockedSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MaxMembersSound")) {
          if (attrMaxMembersSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMaxMembersSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MOHSound")) {
          if (attrMOHSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMOHSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MuteDetectSound")) {
          if (attrMuteDetectSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMuteDetectSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MutedSound")) {
          if (attrMutedSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMutedSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NackSound")) {
          if (attrNackSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNackSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PerpetualSound")) {
          if (attrPerpetualSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPerpetualSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PinSound")) {
          if (attrPinSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPinSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Pin")) {
          if (attrPin != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPin = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("UnmutedSound")) {
          if (attrUnmutedSound != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrUnmutedSound = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Rate")) {
          if (attrRate != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrRate = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("AutoRecord")) {
          if (attrAutoRecord != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrAutoRecord = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ValInterval")) {
          if (attrValInterval != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrValInterval = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EnergyLevel")) {
          if (attrEnergyLevel != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEnergyLevel = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MemberFlags")) {
          if (attrMemberFlags != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMemberFlags = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ConferenceFlags")) {
          if (attrConferenceFlags != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrConferenceFlags = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CallerControls")) {
          if (attrCallerControls != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCallerControls = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TTSEngine")) {
          if (attrTTSEngine != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTTSEngine = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TTSVoice")) {
          if (attrTTSVoice != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTTSVoice = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MaxMembers")) {
          if (attrMaxMembers != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMaxMembers = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ComfortNoise")) {
          if (attrComfortNoise != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrComfortNoise = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("AnnounceCount")) {
          if (attrAnnounceCount != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrAnnounceCount = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SuppressEvents")) {
          if (attrSuppressEvents != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSuppressEvents = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("VerboseEvents")) {
          if (attrVerboseEvents != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrVerboseEvents = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CallerIdName")) {
          if (attrCallerIdName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCallerIdName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CallerIdNumber")) {
          if (attrCallerIdNumber != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCallerIdNumber = attrs.getValue(idxAttr);
        } 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 ((attrFSSFConferenceProfileId == null) || (attrFSSFConferenceProfileId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "FSSFConferenceProfileId");
      }
      if ((attrFSSFConferenceId == null) || (attrFSSFConferenceId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "FSSFConferenceId");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if (attrSoundPrefix == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SoundPrefix");
      }
      if ((attrRate == null) || (attrRate.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Rate");
      }
      if (attrAutoRecord == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "AutoRecord");
      }
      if ((attrValInterval == null) || (attrValInterval.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ValInterval");
      }
      if ((attrEnergyLevel == null) || (attrEnergyLevel.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "EnergyLevel");
      }
      if (attrMemberFlags == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "MemberFlags");
      }
      if (attrConferenceFlags == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ConferenceFlags");
      }
      if (attrCallerControls == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CallerControls");
      }
      if (attrTTSEngine == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TTSEngine");
      }
      if (attrTTSVoice == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "TTSVoice");
      }
      if ((attrMaxMembers == null) || (attrMaxMembers.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "MaxMembers");
      }
      if ((attrComfortNoise == null) || (attrComfortNoise.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ComfortNoise");
      }
      if ((attrAnnounceCount == null) || (attrAnnounceCount.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "AnnounceCount");
      }
      if (attrSuppressEvents == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SuppressEvents");
      }
      if (attrVerboseEvents == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "VerboseEvents");
      }

      // 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 natTenantId = Long.parseLong(attrTenantId);

      dataBuff.setRequiredTenantId(natTenantId);

      long natFSSFConferenceProfileId = Long.parseLong(attrFSSFConferenceProfileId);

      dataBuff.setRequiredFSSFConferenceProfileId(natFSSFConferenceProfileId);

      long natFSSFConferenceId = Long.parseLong(attrFSSFConferenceId);

      dataBuff.setRequiredFSSFConferenceId(natFSSFConferenceId);

      String natName = attrName;

      dataBuff.setRequiredName(natName);

      String natSoundPrefix = attrSoundPrefix;

      dataBuff.setRequiredSoundPrefix(natSoundPrefix);

      String natAckSound = attrAckSound;

      dataBuff.setOptionalAckSound(natAckSound);

      String natAloneSound = attrAloneSound;

      dataBuff.setOptionalAloneSound(natAloneSound);

      String natBadPinSound = attrBadPinSound;

      dataBuff.setOptionalBadPinSound(natBadPinSound);

      String natEnterSound = attrEnterSound;

      dataBuff.setOptionalEnterSound(natEnterSound);

      String natExitSound = attrExitSound;

      dataBuff.setOptionalExitSound(natExitSound);

      String natIsLockedSound = attrIsLockedSound;

      dataBuff.setOptionalIsLockedSound(natIsLockedSound);

      String natKickedSound = attrKickedSound;

      dataBuff.setOptionalKickedSound(natKickedSound);

      String natLockedSound = attrLockedSound;

      dataBuff.setOptionalLockedSound(natLockedSound);

      String natMaxMembersSound = attrMaxMembersSound;

      dataBuff.setOptionalMaxMembersSound(natMaxMembersSound);

      String natMOHSound = attrMOHSound;

      dataBuff.setOptionalMOHSound(natMOHSound);

      String natMuteDetectSound = attrMuteDetectSound;

      dataBuff.setOptionalMuteDetectSound(natMuteDetectSound);

      String natMutedSound = attrMutedSound;

      dataBuff.setOptionalMutedSound(natMutedSound);

      String natNackSound = attrNackSound;

      dataBuff.setOptionalNackSound(natNackSound);

      String natPerpetualSound = attrPerpetualSound;

      dataBuff.setOptionalPerpetualSound(natPerpetualSound);

      String natPinSound = attrPinSound;

      dataBuff.setOptionalPinSound(natPinSound);

      String natPin = attrPin;

      dataBuff.setOptionalPin(natPin);

      String natUnmutedSound = attrUnmutedSound;

      dataBuff.setOptionalUnmutedSound(natUnmutedSound);

      int natRate = Integer.parseInt(attrRate);

      dataBuff.setRequiredRate(natRate);

      String natAutoRecord = attrAutoRecord;

      dataBuff.setRequiredAutoRecord(natAutoRecord);

      int natValInterval = Integer.parseInt(attrValInterval);

      dataBuff.setRequiredValInterval(natValInterval);

      int natEnergyLevel = Integer.parseInt(attrEnergyLevel);

      dataBuff.setRequiredEnergyLevel(natEnergyLevel);

      String natMemberFlags = attrMemberFlags;

      dataBuff.setRequiredMemberFlags(natMemberFlags);

      String natConferenceFlags = attrConferenceFlags;

      dataBuff.setRequiredConferenceFlags(natConferenceFlags);

      String natCallerControls = attrCallerControls;

      dataBuff.setRequiredCallerControls(natCallerControls);

      String natTTSEngine = attrTTSEngine;

      dataBuff.setRequiredTTSEngine(natTTSEngine);

      String natTTSVoice = attrTTSVoice;

      dataBuff.setRequiredTTSVoice(natTTSVoice);

      int natMaxMembers = Integer.parseInt(attrMaxMembers);

      dataBuff.setRequiredMaxMembers(natMaxMembers);

      int natComfortNoise = Integer.parseInt(attrComfortNoise);

      dataBuff.setRequiredComfortNoise(natComfortNoise);

      int natAnnounceCount = Integer.parseInt(attrAnnounceCount);

      dataBuff.setRequiredAnnounceCount(natAnnounceCount);

      String natSuppressEvents = attrSuppressEvents;

      dataBuff.setRequiredSuppressEvents(natSuppressEvents);

      String natVerboseEvents = attrVerboseEvents;

      dataBuff.setRequiredVerboseEvents(natVerboseEvents);

      String natCallerIdName = attrCallerIdName;

      dataBuff.setOptionalCallerIdName(natCallerIdName);

      String natCallerIdNumber = attrCallerIdNumber;

      dataBuff.setOptionalCallerIdNumber(natCallerIdNumber);

      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);
      }
      if (createdBy != null) {
        dataBuff.setCreatedByUserId(createdBy);
      }
      if (createdAt != null) {
        dataBuff.setCreatedAt(createdAt);
      }
      if (updatedBy != null) {
        dataBuff.setUpdatedByUserId(updatedBy);
      }
      if (updatedAt != null) {
        dataBuff.setUpdatedAt(updatedAt);
      }
      //	Attempt the create
      editBuff.copyBuffToPKey(); // Allow for predefined ids
      ICFFreeSwitchFSSFConferenceProfileObj created =
          (ICFFreeSwitchFSSFConferenceProfileObj) editBuff.create();
      editBuff.endEdit();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFFreeSwitchXMsgFSSFConferenceProfileMessageFormatter
                  .formatFSSFConferenceProfileRspnCreated(
                      "\n\t\t\t", created.getFSSFConferenceProfileBuff())
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      ((CFFreeSwitchXMsgRqstHandler) getParser()).appendResponse(response);
    } catch (RuntimeException e) {
      CFFreeSwitchXMsgRqstHandler xmsgRqstHandler = ((CFFreeSwitchXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFFreeSwitchXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFFreeSwitchXMsgRqstHandler xmsgRqstHandler = ((CFFreeSwitchXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFFreeSwitchXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFSecurityXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // ISOCountryLanguage Attributes
      String attrISOCountryId = null;
      String attrISOLanguageId = 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("RqstISOCountryLanguageCreate");

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

      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();

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

      // Instantiate an edit buffer for the parsed information
      ICFSecurityISOCountryLanguageEditObj editBuff =
          (ICFSecurityISOCountryLanguageEditObj)
              schemaObj.getISOCountryLanguageTableObj().newInstance().beginEdit();
      CFSecurityISOCountryLanguageBuff dataBuff =
          (CFSecurityISOCountryLanguageBuff) editBuff.getISOCountryLanguageBuff();
      // 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("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("ISOCountryId")) {
          if (attrISOCountryId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrISOCountryId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ISOLanguageId")) {
          if (attrISOLanguageId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrISOLanguageId = attrs.getValue(idxAttr);
        } else {
          throw CFLib.getDefaultExceptionFactory()
              .newUnrecognizedAttributeException(
                  getClass(), S_ProcName, getParser().getLocationInfo(), attrLocalName);
        }
      }

      // Ensure that required attributes have values
      if ((attrISOCountryId == null) || (attrISOCountryId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ISOCountryId");
      }
      if ((attrISOLanguageId == null) || (attrISOLanguageId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ISOLanguageId");
      }

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

      // Convert string attributes to native Java types
      // and apply the converted attributes to the editBuff.
      short natISOCountryId = Short.parseShort(attrISOCountryId);

      dataBuff.setRequiredISOCountryId(natISOCountryId);

      short natISOLanguageId = Short.parseShort(attrISOLanguageId);

      dataBuff.setRequiredISOLanguageId(natISOLanguageId);

      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);
      }
      if (createdBy != null) {
        dataBuff.setCreatedByUserId(createdBy);
      }
      if (createdAt != null) {
        dataBuff.setCreatedAt(createdAt);
      }
      if (updatedBy != null) {
        dataBuff.setUpdatedByUserId(updatedBy);
      }
      if (updatedAt != null) {
        dataBuff.setUpdatedAt(updatedAt);
      }
      //	Attempt the create
      editBuff.copyBuffToPKey(); // Allow for predefined ids
      ICFSecurityISOCountryLanguageObj created =
          (ICFSecurityISOCountryLanguageObj) editBuff.create();
      editBuff.endEdit();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFSecurityXMsgISOCountryLanguageMessageFormatter
                  .formatISOCountryLanguageRspnCreated(
                      "\n\t\t\t", created.getISOCountryLanguageBuff())
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      ((CFSecurityXMsgRqstHandler) getParser()).appendResponse(response);
    } catch (RuntimeException e) {
      CFSecurityXMsgRqstHandler xmsgRqstHandler = ((CFSecurityXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFSecurityXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    } catch (Error e) {
      CFSecurityXMsgRqstHandler xmsgRqstHandler = ((CFSecurityXMsgRqstHandler) getParser());
      schemaFormatter = xmsgRqstHandler.getSchemaMessageFormatter();
      String response =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFSecurityXMsgSchemaMessageFormatter.formatRspnException("\n\t\t\t", e)
              + "\n"
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.resetResponse();
      xmsgRqstHandler.appendResponse(response);
      xmsgRqstHandler.setCaughtException(true);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // FSSFDialer Attributes
      String attrTenantId = null;
      String attrFSSFDialerId = null;
      String attrFSSofiaId = null;
      String attrName = null;
      String attrPrefix = null;
      String attrSuffix = null;
      String attrTimeout = null;
      String attrErlangNode = null;
      String attrLocalPrefix = null;
      String attrLocalSuffix = null;
      String attrMessageSeconds = null;
      String attrCallbackHandoffMinutes = null;
      String attrWelcomeMsg = null;
      String attrInvalidExtensionMsg = null;
      String attrInvalidPINMsg = null;
      String attrInvalidResultCodeMsg = null;
      String attrPleaseEnterResultCodeMsg = null;
      String attrThankYouMsg = null;
      String attrPleaseEnterPINMsg = null;
      String attrSpoolMsgDir = null;
      String attrSpoolMsgPrefix = null;
      String attrSpoolMsgType = null;
      String attrRecordAllCalls = null;
      String attrAreaCode = null;
      String attrOutboundLines = 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("RspnFSSFDialerUpdated");

      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("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("FSSFDialerId")) {
          if (attrFSSFDialerId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrFSSFDialerId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("FSSofiaId")) {
          if (attrFSSofiaId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrFSSofiaId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Prefix")) {
          if (attrPrefix != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrefix = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Suffix")) {
          if (attrSuffix != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSuffix = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Timeout")) {
          if (attrTimeout != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTimeout = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ErlangNode")) {
          if (attrErlangNode != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrErlangNode = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("LocalPrefix")) {
          if (attrLocalPrefix != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrLocalPrefix = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("LocalSuffix")) {
          if (attrLocalSuffix != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrLocalSuffix = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("MessageSeconds")) {
          if (attrMessageSeconds != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrMessageSeconds = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("CallbackHandoffMinutes")) {
          if (attrCallbackHandoffMinutes != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrCallbackHandoffMinutes = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("WelcomeMsg")) {
          if (attrWelcomeMsg != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrWelcomeMsg = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("InvalidExtensionMsg")) {
          if (attrInvalidExtensionMsg != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrInvalidExtensionMsg = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("InvalidPINMsg")) {
          if (attrInvalidPINMsg != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrInvalidPINMsg = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("InvalidResultCodeMsg")) {
          if (attrInvalidResultCodeMsg != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrInvalidResultCodeMsg = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PleaseEnterResultCodeMsg")) {
          if (attrPleaseEnterResultCodeMsg != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPleaseEnterResultCodeMsg = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ThankYouMsg")) {
          if (attrThankYouMsg != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrThankYouMsg = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PleaseEnterPINMsg")) {
          if (attrPleaseEnterPINMsg != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPleaseEnterPINMsg = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SpoolMsgDir")) {
          if (attrSpoolMsgDir != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSpoolMsgDir = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SpoolMsgPrefix")) {
          if (attrSpoolMsgPrefix != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSpoolMsgPrefix = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("SpoolMsgType")) {
          if (attrSpoolMsgType != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrSpoolMsgType = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("RecordAllCalls")) {
          if (attrRecordAllCalls != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrRecordAllCalls = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("AreaCode")) {
          if (attrAreaCode != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrAreaCode = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("OutboundLines")) {
          if (attrOutboundLines != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrOutboundLines = 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 ((attrFSSFDialerId == null) || (attrFSSFDialerId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "FSSFDialerId");
      }
      if ((attrFSSofiaId == null) || (attrFSSofiaId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "FSSofiaId");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if (attrPrefix == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Prefix");
      }
      if (attrSuffix == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Suffix");
      }
      if ((attrTimeout == null) || (attrTimeout.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Timeout");
      }
      if (attrErlangNode == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ErlangNode");
      }
      if (attrLocalPrefix == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "LocalPrefix");
      }
      if (attrLocalSuffix == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "LocalSuffix");
      }
      if ((attrMessageSeconds == null) || (attrMessageSeconds.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "MessageSeconds");
      }
      if ((attrCallbackHandoffMinutes == null) || (attrCallbackHandoffMinutes.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "CallbackHandoffMinutes");
      }
      if (attrWelcomeMsg == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "WelcomeMsg");
      }
      if (attrInvalidExtensionMsg == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "InvalidExtensionMsg");
      }
      if (attrInvalidPINMsg == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "InvalidPINMsg");
      }
      if (attrInvalidResultCodeMsg == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "InvalidResultCodeMsg");
      }
      if (attrPleaseEnterResultCodeMsg == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "PleaseEnterResultCodeMsg");
      }
      if (attrThankYouMsg == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ThankYouMsg");
      }
      if (attrPleaseEnterPINMsg == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "PleaseEnterPINMsg");
      }
      if (attrSpoolMsgDir == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SpoolMsgDir");
      }
      if (attrSpoolMsgPrefix == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SpoolMsgPrefix");
      }
      if (attrSpoolMsgType == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "SpoolMsgType");
      }
      if ((attrRecordAllCalls == null) || (attrRecordAllCalls.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "RecordAllCalls");
      }
      if (attrAreaCode == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "AreaCode");
      }
      if ((attrOutboundLines == null) || (attrOutboundLines.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "OutboundLines");
      }
      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

      long natTenantId = Long.parseLong(attrTenantId);

      long natFSSFDialerId = Long.parseLong(attrFSSFDialerId);

      long natFSSofiaId = Long.parseLong(attrFSSofiaId);

      String natName = attrName;

      String natPrefix = attrPrefix;

      String natSuffix = attrSuffix;

      int natTimeout = Integer.parseInt(attrTimeout);

      String natErlangNode = attrErlangNode;

      String natLocalPrefix = attrLocalPrefix;

      String natLocalSuffix = attrLocalSuffix;

      int natMessageSeconds = Integer.parseInt(attrMessageSeconds);

      int natCallbackHandoffMinutes = Integer.parseInt(attrCallbackHandoffMinutes);

      String natWelcomeMsg = attrWelcomeMsg;

      String natInvalidExtensionMsg = attrInvalidExtensionMsg;

      String natInvalidPINMsg = attrInvalidPINMsg;

      String natInvalidResultCodeMsg = attrInvalidResultCodeMsg;

      String natPleaseEnterResultCodeMsg = attrPleaseEnterResultCodeMsg;

      String natThankYouMsg = attrThankYouMsg;

      String natPleaseEnterPINMsg = attrPleaseEnterPINMsg;

      String natSpoolMsgDir = attrSpoolMsgDir;

      String natSpoolMsgPrefix = attrSpoolMsgPrefix;

      String natSpoolMsgType = attrSpoolMsgType;

      boolean natRecordAllCalls;
      if (attrRecordAllCalls.equals("true")
          || attrRecordAllCalls.equals("yes")
          || attrRecordAllCalls.equals("1")) {
        natRecordAllCalls = true;
      } else if (attrRecordAllCalls.equals("false")
          || attrRecordAllCalls.equals("no")
          || attrRecordAllCalls.equals("0")) {
        natRecordAllCalls = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected RecordAllCalls value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrRecordAllCalls
                    + "\"");
      }

      String natAreaCode = attrAreaCode;

      int natOutboundLines = Integer.parseInt(attrOutboundLines);

      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);
      }
      // Instantiate a buffer for the parsed information
      ICFFreeSwitchFSSFDialerObj obj =
          (ICFFreeSwitchFSSFDialerObj) schemaObj.getFSSFDialerTableObj().newInstance();
      CFFreeSwitchFSSFDialerBuff dataBuff = obj.getFSSFDialerBuff();
      dataBuff.setRequiredTenantId(natTenantId);
      dataBuff.setRequiredFSSFDialerId(natFSSFDialerId);
      dataBuff.setRequiredFSSofiaId(natFSSofiaId);
      dataBuff.setRequiredName(natName);
      dataBuff.setRequiredPrefix(natPrefix);
      dataBuff.setRequiredSuffix(natSuffix);
      dataBuff.setRequiredTimeout(natTimeout);
      dataBuff.setRequiredErlangNode(natErlangNode);
      dataBuff.setRequiredLocalPrefix(natLocalPrefix);
      dataBuff.setRequiredLocalSuffix(natLocalSuffix);
      dataBuff.setRequiredMessageSeconds(natMessageSeconds);
      dataBuff.setRequiredCallbackHandoffMinutes(natCallbackHandoffMinutes);
      dataBuff.setRequiredWelcomeMsg(natWelcomeMsg);
      dataBuff.setRequiredInvalidExtensionMsg(natInvalidExtensionMsg);
      dataBuff.setRequiredInvalidPINMsg(natInvalidPINMsg);
      dataBuff.setRequiredInvalidResultCodeMsg(natInvalidResultCodeMsg);
      dataBuff.setRequiredPleaseEnterResultCodeMsg(natPleaseEnterResultCodeMsg);
      dataBuff.setRequiredThankYouMsg(natThankYouMsg);
      dataBuff.setRequiredPleaseEnterPINMsg(natPleaseEnterPINMsg);
      dataBuff.setRequiredSpoolMsgDir(natSpoolMsgDir);
      dataBuff.setRequiredSpoolMsgPrefix(natSpoolMsgPrefix);
      dataBuff.setRequiredSpoolMsgType(natSpoolMsgType);
      dataBuff.setRequiredRecordAllCalls(natRecordAllCalls);
      dataBuff.setRequiredAreaCode(natAreaCode);
      dataBuff.setRequiredOutboundLines(natOutboundLines);
      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();
      ICFFreeSwitchFSSFDialerObj realized = (ICFFreeSwitchFSSFDialerObj) 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);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Value Attributes
      String attrTenantId = null;
      String attrScopeId = null;
      String attrDefSchemaTenantId = null;
      String attrDefSchemaId = null;
      String attrName = null;
      String attrShortName = null;
      String attrLabel = null;
      String attrShortDescription = null;
      String attrDescription = null;
      String attrIsNullable = null;
      String attrGenerateId = null;
      String attrDataScopeId = null;
      String attrViewAccessSecurityId = null;
      String attrEditAccessSecurityId = null;
      String attrViewAccessFrequencyId = null;
      String attrEditAccessFrequencyId = null;
      String attrPrevTenantId = null;
      String attrPrevId = null;
      String attrNextTenantId = null;
      String attrNextId = null;
      String attrDefaultVisibility = null;
      String attrCreatedAt = null;
      String attrCreatedBy = null;
      String attrUpdatedAt = null;
      String attrUpdatedBy = null;
      // Atom Attributes
      String attrDbName = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RspnAtomLocked");

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

      ICFBamSchemaObj 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("ScopeId")) {
          if (attrScopeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrScopeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaTenantId")) {
          if (attrDefSchemaTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaId")) {
          if (attrDefSchemaId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ShortName")) {
          if (attrShortName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrShortName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Label")) {
          if (attrLabel != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrLabel = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ShortDescription")) {
          if (attrShortDescription != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrShortDescription = 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("IsNullable")) {
          if (attrIsNullable != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrIsNullable = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("GenerateId")) {
          if (attrGenerateId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrGenerateId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DataScopeId")) {
          if (attrDataScopeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDataScopeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ViewAccessSecurityId")) {
          if (attrViewAccessSecurityId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrViewAccessSecurityId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EditAccessSecurityId")) {
          if (attrEditAccessSecurityId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEditAccessSecurityId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ViewAccessFrequencyId")) {
          if (attrViewAccessFrequencyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrViewAccessFrequencyId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("EditAccessFrequencyId")) {
          if (attrEditAccessFrequencyId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrEditAccessFrequencyId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevTenantId")) {
          if (attrPrevTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevId")) {
          if (attrPrevId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextTenantId")) {
          if (attrNextTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextId")) {
          if (attrNextId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefaultVisibility")) {
          if (attrDefaultVisibility != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefaultVisibility = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DbName")) {
          if (attrDbName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDbName = 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 ((attrScopeId == null) || (attrScopeId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ScopeId");
      }
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if ((attrIsNullable == null) || (attrIsNullable.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "IsNullable");
      }
      if ((attrDefaultVisibility == null) || (attrDefaultVisibility.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "DefaultVisibility");
      }
      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

      long natTenantId = Long.parseLong(attrTenantId);

      long natScopeId = Long.parseLong(attrScopeId);

      long natId = Long.parseLong(attrId);

      Long natDefSchemaTenantId;
      if ((attrDefSchemaTenantId == null) || (attrDefSchemaTenantId.length() <= 0)) {
        natDefSchemaTenantId = null;
      } else {
        natDefSchemaTenantId = new Long(Long.parseLong(attrDefSchemaTenantId));
      }

      Long natDefSchemaId;
      if ((attrDefSchemaId == null) || (attrDefSchemaId.length() <= 0)) {
        natDefSchemaId = null;
      } else {
        natDefSchemaId = new Long(Long.parseLong(attrDefSchemaId));
      }

      String natName = attrName;

      String natShortName = attrShortName;

      String natLabel = attrLabel;

      String natShortDescription = attrShortDescription;

      String natDescription = attrDescription;

      boolean natIsNullable;
      if (attrIsNullable.equals("true")
          || attrIsNullable.equals("yes")
          || attrIsNullable.equals("1")) {
        natIsNullable = true;
      } else if (attrIsNullable.equals("false")
          || attrIsNullable.equals("no")
          || attrIsNullable.equals("0")) {
        natIsNullable = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected IsNullable value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrIsNullable
                    + "\"");
      }

      Boolean natGenerateId;
      if ((attrGenerateId == null) || (attrGenerateId.length() <= 0)) {
        natGenerateId = null;
      } else if (attrGenerateId.equals("true")
          || attrGenerateId.equals("yes")
          || attrGenerateId.equals("1")) {
        natGenerateId = true;
      } else if (attrGenerateId.equals("false")
          || attrGenerateId.equals("no")
          || attrGenerateId.equals("0")) {
        natGenerateId = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected GenerateId value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrGenerateId
                    + "\"");
      }

      Short natDataScopeId;
      if ((attrDataScopeId == null) || (attrDataScopeId.length() <= 0)) {
        natDataScopeId = null;
      } else {
        natDataScopeId = new Short(Short.parseShort(attrDataScopeId));
      }

      Short natViewAccessSecurityId;
      if ((attrViewAccessSecurityId == null) || (attrViewAccessSecurityId.length() <= 0)) {
        natViewAccessSecurityId = null;
      } else {
        natViewAccessSecurityId = new Short(Short.parseShort(attrViewAccessSecurityId));
      }

      Short natEditAccessSecurityId;
      if ((attrEditAccessSecurityId == null) || (attrEditAccessSecurityId.length() <= 0)) {
        natEditAccessSecurityId = null;
      } else {
        natEditAccessSecurityId = new Short(Short.parseShort(attrEditAccessSecurityId));
      }

      Short natViewAccessFrequencyId;
      if ((attrViewAccessFrequencyId == null) || (attrViewAccessFrequencyId.length() <= 0)) {
        natViewAccessFrequencyId = null;
      } else {
        natViewAccessFrequencyId = new Short(Short.parseShort(attrViewAccessFrequencyId));
      }

      Short natEditAccessFrequencyId;
      if ((attrEditAccessFrequencyId == null) || (attrEditAccessFrequencyId.length() <= 0)) {
        natEditAccessFrequencyId = null;
      } else {
        natEditAccessFrequencyId = new Short(Short.parseShort(attrEditAccessFrequencyId));
      }

      Long natPrevTenantId;
      if ((attrPrevTenantId == null) || (attrPrevTenantId.length() <= 0)) {
        natPrevTenantId = null;
      } else {
        natPrevTenantId = new Long(Long.parseLong(attrPrevTenantId));
      }

      Long natPrevId;
      if ((attrPrevId == null) || (attrPrevId.length() <= 0)) {
        natPrevId = null;
      } else {
        natPrevId = new Long(Long.parseLong(attrPrevId));
      }

      Long natNextTenantId;
      if ((attrNextTenantId == null) || (attrNextTenantId.length() <= 0)) {
        natNextTenantId = null;
      } else {
        natNextTenantId = new Long(Long.parseLong(attrNextTenantId));
      }

      Long natNextId;
      if ((attrNextId == null) || (attrNextId.length() <= 0)) {
        natNextId = null;
      } else {
        natNextId = new Long(Long.parseLong(attrNextId));
      }

      boolean natDefaultVisibility;
      if (attrDefaultVisibility.equals("true")
          || attrDefaultVisibility.equals("yes")
          || attrDefaultVisibility.equals("1")) {
        natDefaultVisibility = true;
      } else if (attrDefaultVisibility.equals("false")
          || attrDefaultVisibility.equals("no")
          || attrDefaultVisibility.equals("0")) {
        natDefaultVisibility = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected DefaultVisibility value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrDefaultVisibility
                    + "\"");
      }

      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);
      }
      String natDbName = attrDbName;

      // Instantiate a buffer for the parsed information
      ICFBamAtomObj obj = (ICFBamAtomObj) schemaObj.getAtomTableObj().newInstance();
      CFBamAtomBuff dataBuff = obj.getAtomBuff();
      dataBuff.setRequiredTenantId(natTenantId);
      dataBuff.setRequiredScopeId(natScopeId);
      dataBuff.setRequiredId(natId);
      dataBuff.setOptionalDefSchemaTenantId(natDefSchemaTenantId);
      dataBuff.setOptionalDefSchemaId(natDefSchemaId);
      dataBuff.setRequiredName(natName);
      dataBuff.setOptionalShortName(natShortName);
      dataBuff.setOptionalLabel(natLabel);
      dataBuff.setOptionalShortDescription(natShortDescription);
      dataBuff.setOptionalDescription(natDescription);
      dataBuff.setRequiredIsNullable(natIsNullable);
      dataBuff.setOptionalGenerateId(natGenerateId);
      dataBuff.setOptionalDataScopeId(natDataScopeId);
      dataBuff.setOptionalViewAccessSecurityId(natViewAccessSecurityId);
      dataBuff.setOptionalEditAccessSecurityId(natEditAccessSecurityId);
      dataBuff.setOptionalViewAccessFrequencyId(natViewAccessFrequencyId);
      dataBuff.setOptionalEditAccessFrequencyId(natEditAccessFrequencyId);
      dataBuff.setOptionalPrevTenantId(natPrevTenantId);
      dataBuff.setOptionalPrevId(natPrevId);
      dataBuff.setOptionalNextTenantId(natNextTenantId);
      dataBuff.setOptionalNextId(natNextId);
      dataBuff.setRequiredDefaultVisibility(natDefaultVisibility);
      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);
      }
      dataBuff.setOptionalDbName(natDbName);
      obj.copyBuffToPKey();
      ICFBamAtomObj realized = (ICFBamAtomObj) 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);
    }
  }
  protected CFInternetTopDomainBuff unpackTopDomainResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackTopDomainResultSetToBuff";
    int idxcol = 1;
    String classCode = resultSet.getString(idxcol);
    idxcol++;
    CFInternetTopDomainBuff buff;
    if (classCode.equals("TDOM")) {
      buff = schema.getFactoryTopDomain().newBuff();
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newRuntimeException(
              getClass(), S_ProcName, "Unrecognized class code \"" + classCode + "\"");
    }
    {
      String colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedByUserId(null);
      } else {
        buff.setCreatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setCreatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setCreatedAt(null);
      } else {
        buff.setCreatedAt(CFDbTestDb2LUWSchema.convertTimestampString(colString));
      }
      idxcol++;
      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedByUserId(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedByUserId(null);
      } else {
        buff.setUpdatedByUserId(UUID.fromString(colString));
      }
      idxcol++;

      colString = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setUpdatedAt(null);
      } else if ((colString == null) || (colString.length() <= 0)) {
        buff.setUpdatedAt(null);
      } else {
        buff.setUpdatedAt(CFDbTestDb2LUWSchema.convertTimestampString(colString));
      }
      idxcol++;
    }
    buff.setRequiredTenantId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredId(resultSet.getLong(idxcol));
    idxcol++;
    {
      String colVal = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setOptionalDescription(null);
      } else {
        buff.setOptionalDescription(colVal);
      }
    }
    idxcol++;
    buff.setRequiredTldId(resultSet.getLong(idxcol));
    idxcol++;
    buff.setRequiredName(resultSet.getString(idxcol));
    idxcol++;

    buff.setRequiredRevision(resultSet.getInt(idxcol));
    return (buff);
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Cluster Attributes
      String attrFullDomainName = null;
      String attrDescription = 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("RspnClusterLocked");

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

      ICFSecuritySchemaObj 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("FullDomainName")) {
          if (attrFullDomainName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrFullDomainName = 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 ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrFullDomainName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "FullDomainName");
      }
      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

      long natId = Long.parseLong(attrId);

      String natFullDomainName = attrFullDomainName;

      String natDescription = attrDescription;

      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);
      }
      // Instantiate a buffer for the parsed information
      ICFSecurityClusterObj obj =
          (ICFSecurityClusterObj) schemaObj.getClusterTableObj().newInstance();
      CFSecurityClusterBuff dataBuff = obj.getClusterBuff();
      dataBuff.setRequiredId(natId);
      dataBuff.setRequiredFullDomainName(natFullDomainName);
      dataBuff.setRequiredDescription(natDescription);
      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();
      ICFSecurityClusterObj realized = (ICFSecurityClusterObj) 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);
    }
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    try {
      // Common XML Attributes
      String attrId = null;
      String attrRevision = null;
      // Param Attributes
      String attrTenantId = null;
      String attrServerMethodId = null;
      String attrDefSchemaTenantId = null;
      String attrDefSchemaId = null;
      String attrName = null;
      String attrShortDescription = null;
      String attrDescription = null;
      String attrIsNullable = null;
      String attrTypeTenantId = null;
      String attrTypeId = null;
      String attrPrevTenantId = null;
      String attrPrevId = null;
      String attrNextTenantId = null;
      String attrNextId = 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("Param");

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

      ICFBamSchemaObj 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("ServerMethodId")) {
          if (attrServerMethodId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrServerMethodId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaTenantId")) {
          if (attrDefSchemaTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("DefSchemaId")) {
          if (attrDefSchemaId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrDefSchemaId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("Name")) {
          if (attrName != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrName = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("ShortDescription")) {
          if (attrShortDescription != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrShortDescription = 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("IsNullable")) {
          if (attrIsNullable != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrIsNullable = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TypeTenantId")) {
          if (attrTypeTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTypeTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("TypeId")) {
          if (attrTypeId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrTypeId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevTenantId")) {
          if (attrPrevTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("PrevId")) {
          if (attrPrevId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrPrevId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextTenantId")) {
          if (attrNextTenantId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextTenantId = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("NextId")) {
          if (attrNextId != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrNextId = 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 ((attrServerMethodId == null) || (attrServerMethodId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ServerMethodId");
      }
      if ((attrId == null) || (attrId.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Id");
      }
      if (attrName == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "Name");
      }
      if ((attrIsNullable == null) || (attrIsNullable.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "IsNullable");
      }

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

      // Convert string attributes to native Java types

      long natTenantId = Long.parseLong(attrTenantId);

      long natServerMethodId = Long.parseLong(attrServerMethodId);

      long natId = Long.parseLong(attrId);

      Long natDefSchemaTenantId;
      if ((attrDefSchemaTenantId == null) || (attrDefSchemaTenantId.length() <= 0)) {
        natDefSchemaTenantId = null;
      } else {
        natDefSchemaTenantId = new Long(Long.parseLong(attrDefSchemaTenantId));
      }

      Long natDefSchemaId;
      if ((attrDefSchemaId == null) || (attrDefSchemaId.length() <= 0)) {
        natDefSchemaId = null;
      } else {
        natDefSchemaId = new Long(Long.parseLong(attrDefSchemaId));
      }

      String natName = attrName;

      String natShortDescription = attrShortDescription;

      String natDescription = attrDescription;

      boolean natIsNullable;
      if (attrIsNullable.equals("true")
          || attrIsNullable.equals("yes")
          || attrIsNullable.equals("1")) {
        natIsNullable = true;
      } else if (attrIsNullable.equals("false")
          || attrIsNullable.equals("no")
          || attrIsNullable.equals("0")) {
        natIsNullable = false;
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newUsageException(
                getClass(),
                S_ProcName,
                "Unexpected IsNullable value, must be one of true, false, yes, no, 1, or 0, not \""
                    + attrIsNullable
                    + "\"");
      }

      Long natTypeTenantId;
      if ((attrTypeTenantId == null) || (attrTypeTenantId.length() <= 0)) {
        natTypeTenantId = null;
      } else {
        natTypeTenantId = new Long(Long.parseLong(attrTypeTenantId));
      }

      Long natTypeId;
      if ((attrTypeId == null) || (attrTypeId.length() <= 0)) {
        natTypeId = null;
      } else {
        natTypeId = new Long(Long.parseLong(attrTypeId));
      }

      Long natPrevTenantId;
      if ((attrPrevTenantId == null) || (attrPrevTenantId.length() <= 0)) {
        natPrevTenantId = null;
      } else {
        natPrevTenantId = new Long(Long.parseLong(attrPrevTenantId));
      }

      Long natPrevId;
      if ((attrPrevId == null) || (attrPrevId.length() <= 0)) {
        natPrevId = null;
      } else {
        natPrevId = new Long(Long.parseLong(attrPrevId));
      }

      Long natNextTenantId;
      if ((attrNextTenantId == null) || (attrNextTenantId.length() <= 0)) {
        natNextTenantId = null;
      } else {
        natNextTenantId = new Long(Long.parseLong(attrNextTenantId));
      }

      Long natNextId;
      if ((attrNextId == null) || (attrNextId.length() <= 0)) {
        natNextId = null;
      } else {
        natNextId = new Long(Long.parseLong(attrNextId));
      }

      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
      ICFBamParamObj obj = (ICFBamParamObj) (schemaObj.getParamTableObj().newInstance());
      CFBamParamBuff dataBuff = obj.getParamBuff();
      dataBuff.setRequiredTenantId(natTenantId);
      dataBuff.setRequiredServerMethodId(natServerMethodId);
      dataBuff.setRequiredId(natId);
      dataBuff.setOptionalDefSchemaTenantId(natDefSchemaTenantId);
      dataBuff.setOptionalDefSchemaId(natDefSchemaId);
      dataBuff.setRequiredName(natName);
      dataBuff.setOptionalShortDescription(natShortDescription);
      dataBuff.setOptionalDescription(natDescription);
      dataBuff.setRequiredIsNullable(natIsNullable);
      dataBuff.setOptionalTypeTenantId(natTypeTenantId);
      dataBuff.setOptionalTypeId(natTypeId);
      dataBuff.setOptionalPrevTenantId(natPrevTenantId);
      dataBuff.setOptionalPrevId(natPrevId);
      dataBuff.setOptionalNextTenantId(natNextTenantId);
      dataBuff.setOptionalNextId(natNextId);
      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<ICFBamParamObj> list = (List<ICFBamParamObj>) xmsgRspnHandler.getListOfObjects();
      ICFBamParamObj realized = (ICFBamParamObj) 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);
    }
  }