public void createTopDomain(CFSecurityAuthorization Authorization, CFInternetTopDomainBuff Buff) {
   final String S_ProcName = "createTopDomain";
   ResultSet resultSet = null;
   try {
     String ClassCode = Buff.getClassCode();
     long TenantId = Buff.getRequiredTenantId();
     String Description = Buff.getOptionalDescription();
     long TldId = Buff.getRequiredTldId();
     String Name = Buff.getRequiredName();
     Connection cnx = schema.getCnx();
     final String sql =
         "CALL sp_create_tdomdef( ?, ?, ?, ?, ?, ?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + ", "
             + "?"
             + " )";
     if (stmtCreateByPKey == null) {
       stmtCreateByPKey = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     stmtCreateByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtCreateByPKey.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
     stmtCreateByPKey.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
     stmtCreateByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtCreateByPKey.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
     stmtCreateByPKey.setString(argIdx++, ClassCode);
     stmtCreateByPKey.setLong(argIdx++, TenantId);
     if (Description != null) {
       stmtCreateByPKey.setString(argIdx++, Description);
     } else {
       stmtCreateByPKey.setNull(argIdx++, java.sql.Types.VARCHAR);
     }
     stmtCreateByPKey.setLong(argIdx++, TldId);
     stmtCreateByPKey.setString(argIdx++, Name);
     resultSet = stmtCreateByPKey.executeQuery();
     if (resultSet.next()) {
       CFInternetTopDomainBuff createdBuff = unpackTopDomainResultSetToBuff(resultSet);
       if (resultSet.next()) {
         resultSet.last();
         throw CFLib.getDefaultExceptionFactory()
             .newRuntimeException(
                 getClass(),
                 S_ProcName,
                 "Did not expect multi-record response, " + resultSet.getRow() + " rows selected");
       }
       Buff.setRequiredTenantId(createdBuff.getRequiredTenantId());
       Buff.setRequiredId(createdBuff.getRequiredId());
       Buff.setOptionalDescription(createdBuff.getOptionalDescription());
       Buff.setRequiredRevision(createdBuff.getRequiredRevision());
       Buff.setCreatedByUserId(createdBuff.getCreatedByUserId());
       Buff.setCreatedAt(createdBuff.getCreatedAt());
       Buff.setUpdatedByUserId(createdBuff.getUpdatedByUserId());
       Buff.setUpdatedAt(createdBuff.getUpdatedAt());
       Buff.setRequiredTldId(createdBuff.getRequiredTldId());
       Buff.setRequiredName(createdBuff.getRequiredName());
     } 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;
     }
   }
 }