List of usage examples for java.util ArrayList listIterator
public ListIterator<E> listIterator()
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8TokenDefTable.java
public MSSBamTokenDefBuff[] readDerivedByEAccFreqIdx(MSSBamAuthorization Authorization, Short EditAccessFrequencyId) { final String S_ProcName = "readDerivedByEAccFreqIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }//w w w . j a v a2 s.c om ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectTokenDefDistinctClassCode + "WHERE " + ((EditAccessFrequencyId == null) ? "val.EditAccessFrequencyId is null " : "val.EditAccessFrequencyId = " + EditAccessFrequencyId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamTokenDefBuff> resultList = new ArrayList<MSSBamTokenDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("TKN")) { MSSBamTokenDefBuff[] subList = readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTOK")) { MSSBamTableTokenBuff[] subList = schema.getTableTableToken().readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STOK")) { MSSBamSchemaTokenBuff[] subList = schema.getTableSchemaToken().readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId); 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 + "\""); } } return (resultList.toArray(new MSSBamTokenDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8NumberDefTable.java
public MSSBamNumberDefBuff[] readDerivedByDataScopeIdx(MSSBamAuthorization Authorization, Short DataScopeId) { final String S_ProcName = "readDerivedByDataScopeIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from w ww . j a v a 2 s. c om*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectNumberDefDistinctClassCode + "WHERE " + ((DataScopeId == null) ? "val.DataScopeId is null " : "val.DataScopeId = " + DataScopeId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamNumberDefBuff> resultList = new ArrayList<MSSBamNumberDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("NUM")) { MSSBamNumberDefBuff[] subList = readBuffByDataScopeIdx(Authorization, DataScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TNUM")) { MSSBamTableNumberBuff[] subList = schema.getTableTableNumber().readBuffByDataScopeIdx(Authorization, DataScopeId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SNUM")) { MSSBamSchemaNumberBuff[] subList = schema.getTableSchemaNumber() .readBuffByDataScopeIdx(Authorization, DataScopeId); 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 + "\""); } } return (resultList.toArray(new MSSBamNumberDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8TextDefTable.java
public MSSBamTextDefBuff[] readDerivedByContPrevIdx(MSSBamAuthorization Authorization, long ValueContainerId, Long PrevId) {//from ww w.j av a2s . c om final String S_ProcName = "readDerivedByContPrevIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); } ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectTextDefDistinctClassCode + "WHERE " + "val.ValueContainerId = " + Long.toString(ValueContainerId) + " " + "AND " + ((PrevId == null) ? "val.PrevId is null " : "val.PrevId = " + PrevId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamTextDefBuff> resultList = new ArrayList<MSSBamTextDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("TXT")) { MSSBamTextDefBuff[] subList = readBuffByContPrevIdx(Authorization, ValueContainerId, PrevId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTXT")) { MSSBamTableTextBuff[] subList = schema.getTableTableText().readBuffByContPrevIdx(Authorization, ValueContainerId, PrevId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STXT")) { MSSBamSchemaTextBuff[] subList = schema.getTableSchemaText().readBuffByContPrevIdx(Authorization, ValueContainerId, PrevId); 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 + "\""); } } return (resultList.toArray(new MSSBamTextDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8TextDefTable.java
public MSSBamTextDefBuff[] readDerivedByContNextIdx(MSSBamAuthorization Authorization, long ValueContainerId, Long NextId) {// w ww .j a v a 2 s.co m final String S_ProcName = "readDerivedByContNextIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); } ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectTextDefDistinctClassCode + "WHERE " + "val.ValueContainerId = " + Long.toString(ValueContainerId) + " " + "AND " + ((NextId == null) ? "val.NextId is null " : "val.NextId = " + NextId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamTextDefBuff> resultList = new ArrayList<MSSBamTextDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("TXT")) { MSSBamTextDefBuff[] subList = readBuffByContNextIdx(Authorization, ValueContainerId, NextId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTXT")) { MSSBamTableTextBuff[] subList = schema.getTableTableText().readBuffByContNextIdx(Authorization, ValueContainerId, NextId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STXT")) { MSSBamSchemaTextBuff[] subList = schema.getTableSchemaText().readBuffByContNextIdx(Authorization, ValueContainerId, NextId); 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 + "\""); } } return (resultList.toArray(new MSSBamTextDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8TimestampDefTable.java
public MSSBamTimestampDefBuff[] readDerivedByAuthorIdx(MSSBamAuthorization Authorization, Long AuthorId) { final String S_ProcName = "readDerivedByAuthorIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }// w ww .ja v a 2s . com ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectTimestampDefDistinctClassCode + "WHERE " + ((AuthorId == null) ? "anyo.AuthorId is null " : "anyo.AuthorId = " + AuthorId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamTimestampDefBuff> resultList = new ArrayList<MSSBamTimestampDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("TSP")) { MSSBamTimestampDefBuff[] subList = readBuffByAuthorIdx(Authorization, AuthorId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TTSM")) { MSSBamTableTimestampBuff[] subList = schema.getTableTableTimestamp() .readBuffByAuthorIdx(Authorization, AuthorId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("STSM")) { MSSBamSchemaTimestampBuff[] subList = schema.getTableSchemaTimestamp() .readBuffByAuthorIdx(Authorization, AuthorId); 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 + "\""); } } return (resultList.toArray(new MSSBamTimestampDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8NmTokenDefTable.java
public MSSBamNmTokenDefBuff[] readDerivedByVAccSecIdx(MSSBamAuthorization Authorization, Short ViewAccessSecurityId) { final String S_ProcName = "readDerivedByVAccSecIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/*from ww w . jav a2 s .c o m*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectNmTokenDefDistinctClassCode + "WHERE " + ((ViewAccessSecurityId == null) ? "val.ViewAccessSecurityId is null " : "val.ViewAccessSecurityId = " + ViewAccessSecurityId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamNmTokenDefBuff> resultList = new ArrayList<MSSBamNmTokenDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("NMT")) { MSSBamNmTokenDefBuff[] subList = readBuffByVAccSecIdx(Authorization, ViewAccessSecurityId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TNTK")) { MSSBamTableNmTokenBuff[] subList = schema.getTableTableNmToken().readBuffByVAccSecIdx(Authorization, ViewAccessSecurityId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SNTK")) { MSSBamSchemaNmTokenBuff[] subList = schema.getTableSchemaNmToken() .readBuffByVAccSecIdx(Authorization, ViewAccessSecurityId); 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 + "\""); } } return (resultList.toArray(new MSSBamNmTokenDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8NmTokenDefTable.java
public MSSBamNmTokenDefBuff[] readDerivedByEAccSecIdx(MSSBamAuthorization Authorization, Short EditAccessSecurityId) { final String S_ProcName = "readDerivedByEAccSecIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }// ww w .j a va 2s . co m ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectNmTokenDefDistinctClassCode + "WHERE " + ((EditAccessSecurityId == null) ? "val.EditAccessSecurityId is null " : "val.EditAccessSecurityId = " + EditAccessSecurityId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamNmTokenDefBuff> resultList = new ArrayList<MSSBamNmTokenDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("NMT")) { MSSBamNmTokenDefBuff[] subList = readBuffByEAccSecIdx(Authorization, EditAccessSecurityId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TNTK")) { MSSBamTableNmTokenBuff[] subList = schema.getTableTableNmToken().readBuffByEAccSecIdx(Authorization, EditAccessSecurityId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SNTK")) { MSSBamSchemaNmTokenBuff[] subList = schema.getTableSchemaNmToken() .readBuffByEAccSecIdx(Authorization, EditAccessSecurityId); 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 + "\""); } } return (resultList.toArray(new MSSBamNmTokenDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8StringDefTable.java
public MSSBamStringDefBuff[] readDerivedByVAccFreqIdx(MSSBamAuthorization Authorization, Short ViewAccessFrequencyId) { final String S_ProcName = "readDerivedByVAccFreqIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }//from w w w .j a v a2 s . c o m ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectStringDefDistinctClassCode + "WHERE " + ((ViewAccessFrequencyId == null) ? "val.ViewAccessFrequencyId is null " : "val.ViewAccessFrequencyId = " + ViewAccessFrequencyId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamStringDefBuff> resultList = new ArrayList<MSSBamStringDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("STR")) { MSSBamStringDefBuff[] subList = readBuffByVAccFreqIdx(Authorization, ViewAccessFrequencyId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TSTR")) { MSSBamTableStringBuff[] subList = schema.getTableTableString().readBuffByVAccFreqIdx(Authorization, ViewAccessFrequencyId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SSTR")) { MSSBamSchemaStringBuff[] subList = schema.getTableSchemaString() .readBuffByVAccFreqIdx(Authorization, ViewAccessFrequencyId); 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 + "\""); } } return (resultList.toArray(new MSSBamStringDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8StringDefTable.java
public MSSBamStringDefBuff[] readDerivedByEAccFreqIdx(MSSBamAuthorization Authorization, Short EditAccessFrequencyId) { final String S_ProcName = "readDerivedByEAccFreqIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }/* ww w.j a v a2s . c o m*/ ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectStringDefDistinctClassCode + "WHERE " + ((EditAccessFrequencyId == null) ? "val.EditAccessFrequencyId is null " : "val.EditAccessFrequencyId = " + EditAccessFrequencyId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamStringDefBuff> resultList = new ArrayList<MSSBamStringDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("STR")) { MSSBamStringDefBuff[] subList = readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TSTR")) { MSSBamTableStringBuff[] subList = schema.getTableTableString().readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SSTR")) { MSSBamSchemaStringBuff[] subList = schema.getTableSchemaString() .readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId); 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 + "\""); } } return (resultList.toArray(new MSSBamStringDefBuff[0])); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8BlobDefTable.java
public MSSBamBlobDefBuff[] readDerivedByVAccSecIdx(MSSBamAuthorization Authorization, Short ViewAccessSecurityId) { final String S_ProcName = "readDerivedByVAccSecIdx"; if (!schema.isTransactionOpen()) { throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName, "Transaction not open"); }// w w w .ja v a 2s . c o m ArrayList<String> classCodeList = new ArrayList<String>(); String classCode; try { Connection cnx = schema.getCnx(); String sql = S_sqlSelectBlobDefDistinctClassCode + "WHERE " + ((ViewAccessSecurityId == null) ? "val.ViewAccessSecurityId is null " : "val.ViewAccessSecurityId = " + ViewAccessSecurityId.toString() + " "); Statement stmt = cnx.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); ResultSet resultSet = stmt.executeQuery(sql); while (resultSet.next()) { classCode = resultSet.getString(1); classCodeList.add(classCode); } } catch (SQLException e) { throw CFLib.getDefaultExceptionFactory().newDbException(getClass(), S_ProcName, e); } ArrayList<MSSBamBlobDefBuff> resultList = new ArrayList<MSSBamBlobDefBuff>(); ListIterator<String> classCodeIter = classCodeList.listIterator(); while (classCodeIter.hasNext()) { classCode = classCodeIter.next(); if (classCode.equals("BLB")) { MSSBamBlobDefBuff[] subList = readBuffByVAccSecIdx(Authorization, ViewAccessSecurityId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("TBLB")) { MSSBamTableBlobBuff[] subList = schema.getTableTableBlob().readBuffByVAccSecIdx(Authorization, ViewAccessSecurityId); for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) { resultList.add(subList[subListIdx]); } } else if (classCode.equals("SBLB")) { MSSBamSchemaBlobBuff[] subList = schema.getTableSchemaBlob().readBuffByVAccSecIdx(Authorization, ViewAccessSecurityId); 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 + "\""); } } return (resultList.toArray(new MSSBamBlobDefBuff[0])); }