public ListIterator<ICFLibAnyObj> enumerateDetails(MssCFGenContext genContext) {
    final String S_ProcName = "CFDbTestMssCFIterateTenantReqMinValue.enumerateDetails() ";

    if (genContext == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), S_ProcName, 1, "genContext");
    }

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
      throw CFLib.getDefaultExceptionFactory()
          .newNullArgumentException(getClass(), S_ProcName, 1, "genContext.getGenDef()");
    }

    List<ICFLibAnyObj> list = new LinkedList<ICFLibAnyObj>();

    if (genDef instanceof ICFDbTestTenantObj) {
      Iterator<ICFDbTestReqMinValueObj> elements =
          ((ICFDbTestTenantObj) genDef).getOptionalComponentsReqMinValue().iterator();
      while (elements.hasNext()) {
        list.add(elements.next());
      }
    } else {
      throw CFLib.getDefaultExceptionFactory()
          .newUnsupportedClassException(
              getClass(), S_ProcName, "genContext.getGenDef()", genDef, "ICFDbTestTenantObj");
    }

    return (list.listIterator());
  }
 public CFSecurityISOTimezoneBuff[] readBuffByOffsetIdx(
     CFSecurityAuthorization Authorization, short TZHourOffset, short TZMinOffset) {
   final String S_ProcName = "readBuffByOffsetIdx";
   ResultSet resultSet = null;
   try {
     Connection cnx = schema.getCnx();
     String sql =
         "SELECT * FROM "
             + schema.getLowerDbSchemaName()
             + ".sp_read_isotz_by_offsetidx( ?, ?, ?, ?, ?"
             + ", "
             + "?"
             + ", "
             + "?"
             + " )";
     if (stmtReadBuffByOffsetIdx == null) {
       stmtReadBuffByOffsetIdx = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     stmtReadBuffByOffsetIdx.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadBuffByOffsetIdx.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
     stmtReadBuffByOffsetIdx.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
     stmtReadBuffByOffsetIdx.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadBuffByOffsetIdx.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
     stmtReadBuffByOffsetIdx.setShort(argIdx++, TZHourOffset);
     stmtReadBuffByOffsetIdx.setShort(argIdx++, TZMinOffset);
     resultSet = stmtReadBuffByOffsetIdx.executeQuery();
     List<CFSecurityISOTimezoneBuff> buffList = new LinkedList<CFSecurityISOTimezoneBuff>();
     while (resultSet.next()) {
       CFSecurityISOTimezoneBuff buff = unpackISOTimezoneResultSetToBuff(resultSet);
       buffList.add(buff);
     }
     int idx = 0;
     CFSecurityISOTimezoneBuff[] retBuff = new CFSecurityISOTimezoneBuff[buffList.size()];
     Iterator<CFSecurityISOTimezoneBuff> iter = buffList.iterator();
     while (iter.hasNext()) {
       retBuff[idx++] = iter.next();
     }
     return (retBuff);
   } catch (SQLException e) {
     throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
   } finally {
     if (resultSet != null) {
       try {
         resultSet.close();
       } catch (SQLException e) {
       }
       resultSet = null;
     }
   }
 }
 public CFInternetURLProtocolBuff[] readAllBuff(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "readAllBuff";
   if (!schema.isTransactionOpen()) {
     throw CFLib.getDefaultExceptionFactory()
         .newUsageException(getClass(), S_ProcName, "Transaction not open");
   }
   ResultSet resultSet = null;
   try {
     Connection cnx = schema.getCnx();
     String sql =
         "SELECT * FROM "
             + schema.getLowerDbSchemaName()
             + ".sp_read_urlproto_all( ?, ?, ?, ?, ? )";
     if (stmtReadAllBuff == null) {
       stmtReadAllBuff = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     stmtReadAllBuff.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadAllBuff.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
     stmtReadAllBuff.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
     stmtReadAllBuff.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadAllBuff.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
     resultSet = stmtReadAllBuff.executeQuery();
     List<CFInternetURLProtocolBuff> buffList = new LinkedList<CFInternetURLProtocolBuff>();
     while (resultSet.next()) {
       CFInternetURLProtocolBuff buff = unpackURLProtocolResultSetToBuff(resultSet);
       buffList.add(buff);
     }
     int idx = 0;
     CFInternetURLProtocolBuff[] retBuff = new CFInternetURLProtocolBuff[buffList.size()];
     Iterator<CFInternetURLProtocolBuff> iter = buffList.iterator();
     while (iter.hasNext()) {
       retBuff[idx++] = iter.next();
     }
     return (retBuff);
   } catch (SQLException e) {
     throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
   } finally {
     if (resultSet != null) {
       try {
         resultSet.close();
       } catch (SQLException e) {
       }
       resultSet = null;
     }
   }
 }
 public CFInternetTopDomainBuff[] readBuffByTldIdx(
     CFSecurityAuthorization Authorization, long TenantId, long TldId) {
   final String S_ProcName = "readBuffByTldIdx";
   ResultSet resultSet = null;
   try {
     Connection cnx = schema.getCnx();
     final String sql =
         "CALL sp_read_tdomdef_by_tldidx( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )";
     if (stmtReadBuffByTldIdx == null) {
       stmtReadBuffByTldIdx = cnx.prepareStatement(sql);
     }
     int argIdx = 1;
     stmtReadBuffByTldIdx.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadBuffByTldIdx.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString());
     stmtReadBuffByTldIdx.setString(
         argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString());
     stmtReadBuffByTldIdx.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId());
     stmtReadBuffByTldIdx.setLong(
         argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId());
     stmtReadBuffByTldIdx.setLong(argIdx++, TenantId);
     stmtReadBuffByTldIdx.setLong(argIdx++, TldId);
     resultSet = stmtReadBuffByTldIdx.executeQuery();
     List<CFInternetTopDomainBuff> buffList = new LinkedList<CFInternetTopDomainBuff>();
     while (resultSet.next()) {
       CFInternetTopDomainBuff buff = unpackTopDomainResultSetToBuff(resultSet);
       buffList.add(buff);
     }
     int idx = 0;
     CFInternetTopDomainBuff[] retBuff = new CFInternetTopDomainBuff[buffList.size()];
     Iterator<CFInternetTopDomainBuff> iter = buffList.iterator();
     while (iter.hasNext()) {
       retBuff[idx++] = iter.next();
     }
     return (retBuff);
   } catch (SQLException e) {
     throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e);
   } finally {
     if (resultSet != null) {
       try {
         resultSet.close();
       } catch (SQLException e) {
       }
       resultSet = null;
     }
   }
 }
 public void setJavaFXDataCollection(Collection<ICFDbTestStringColObj> value) {
   final String S_ProcName = "setJavaFXDataCollection";
   javafxDataCollection = value;
   observableListOfStringCol = FXCollections.observableArrayList();
   if (javafxDataCollection != null) {
     Iterator<ICFDbTestStringColObj> iter = javafxDataCollection.iterator();
     while (iter.hasNext()) {
       observableListOfStringCol.add(iter.next());
     }
     observableListOfStringCol.sort(compareStringColByQualName);
   }
   if (dataTable != null) {
     dataTable.setItems(observableListOfStringCol);
     // Hack from stackoverflow to fix JavaFX TableView refresh issue
     ((TableColumn) dataTable.getColumns().get(0)).setVisible(false);
     ((TableColumn) dataTable.getColumns().get(0)).setVisible(true);
   }
 }
 public CFSecurityClusterBuff[] readAllDerived(CFSecurityAuthorization Authorization) {
   final String S_ProcName = "CFDbTestRamCluster.readAllDerived";
   CFSecurityClusterBuff[] retList = new CFSecurityClusterBuff[dictByPKey.values().size()];
   Iterator<CFSecurityClusterBuff> iter = dictByPKey.values().iterator();
   int idx = 0;
   while (iter.hasNext()) {
     retList[idx++] = iter.next();
   }
   return (retList);
 }
  public CFDbTestOptFullRangeBuff[] readDerivedByTenantIdx(
      CFSecurityAuthorization Authorization, long TenantId) {
    final String S_ProcName = "CFDbTestRamOptFullRange.readDerivedByTenantIdx";
    CFDbTestOptFullRangeByTenantIdxKey key = schema.getFactoryOptFullRange().newTenantIdxKey();
    key.setRequiredTenantId(TenantId);

    CFDbTestOptFullRangeBuff[] recArray;
    if (dictByTenantIdx.containsKey(key)) {
      Map<CFDbTestOptFullRangePKey, CFDbTestOptFullRangeBuff> subdictTenantIdx =
          dictByTenantIdx.get(key);
      recArray = new CFDbTestOptFullRangeBuff[subdictTenantIdx.size()];
      Iterator<CFDbTestOptFullRangeBuff> iter = subdictTenantIdx.values().iterator();
      int idx = 0;
      while (iter.hasNext()) {
        recArray[idx++] = iter.next();
      }
    } else {
      Map<CFDbTestOptFullRangePKey, CFDbTestOptFullRangeBuff> subdictTenantIdx =
          new HashMap<CFDbTestOptFullRangePKey, CFDbTestOptFullRangeBuff>();
      dictByTenantIdx.put(key, subdictTenantIdx);
      recArray = new CFDbTestOptFullRangeBuff[0];
    }
    return (recArray);
  }
  public void startElement(String uri, String localName, String qName, Attributes attrs)
      throws SAXException {
    CFDbTestXMsgSchemaMessageFormatter schemaFormatter = null;
    try {
      // Common XML Attributes
      String attrId = null;
      String attrTenantId = null;
      // Attribute Extraction
      String attrLocalName;
      int numAttrs;
      int idxAttr;
      final String S_ProcName = "startElement";
      final String S_LocalName = "LocalName";

      assert qName.equals("RqstStringColReadByTenantIdx");

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

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

      // Read the objects
      List<ICFDbTestStringColObj> list =
          schemaObj.getStringColTableObj().readStringColByTenantIdx(natTenantId);
      String responseOpening =
          schemaFormatter.formatRspnXmlPreamble()
              + "\n"
              + "\t"
              + CFDbTestXMsgValueMessageFormatter.formatValueRspnListOpenTag();
      xmsgRqstHandler.appendResponse(responseOpening);
      Iterator<ICFDbTestStringColObj> iter = list.iterator();
      ICFDbTestStringColObj cur;
      String subxml;
      while (iter.hasNext()) {
        cur = iter.next();
        subxml =
            CFDbTestXMsgValueMessageFormatter.formatValueRspnDerivedRec(
                "\n\t\t", cur.getValueBuff());
        xmsgRqstHandler.appendResponse(subxml);
      }
      String responseClosing =
          "\n"
              + "\t"
              + CFDbTestXMsgValueMessageFormatter.formatValueRspnListCloseTag()
              + schemaFormatter.formatRspnXmlPostamble();
      xmsgRqstHandler.appendResponse(responseClosing);
    } 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 deleteClusterByUDescrIdx(
     CFSecurityAuthorization Authorization, CFSecurityClusterByUDescrIdxKey argKey) {
   CFSecurityClusterBuff cur;
   LinkedList<CFSecurityClusterBuff> matchSet = new LinkedList<CFSecurityClusterBuff>();
   Iterator<CFSecurityClusterBuff> values = dictByPKey.values().iterator();
   while (values.hasNext()) {
     cur = values.next();
     if (argKey.equals(cur)) {
       matchSet.add(cur);
     }
   }
   Iterator<CFSecurityClusterBuff> iterMatch = matchSet.iterator();
   while (iterMatch.hasNext()) {
     cur = iterMatch.next();
     deleteCluster(Authorization, cur);
   }
 }
 public void deleteOptFullRangeByTenantIdx(
     CFSecurityAuthorization Authorization, CFDbTestOptFullRangeByTenantIdxKey argKey) {
   CFDbTestOptFullRangeBuff cur;
   LinkedList<CFDbTestOptFullRangeBuff> matchSet = new LinkedList<CFDbTestOptFullRangeBuff>();
   Iterator<CFDbTestOptFullRangeBuff> values = dictByPKey.values().iterator();
   while (values.hasNext()) {
     cur = values.next();
     if (argKey.equals(cur)) {
       matchSet.add(cur);
     }
   }
   Iterator<CFDbTestOptFullRangeBuff> iterMatch = matchSet.iterator();
   while (iterMatch.hasNext()) {
     cur = iterMatch.next();
     deleteOptFullRange(Authorization, cur);
   }
 }