List of usage examples for java.util ArrayList listIterator
public ListIterator<E> listIterator()
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstMySql.CFAstMySqlDomainBaseTable.java
public CFAstDomainBaseBuff[] readDerivedByTenantIdx(CFAstAuthorization Authorization, long TenantId) { final String S_ProcName = "readDerivedByTenantIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*w w w. ja v a 2 s .c om*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerSchemaDbName() + ".sp_read_bdomdef_cc_by_tenantidx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadClassCodeByTenantIdx == null) { stmtReadClassCodeByTenantIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByTenantIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByTenantIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, TenantId); try { resultSet = stmtReadClassCodeByTenantIdx.executeQuery(); } catch (SQLException e) { if (e.getErrorCode() != 1329) { throw e; } resultSet = null; } while ((resultSet != null) && resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstDomainBaseBuff> resultList = new LinkedList<CFAstDomainBaseBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("BDOM")) { CFAstDomainBaseBuff[] subList = readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TDOM")) { CFAstTopDomainBuff[] subList = schema.getTableTopDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("DOMN")) { CFAstDomainBuff[] subList = schema.getTableDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("BPRJ")) { CFAstProjectBaseBuff[] subList = schema.getTableProjectBase().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("RPRJ")) { CFAstRealProjectBuff[] subList = schema.getTableRealProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TPRJ")) { CFAstTopProjectBuff[] subList = schema.getTableTopProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SPRJ")) { CFAstSubProjectBuff[] subList = schema.getTableSubProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("VERN")) { CFAstVersionBuff[] subList = schema.getTableVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MJVR")) { CFAstMajorVersionBuff[] subList = schema.getTableMajorVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MNVR")) { CFAstMinorVersionBuff[] subList = schema.getTableMinorVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstDomainBaseBuff[] retBuff = new CFAstDomainBaseBuff[resultList.size()]; Iterator<CFAstDomainBaseBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstMySql.CFAstMySqlDomainBaseTable.java
public CFAstDomainBaseBuff[] readDerivedByTenantIdx(CFAstAuthorization Authorization, long TenantId) { final String S_ProcName = "readDerivedByTenantIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }//from w w w .j a v a 2 s . co m ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_read_bdomdef_cc_by_tenantidx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadClassCodeByTenantIdx == null) { stmtReadClassCodeByTenantIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByTenantIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByTenantIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, TenantId); try { resultSet = stmtReadClassCodeByTenantIdx.executeQuery(); } catch (SQLException e) { if (e.getErrorCode() != 1329) { throw e; } resultSet = null; } while ((resultSet != null) && resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstDomainBaseBuff> resultList = new LinkedList<CFAstDomainBaseBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("BDOM")) { CFAstDomainBaseBuff[] subList = readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TDOM")) { CFAstTopDomainBuff[] subList = schema.getTableTopDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("DOMN")) { CFAstDomainBuff[] subList = schema.getTableDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("BPRJ")) { CFAstProjectBaseBuff[] subList = schema.getTableProjectBase().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("RPRJ")) { CFAstRealProjectBuff[] subList = schema.getTableRealProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TPRJ")) { CFAstTopProjectBuff[] subList = schema.getTableTopProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SPRJ")) { CFAstSubProjectBuff[] subList = schema.getTableSubProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("VERN")) { CFAstVersionBuff[] subList = schema.getTableVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MJVR")) { CFAstMajorVersionBuff[] subList = schema.getTableMajorVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MNVR")) { CFAstMinorVersionBuff[] subList = schema.getTableMinorVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstDomainBaseBuff[] retBuff = new CFAstDomainBaseBuff[resultList.size()]; Iterator<CFAstDomainBaseBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskMySql.CFAsteriskMySqlDomainBaseTable.java
public CFInternetDomainBaseBuff[] readDerivedByTenantIdx(CFSecurityAuthorization Authorization, long TenantId) { final String S_ProcName = "readDerivedByTenantIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*w ww . j a va 2 s . com*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "call " + schema.getLowerDbSchemaName() + ".sp_read_bdomdef_cc_by_tenantidx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadClassCodeByTenantIdx == null) { stmtReadClassCodeByTenantIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByTenantIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByTenantIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByTenantIdx.setLong(argIdx++, TenantId); try { resultSet = stmtReadClassCodeByTenantIdx.executeQuery(); } catch (SQLException e) { if (e.getErrorCode() != 1329) { throw e; } resultSet = null; } while ((resultSet != null) && resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFInternetDomainBaseBuff> resultList = new LinkedList<CFInternetDomainBaseBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("BDOM")) { CFInternetDomainBaseBuff[] subList = readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TDOM")) { CFInternetTopDomainBuff[] subList = schema.getTableTopDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("DOMN")) { CFInternetDomainBuff[] subList = schema.getTableDomain().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("BPRJ")) { CFInternetProjectBaseBuff[] subList = schema.getTableProjectBase() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("RPRJ")) { CFInternetRealProjectBuff[] subList = schema.getTableRealProject() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TPRJ")) { CFInternetTopProjectBuff[] subList = schema.getTableTopProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SPRJ")) { CFInternetSubProjectBuff[] subList = schema.getTableSubProject().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("VERN")) { CFInternetVersionBuff[] subList = schema.getTableVersion().readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MJVR")) { CFInternetMajorVersionBuff[] subList = schema.getTableMajorVersion() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("MNVR")) { CFInternetMinorVersionBuff[] subList = schema.getTableMinorVersion() .readBuffByTenantIdx(Authorization, TenantId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFInternetDomainBaseBuff[] retBuff = new CFInternetDomainBaseBuff[resultList.size()]; Iterator<CFInternetDomainBaseBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskDb2LUW.CFAsteriskDb2LUWConfigurationFileTable.java
public CFAsteriskConfigurationFileBuff[] readDerivedByClusterIdx(CFSecurityAuthorization Authorization, long ClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }//from w ww. j a va2 s . com ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); final String sql = "CALL sp_read_conf_file_cc_by_clusteridx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadClassCodeByClusterIdx == null) { stmtReadClassCodeByClusterIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, ClusterId); resultSet = stmtReadClassCodeByClusterIdx.executeQuery(); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAsteriskConfigurationFileBuff> resultList = new LinkedList<CFAsteriskConfigurationFileBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("CONF")) { CFAsteriskConfigurationFileBuff[] subList = readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CASC")) { CFAsteriskAsteriskConfBuff[] subList = schema.getTableAsteriskConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CSIP")) { CFAsteriskSipConfBuff[] subList = schema.getTableSipConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CEXT")) { CFAsteriskExtensionsConfBuff[] subList = schema.getTableExtensionsConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CVOM")) { CFAsteriskVoicemailConfBuff[] subList = schema.getTableVoicemailConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CECC")) { CFAsteriskExtConfigConfBuff[] subList = schema.getTableExtConfigConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAsteriskConfigurationFileBuff[] retBuff = new CFAsteriskConfigurationFileBuff[resultList.size()]; Iterator<CFAsteriskConfigurationFileBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstPgSql.CFAstPgSqlConfigurationFileTable.java
public CFAstConfigurationFileBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long ClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*w w w .j a v a 2 s. c o m*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "SELECT * FROM " + schema.getLowerSchemaDbName() + ".sp_read_conf_file_cc_by_clusteridx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadClassCodeByClusterIdx == null) { stmtReadClassCodeByClusterIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, ClusterId); resultSet = stmtReadClassCodeByClusterIdx.executeQuery(); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstConfigurationFileBuff> resultList = new LinkedList<CFAstConfigurationFileBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("CONF")) { CFAstConfigurationFileBuff[] subList = readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CASC")) { CFAstAsteriskConfBuff[] subList = schema.getTableAsteriskConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CSIP")) { CFAstSipConfBuff[] subList = schema.getTableSipConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CEXT")) { CFAstExtensionsConfBuff[] subList = schema.getTableExtensionsConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CVOM")) { CFAstVoicemailConfBuff[] subList = schema.getTableVoicemailConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CECC")) { CFAstExtConfigConfBuff[] subList = schema.getTableExtConfigConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstConfigurationFileBuff[] retBuff = new CFAstConfigurationFileBuff[resultList.size()]; Iterator<CFAstConfigurationFileBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstDb2LUW.CFAstDb2LUWConfigurationFileTable.java
public CFAstConfigurationFileBuff[] readDerivedByHostIdx(CFAstAuthorization Authorization, long ClusterId, long HostNodeId) { final String S_ProcName = "readDerivedByHostIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }//from w ww.j a va 2 s . c o m ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); final String sql = "CALL sp_read_conf_file_cc_by_hostidx( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )"; if (stmtReadClassCodeByHostIdx == null) { stmtReadClassCodeByHostIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByHostIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByHostIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByHostIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByHostIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByHostIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByHostIdx.setLong(argIdx++, ClusterId); stmtReadClassCodeByHostIdx.setLong(argIdx++, HostNodeId); resultSet = stmtReadClassCodeByHostIdx.executeQuery(); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstConfigurationFileBuff> resultList = new LinkedList<CFAstConfigurationFileBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("CONF")) { CFAstConfigurationFileBuff[] subList = readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CASC")) { CFAstAsteriskConfBuff[] subList = schema.getTableAsteriskConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CSIP")) { CFAstSipConfBuff[] subList = schema.getTableSipConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CEXT")) { CFAstExtensionsConfBuff[] subList = schema.getTableExtensionsConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CVOM")) { CFAstVoicemailConfBuff[] subList = schema.getTableVoicemailConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CECC")) { CFAstExtConfigConfBuff[] subList = schema.getTableExtConfigConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstConfigurationFileBuff[] retBuff = new CFAstConfigurationFileBuff[resultList.size()]; Iterator<CFAstConfigurationFileBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstSybase.CFAstSybaseConfigurationFileTable.java
public CFAstConfigurationFileBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long ClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from ww w . j ava 2 s .co m*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "exec sp_read_conf_file_cc_by_clusteridx ?, ?, ?, ?, ?" + ", " + "?"; if (stmtReadClassCodeByClusterIdx == null) { stmtReadClassCodeByClusterIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, ClusterId); resultSet = stmtReadClassCodeByClusterIdx.executeQuery(); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstConfigurationFileBuff> resultList = new LinkedList<CFAstConfigurationFileBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("CONF")) { CFAstConfigurationFileBuff[] subList = readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CASC")) { CFAstAsteriskConfBuff[] subList = schema.getTableAsteriskConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CSIP")) { CFAstSipConfBuff[] subList = schema.getTableSipConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CEXT")) { CFAstExtensionsConfBuff[] subList = schema.getTableExtensionsConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CVOM")) { CFAstVoicemailConfBuff[] subList = schema.getTableVoicemailConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CECC")) { CFAstExtConfigConfBuff[] subList = schema.getTableExtConfigConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstConfigurationFileBuff[] retBuff = new CFAstConfigurationFileBuff[resultList.size()]; Iterator<CFAstConfigurationFileBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_1.CFAstPgSql.CFAstPgSqlConfigurationFileTable.java
public CFAstConfigurationFileBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long ClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/* w w w . j ava 2s. c om*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "SELECT * FROM " + schema.getLowerDbSchemaName() + ".sp_read_conf_file_cc_by_clusteridx( ?, ?, ?, ?, ?" + ", " + "?" + " )"; if (stmtReadClassCodeByClusterIdx == null) { stmtReadClassCodeByClusterIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, ClusterId); resultSet = stmtReadClassCodeByClusterIdx.executeQuery(); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstConfigurationFileBuff> resultList = new LinkedList<CFAstConfigurationFileBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("CONF")) { CFAstConfigurationFileBuff[] subList = readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CASC")) { CFAstAsteriskConfBuff[] subList = schema.getTableAsteriskConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CSIP")) { CFAstSipConfBuff[] subList = schema.getTableSipConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CEXT")) { CFAstExtensionsConfBuff[] subList = schema.getTableExtensionsConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CVOM")) { CFAstVoicemailConfBuff[] subList = schema.getTableVoicemailConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CECC")) { CFAstExtConfigConfBuff[] subList = schema.getTableExtConfigConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstConfigurationFileBuff[] retBuff = new CFAstConfigurationFileBuff[resultList.size()]; Iterator<CFAstConfigurationFileBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstPgSql.CFAstPgSqlConfigurationFileTable.java
public CFAstConfigurationFileBuff[] readDerivedByHostIdx(CFAstAuthorization Authorization, long ClusterId, long HostNodeId) { final String S_ProcName = "readDerivedByHostIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from w w w . j ava2 s . co m*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "SELECT * FROM " + schema.getLowerSchemaDbName() + ".sp_read_conf_file_cc_by_hostidx( ?, ?, ?, ?, ?" + ", " + "?" + ", " + "?" + " )"; if (stmtReadClassCodeByHostIdx == null) { stmtReadClassCodeByHostIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByHostIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByHostIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByHostIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByHostIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByHostIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByHostIdx.setLong(argIdx++, ClusterId); stmtReadClassCodeByHostIdx.setLong(argIdx++, HostNodeId); resultSet = stmtReadClassCodeByHostIdx.executeQuery(); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstConfigurationFileBuff> resultList = new LinkedList<CFAstConfigurationFileBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("CONF")) { CFAstConfigurationFileBuff[] subList = readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CASC")) { CFAstAsteriskConfBuff[] subList = schema.getTableAsteriskConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CSIP")) { CFAstSipConfBuff[] subList = schema.getTableSipConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CEXT")) { CFAstExtensionsConfBuff[] subList = schema.getTableExtensionsConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CVOM")) { CFAstVoicemailConfBuff[] subList = schema.getTableVoicemailConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CECC")) { CFAstExtConfigConfBuff[] subList = schema.getTableExtConfigConf().readBuffByHostIdx(Authorization, ClusterId, HostNodeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstConfigurationFileBuff[] retBuff = new CFAstConfigurationFileBuff[resultList.size()]; Iterator<CFAstConfigurationFileBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstMSSql.CFAstMSSqlConfigurationFileTable.java
public CFAstConfigurationFileBuff[] readDerivedByClusterIdx(CFAstAuthorization Authorization, long ClusterId) { final String S_ProcName = "readDerivedByClusterIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/* w ww. j a va 2 s. c om*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; ResultSet resultSet = null; try { Connection cnx = schema.getCnx(); String sql = "{ call sp_read_conf_file_cc_by_clusteridx( ?, ?, ?, ?, ?" + ", " + "?" + " ) }"; if (stmtReadClassCodeByClusterIdx == null) { stmtReadClassCodeByClusterIdx = cnx.prepareStatement(sql); } int argIdx = 1; stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecUserId().toString()); stmtReadClassCodeByClusterIdx.setString(argIdx++, (Authorization == null) ? "" : Authorization.getSecSessionId().toString()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecClusterId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, (Authorization == null) ? 0 : Authorization.getSecTenantId()); stmtReadClassCodeByClusterIdx.setLong(argIdx++, ClusterId); resultSet = stmtReadClassCodeByClusterIdx.executeQuery(); if (resultSet != null) { while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } finally { if (resultSet != null) { try { resultSet.close(); } catch (SQLException e) { } resultSet = null; } } List<CFAstConfigurationFileBuff> resultList = new LinkedList<CFAstConfigurationFileBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("CONF")) { CFAstConfigurationFileBuff[] subList = readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CASC")) { CFAstAsteriskConfBuff[] subList = schema.getTableAsteriskConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CSIP")) { CFAstSipConfBuff[] subList = schema.getTableSipConf().readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CEXT")) { CFAstExtensionsConfBuff[] subList = schema.getTableExtensionsConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CVOM")) { CFAstVoicemailConfBuff[] subList = schema.getTableVoicemailConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("CECC")) { CFAstExtConfigConfBuff[] subList = schema.getTableExtConfigConf() .readBuffByClusterIdx(Authorization, ClusterId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else { throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName, "Did not expect ClassCode \"" + classCode + "\""); } } int idx = 0; CFAstConfigurationFileBuff[] retBuff = new CFAstConfigurationFileBuff[resultList.size()]; Iterator<CFAstConfigurationFileBuff> iter = resultList.iterator(); while (iter.hasNext()) { retBuff[idx++] = iter.next(); } return (retBuff); }