public CFSecurityISOLanguageBuff lockBuff(
     CFSecurityAuthorization Authorization, CFSecurityISOLanguagePKey PKey) {
   final String S_ProcName = "lockBuff";
   CFSecurityISOLanguageBuff buff = readDerived(Authorization, PKey);
   if ((buff != null) && (!buff.getClassCode().equals("ISLN"))) {
     buff = null;
   }
   return (buff);
 }
  public void deleteISOLanguage(
      CFSecurityAuthorization Authorization, CFSecurityISOLanguageBuff Buff) {
    final String S_ProcName = "deleteISOLanguage";
    ResultSet resultSet = null;
    try {
      Connection cnx = schema.getCnx();
      short ISOLanguageId = Buff.getRequiredISOLanguageId();

      final String sql = "CALL sp_delete_iso_lang( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )";
      if (stmtDeleteByPKey == null) {
        stmtDeleteByPKey = cnx.prepareStatement(sql);
      }
      int argIdx = 1;
      stmtDeleteByPKey.setLong(
          argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
      stmtDeleteByPKey.setString(
          argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
      stmtDeleteByPKey.setString(
          argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
      stmtDeleteByPKey.setLong(
          argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
      stmtDeleteByPKey.setLong(
          argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
      stmtDeleteByPKey.setShort(argIdx++, ISOLanguageId);
      stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision());
      ;
      resultSet = stmtDeleteByPKey.executeQuery();
      if (resultSet.next()) {
        int deleteFlag = resultSet.getInt(1);
        if (resultSet.next()) {
          resultSet.last();
          throw CFLib.getDefaultExceptionFactory()
              .newRuntimeException(
                  getClass(),
                  S_ProcName,
                  "Did not expect multi-record response, " + resultSet.getRow() + " rows selected");
        }
      } else {
        throw CFLib.getDefaultExceptionFactory()
            .newRuntimeException(
                getClass(),
                S_ProcName,
                "Expected 1 record result set to be returned by delete, not 0 rows");
      }
    } catch (SQLException e) {
      throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
      if (resultSet != null) {
        try {
          resultSet.close();
        } catch (SQLException e) {
        }
        resultSet = null;
      }
    }
  }
 public CFSecurityISOLanguageBuff readBuffByCode3Idx(
     CFSecurityAuthorization Authorization, String ISO6392Code) {
   final String S_ProcName = "CFInternetRamISOLanguage.readBuffByCode3Idx() ";
   CFSecurityISOLanguageBuff buff = readDerivedByCode3Idx(Authorization, ISO6392Code);
   if ((buff != null) && buff.getClassCode().equals("ISLN")) {
     return ((CFSecurityISOLanguageBuff) buff);
   } else {
     return (null);
   }
 }
 public CFSecurityISOLanguageBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "CFInternetRamISOLanguage.readAllBuff";
   CFSecurityISOLanguageBuff buff;
   ArrayList<CFSecurityISOLanguageBuff> filteredList = new ArrayList<CFSecurityISOLanguageBuff>();
   CFSecurityISOLanguageBuff[] buffList = readAllDerived(Authorization);
   for (int idx = 0; idx < buffList.length; idx++) {
     buff = buffList[idx];
     if ((buff != null) && buff.getClassCode().equals("ISLN")) {
       filteredList.add(buff);
     }
   }
   return (filteredList.toArray(new CFSecurityISOLanguageBuff[0]));
 }
  public void deleteISOLanguage(
      CFSecurityAuthorization Authorization, CFSecurityISOLanguageBuff Buff) {
    final String S_ProcName = "deleteISOLanguage";
    ResultSet resultSet = null;
    try {
      Connection cnx = schema.getCnx();
      short ISOLanguageId = Buff.getRequiredISOLanguageId();

      String sql =
          "call "
              + schema.getLowerDbSchemaName()
              + ".sp_delete_iso_lang( ?, ?, ?, ?, ?"
              + ", "
              + "?"
              + ", "
              + "?"
              + " )";
      if (stmtDeleteByPKey == null) {
        stmtDeleteByPKey = cnx.prepareStatement(sql);
      }
      int argIdx = 1;
      stmtDeleteByPKey.setLong(
          argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
      stmtDeleteByPKey.setString(
          argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
      stmtDeleteByPKey.setString(
          argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
      stmtDeleteByPKey.setLong(
          argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
      stmtDeleteByPKey.setLong(
          argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
      stmtDeleteByPKey.setShort(argIdx++, ISOLanguageId);
      stmtDeleteByPKey.setInt(argIdx++, Buff.getRequiredRevision());
      ;
      stmtDeleteByPKey.executeUpdate();
    } catch (SQLException e) {
      throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
    } finally {
      if (resultSet != null) {
        try {
          resultSet.close();
        } catch (SQLException e) {
        }
        resultSet = null;
      }
    }
  }
 public static String formatISOLanguageRqstDelete(
     String separator, CFSecurityISOLanguageBuff buff) {
   String retval =
       "<RqstISOLanguageDelete "
           + formatISOLanguagePKeyAttributes(separator, buff)
           + CFLibXmlUtil.formatRequiredInt32(separator, "Revision", buff.getRequiredRevision())
           + " />";
   return (retval);
 }
  public void createISOLanguage(
      CFSecurityAuthorization Authorization, CFSecurityISOLanguageBuff Buff) {
    final String S_ProcName = "createISOLanguage";
    CFSecurityISOLanguagePKey pkey = schema.getFactoryISOLanguage().newPKey();
    pkey.setRequiredISOLanguageId(schema.nextISOLanguageIdGen());
    Buff.setRequiredISOLanguageId(pkey.getRequiredISOLanguageId());
    CFSecurityISOLanguageByCode3IdxKey keyCode3Idx =
        schema.getFactoryISOLanguage().newCode3IdxKey();
    keyCode3Idx.setRequiredISO6392Code(Buff.getRequiredISO6392Code());

    CFSecurityISOLanguageByCode2IdxKey keyCode2Idx =
        schema.getFactoryISOLanguage().newCode2IdxKey();
    keyCode2Idx.setOptionalISO6391Code(Buff.getOptionalISO6391Code());

    // Validate unique indexes

    if (dictByPKey.containsKey(pkey)) {
      throw CFLib.getDefaultExceptionFactory()
          .newPrimaryKeyNotNewException(getClass(), S_ProcName, pkey);
    }

    if (dictByCode3Idx.containsKey(keyCode3Idx)) {
      throw CFLib.getDefaultExceptionFactory()
          .newUniqueIndexViolationException(
              getClass(), S_ProcName, "ISOLanguage6392Idx", keyCode3Idx);
    }

    // Validate foreign keys

    // Proceed with adding the new record

    dictByPKey.put(pkey, Buff);

    dictByCode3Idx.put(keyCode3Idx, Buff);

    Map<CFSecurityISOLanguagePKey, CFSecurityISOLanguageBuff> subdictCode2Idx;
    if (dictByCode2Idx.containsKey(keyCode2Idx)) {
      subdictCode2Idx = dictByCode2Idx.get(keyCode2Idx);
    } else {
      subdictCode2Idx = new HashMap<CFSecurityISOLanguagePKey, CFSecurityISOLanguageBuff>();
      dictByCode2Idx.put(keyCode2Idx, subdictCode2Idx);
    }
    subdictCode2Idx.put(pkey, Buff);
  }
 public static String formatISOLanguageBuffAttributes(
     String separator, CFSecurityISOLanguageBuff buff) {
   String retval =
       CFDbTestXMsgISOLanguageMessageFormatter.formatISOLanguagePKeyAttributes(separator, buff)
           + CFLibXmlUtil.formatRequiredInt32(separator, "Revision", buff.getRequiredRevision())
           + CFLibXmlUtil.formatOptionalUuid(separator, "CreatedBy", buff.getCreatedByUserId())
           + CFLibXmlUtil.formatOptionalTimestamp(separator, "CreatedAt", buff.getCreatedAt())
           + CFLibXmlUtil.formatOptionalUuid(separator, "UpdatedBy", buff.getUpdatedByUserId())
           + CFLibXmlUtil.formatOptionalTimestamp(separator, "UpdatedAt", buff.getUpdatedAt())
           + CFLibXmlUtil.formatRequiredXmlString(separator, "ISOCode", buff.getRequiredISOCode())
           + CFLibXmlUtil.formatRequiredXmlString(
               separator, "BaseLanguageCode", buff.getRequiredBaseLanguageCode())
           + CFLibXmlUtil.formatOptionalInt16(
               separator, "ISOCountryId", buff.getOptionalISOCountryId());
   return (retval);
 }
  public void deleteISOLanguage(
      CFSecurityAuthorization Authorization, CFSecurityISOLanguageBuff Buff) {
    final String S_ProcName = "CFInternetRamISOLanguageTable.deleteISOLanguage() ";
    CFSecurityISOLanguagePKey pkey = schema.getFactoryISOLanguage().newPKey();
    pkey.setRequiredISOLanguageId(Buff.getRequiredISOLanguageId());
    CFSecurityISOLanguageBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
      return;
    }
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
      throw CFLib.getDefaultExceptionFactory()
          .newCollisionDetectedException(getClass(), "deleteISOLanguage", pkey);
    }
    CFSecurityISOLanguageByCode3IdxKey keyCode3Idx =
        schema.getFactoryISOLanguage().newCode3IdxKey();
    keyCode3Idx.setRequiredISO6392Code(existing.getRequiredISO6392Code());

    CFSecurityISOLanguageByCode2IdxKey keyCode2Idx =
        schema.getFactoryISOLanguage().newCode2IdxKey();
    keyCode2Idx.setOptionalISO6391Code(existing.getOptionalISO6391Code());

    // Validate reverse foreign keys

    // Delete is valid

    schema
        .getTableISOCountryLanguage()
        .deleteISOCountryLanguageByLanguageIdx(Authorization, Buff.getRequiredISOLanguageId());
    Map<CFSecurityISOLanguagePKey, CFSecurityISOLanguageBuff> subdict;

    dictByPKey.remove(pkey);

    dictByCode3Idx.remove(keyCode3Idx);

    subdict = dictByCode2Idx.get(keyCode2Idx);
    subdict.remove(pkey);
  }
  public void updateISOLanguage(
      CFSecurityAuthorization Authorization, CFSecurityISOLanguageBuff Buff) {
    CFSecurityISOLanguagePKey pkey = schema.getFactoryISOLanguage().newPKey();
    pkey.setRequiredISOLanguageId(Buff.getRequiredISOLanguageId());
    CFSecurityISOLanguageBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newStaleCacheDetectedException(
              getClass(), "updateISOLanguage", "Existing record not found", "ISOLanguage", pkey);
    }
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
      throw CFLib.getDefaultExceptionFactory()
          .newCollisionDetectedException(getClass(), "updateISOLanguage", pkey);
    }
    Buff.setRequiredRevision(Buff.getRequiredRevision() + 1);
    CFSecurityISOLanguageByCode3IdxKey existingKeyCode3Idx =
        schema.getFactoryISOLanguage().newCode3IdxKey();
    existingKeyCode3Idx.setRequiredISO6392Code(existing.getRequiredISO6392Code());

    CFSecurityISOLanguageByCode3IdxKey newKeyCode3Idx =
        schema.getFactoryISOLanguage().newCode3IdxKey();
    newKeyCode3Idx.setRequiredISO6392Code(Buff.getRequiredISO6392Code());

    CFSecurityISOLanguageByCode2IdxKey existingKeyCode2Idx =
        schema.getFactoryISOLanguage().newCode2IdxKey();
    existingKeyCode2Idx.setOptionalISO6391Code(existing.getOptionalISO6391Code());

    CFSecurityISOLanguageByCode2IdxKey newKeyCode2Idx =
        schema.getFactoryISOLanguage().newCode2IdxKey();
    newKeyCode2Idx.setOptionalISO6391Code(Buff.getOptionalISO6391Code());

    // Check unique indexes

    if (!existingKeyCode3Idx.equals(newKeyCode3Idx)) {
      if (dictByCode3Idx.containsKey(newKeyCode3Idx)) {
        throw CFLib.getDefaultExceptionFactory()
            .newUniqueIndexViolationException(
                getClass(), "updateISOLanguage", "ISOLanguage6392Idx", newKeyCode3Idx);
      }
    }

    // Validate foreign keys

    // Update is valid

    Map<CFSecurityISOLanguagePKey, CFSecurityISOLanguageBuff> subdict;

    dictByPKey.remove(pkey);
    dictByPKey.put(pkey, Buff);

    dictByCode3Idx.remove(existingKeyCode3Idx);
    dictByCode3Idx.put(newKeyCode3Idx, Buff);

    subdict = dictByCode2Idx.get(existingKeyCode2Idx);
    if (subdict != null) {
      subdict.remove(pkey);
    }
    if (dictByCode2Idx.containsKey(newKeyCode2Idx)) {
      subdict = dictByCode2Idx.get(newKeyCode2Idx);
    } else {
      subdict = new HashMap<CFSecurityISOLanguagePKey, CFSecurityISOLanguageBuff>();
      dictByCode2Idx.put(newKeyCode2Idx, subdict);
    }
    subdict.put(pkey, Buff);
  }
 public void updateISOLanguage(
     CFSecurityAuthorization Authorization, CFSecurityISOLanguageBuff Buff) {
   final String S_ProcName = "updateISOLanguage";
   ResultSet resultSet = null;
   try {
     short ISOLanguageId = Buff.getRequiredISOLanguageId();
     String ISO6392Code = Buff.getRequiredISO6392Code();
     String ISO6391Code = Buff.getOptionalISO6391Code();
     String EnglishName = Buff.getRequiredEnglishName();
     int Revision = Buff.getRequiredRevision();
     Connection cnx = schema.getCnx();
     String sql =
         "call "
             + schema.getLowerDbSchemaName()
             + ".sp_update_iso_lang( ?, ?, ?, ?, ?, ?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + " )";
     if (stmtUpdateByPKey == null) {
       stmtUpdateByPKey = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     stmtUpdateByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtUpdateByPKey.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
     stmtUpdateByPKey.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
     stmtUpdateByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtUpdateByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
     stmtUpdateByPKey.setString(argIdx++, "ISLN");
     stmtUpdateByPKey.setShort(argIdx++, ISOLanguageId);
     stmtUpdateByPKey.setString(argIdx++, ISO6392Code);
     if (ISO6391Code != null) {
       stmtUpdateByPKey.setString(argIdx++, ISO6391Code);
     } else {
       stmtUpdateByPKey.setNull(argIdx++, java.sql.Types.VARCHAR);
     }
     stmtUpdateByPKey.setString(argIdx++, EnglishName);
     stmtUpdateByPKey.setInt(argIdx++, Revision);
     try {
       resultSet = stmtUpdateByPKey.executeQuery();
     } catch (SQLException e) {
       if (e.getErrorCode() != 1329) {
         throw e;
       }
       resultSet = null;
     }
     if ((resultSet != null) && resultSet.next()) {
       CFSecurityISOLanguageBuff updatedBuff = unpackISOLanguageResultSetToBuff(resultSet);
       if ((resultSet != null) && resultSet.next()) {
         resultSet.last();
         throw CFLib.getDefaultExceptionFactory()
             .newRuntimeException(
                 getClass(),
                 S_ProcName,
                 "Did not expect multi-record response, " + resultSet.getRow() + " rows selected");
       }
       Buff.setRequiredISO6392Code(updatedBuff.getRequiredISO6392Code());
       Buff.setOptionalISO6391Code(updatedBuff.getOptionalISO6391Code());
       Buff.setRequiredEnglishName(updatedBuff.getRequiredEnglishName());
       Buff.setRequiredRevision(updatedBuff.getRequiredRevision());
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newRuntimeException(
               getClass(),
               S_ProcName,
               "Expected a single-record response, " + resultSet.getRow() + " rows selected");
     }
   } catch (SQLException e) {
     throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
   } finally {
     if (resultSet != null) {
       try {
         resultSet.close();
       } catch (SQLException e) {
       }
       resultSet = null;
     }
   }
 }
  protected CFSecurityISOLanguageBuff unpackISOLanguageResultSetToBuff(ResultSet resultSet)
      throws SQLException {
    final String S_ProcName = "unpackISOLanguageResultSetToBuff";
    int idxcol = 1;
    CFSecurityISOLanguageBuff buff = schema.getFactoryISOLanguage().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.setRequiredISOLanguageId(resultSet.getShort(idxcol));
    idxcol++;
    buff.setRequiredISO6392Code(resultSet.getString(idxcol));
    idxcol++;
    {
      String colVal = resultSet.getString(idxcol);
      if (resultSet.wasNull()) {
        buff.setOptionalISO6391Code(null);
      } else {
        buff.setOptionalISO6391Code(colVal);
      }
    }
    idxcol++;
    buff.setRequiredEnglishName(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;
      // ISOLanguage Attributes
      String attrISOCode = null;
      String attrBaseLanguageCode = null;
      String attrISOCountryId = 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("ISOLanguage");

      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("ISOCode")) {
          if (attrISOCode != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrISOCode = attrs.getValue(idxAttr);
        } else if (attrLocalName.equals("BaseLanguageCode")) {
          if (attrBaseLanguageCode != null) {
            throw CFLib.getDefaultExceptionFactory()
                .newUniqueIndexViolationException(
                    getClass(), S_ProcName, S_LocalName, attrLocalName);
          }
          attrBaseLanguageCode = 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("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 (attrISOCode == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "ISOCode");
      }
      if (attrBaseLanguageCode == null) {
        throw CFLib.getDefaultExceptionFactory()
            .newNullArgumentException(getClass(), S_ProcName, 0, "BaseLanguageCode");
      }

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

      // Convert string attributes to native Java types

      short natId = Short.parseShort(attrId);

      String natISOCode = attrISOCode;

      String natBaseLanguageCode = attrBaseLanguageCode;

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

      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
      ICFFreeSwitchISOLanguageObj obj =
          (ICFFreeSwitchISOLanguageObj) (schemaObj.getISOLanguageTableObj().newInstance());
      CFSecurityISOLanguageBuff dataBuff = obj.getISOLanguageBuff();
      dataBuff.setRequiredId(natId);
      dataBuff.setRequiredISOCode(natISOCode);
      dataBuff.setRequiredBaseLanguageCode(natBaseLanguageCode);
      dataBuff.setOptionalISOCountryId(natISOCountryId);
      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<ICFSecurityISOLanguageObj> list =
          (List<ICFSecurityISOLanguageObj>) xmsgRspnHandler.getListOfObjects();
      ICFSecurityISOLanguageObj realized = (ICFSecurityISOLanguageObj) 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);
    }
  }
 public static String formatISOLanguagePKeyAttributes(
     String separator, CFSecurityISOLanguageBuff buff) {
   String retval = CFLibXmlUtil.formatRequiredInt16(separator, "Id", buff.getRequiredId());
   return (retval);
 }