Example usage for java.util ArrayList listIterator

List of usage examples for java.util ArrayList listIterator

Introduction

In this page you can find the example usage for java.util ArrayList listIterator.

Prototype

public ListIterator<E> listIterator() 

Source Link

Document

Returns a list iterator over the elements in this list (in proper sequence).

Usage

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int32DefTable.java

public MSSBamInt32DefBuff[] readDerivedByEAccSecIdx(MSSBamAuthorization Authorization,
        Short EditAccessSecurityId) {
    final String S_ProcName = "readDerivedByEAccSecIdx";
    if (!schema.isTransactionOpen()) {
        throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName,
                "Transaction not open");
    }/*  w  w  w.  j  av  a2 s  . com*/
    ArrayList<String> classCodeList = new ArrayList<String>();
    String classCode;
    try {
        Connection cnx = schema.getCnx();
        String sql = S_sqlSelectInt32DefDistinctClassCode + "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<MSSBamInt32DefBuff> resultList = new ArrayList<MSSBamInt32DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I32")) {
            MSSBamInt32DefBuff[] subList = readBuffByEAccSecIdx(Authorization, EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI32")) {
            MSSBamTableInt32Buff[] subList = schema.getTableTableInt32().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI32")) {
            MSSBamSchemaInt32Buff[] subList = schema.getTableSchemaInt32().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G32")) {
            MSSBamId32GenDefBuff[] subList = schema.getTableId32GenDef().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG32")) {
            MSSBamTableId32GenBuff[] subList = schema.getTableTableId32Gen().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG32")) {
            MSSBamSchemaId32GenBuff[] subList = schema.getTableSchemaId32Gen()
                    .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 MSSBamInt32DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int64DefTable.java

public MSSBamInt64DefBuff[] readDerivedByVAccSecIdx(MSSBamAuthorization Authorization,
        Short ViewAccessSecurityId) {
    final String S_ProcName = "readDerivedByVAccSecIdx";
    if (!schema.isTransactionOpen()) {
        throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName,
                "Transaction not open");
    }/*from   w  w w . ja  va2  s .  co m*/
    ArrayList<String> classCodeList = new ArrayList<String>();
    String classCode;
    try {
        Connection cnx = schema.getCnx();
        String sql = S_sqlSelectInt64DefDistinctClassCode + "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<MSSBamInt64DefBuff> resultList = new ArrayList<MSSBamInt64DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I64")) {
            MSSBamInt64DefBuff[] subList = readBuffByVAccSecIdx(Authorization, ViewAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI64")) {
            MSSBamTableInt64Buff[] subList = schema.getTableTableInt64().readBuffByVAccSecIdx(Authorization,
                    ViewAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI64")) {
            MSSBamSchemaInt64Buff[] subList = schema.getTableSchemaInt64().readBuffByVAccSecIdx(Authorization,
                    ViewAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G64")) {
            MSSBamId64GenDefBuff[] subList = schema.getTableId64GenDef().readBuffByVAccSecIdx(Authorization,
                    ViewAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG64")) {
            MSSBamTableId64GenBuff[] subList = schema.getTableTableId64Gen().readBuffByVAccSecIdx(Authorization,
                    ViewAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG64")) {
            MSSBamSchemaId64GenBuff[] subList = schema.getTableSchemaId64Gen()
                    .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 MSSBamInt64DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int64DefTable.java

public MSSBamInt64DefBuff[] 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 .ja v  a 2  s  .co m*/
    ArrayList<String> classCodeList = new ArrayList<String>();
    String classCode;
    try {
        Connection cnx = schema.getCnx();
        String sql = S_sqlSelectInt64DefDistinctClassCode + "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<MSSBamInt64DefBuff> resultList = new ArrayList<MSSBamInt64DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I64")) {
            MSSBamInt64DefBuff[] subList = readBuffByEAccSecIdx(Authorization, EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI64")) {
            MSSBamTableInt64Buff[] subList = schema.getTableTableInt64().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI64")) {
            MSSBamSchemaInt64Buff[] subList = schema.getTableSchemaInt64().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G64")) {
            MSSBamId64GenDefBuff[] subList = schema.getTableId64GenDef().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG64")) {
            MSSBamTableId64GenBuff[] subList = schema.getTableTableId64Gen().readBuffByEAccSecIdx(Authorization,
                    EditAccessSecurityId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG64")) {
            MSSBamSchemaId64GenBuff[] subList = schema.getTableSchemaId64Gen()
                    .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 MSSBamInt64DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int32DefTable.java

public MSSBamInt32DefBuff[] readDerivedByVAccFreqIdx(MSSBamAuthorization Authorization,
        Short ViewAccessFrequencyId) {
    final String S_ProcName = "readDerivedByVAccFreqIdx";
    if (!schema.isTransactionOpen()) {
        throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName,
                "Transaction not open");
    }/*  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_sqlSelectInt32DefDistinctClassCode + "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<MSSBamInt32DefBuff> resultList = new ArrayList<MSSBamInt32DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I32")) {
            MSSBamInt32DefBuff[] subList = readBuffByVAccFreqIdx(Authorization, ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI32")) {
            MSSBamTableInt32Buff[] subList = schema.getTableTableInt32().readBuffByVAccFreqIdx(Authorization,
                    ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI32")) {
            MSSBamSchemaInt32Buff[] subList = schema.getTableSchemaInt32().readBuffByVAccFreqIdx(Authorization,
                    ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G32")) {
            MSSBamId32GenDefBuff[] subList = schema.getTableId32GenDef().readBuffByVAccFreqIdx(Authorization,
                    ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG32")) {
            MSSBamTableId32GenBuff[] subList = schema.getTableTableId32Gen()
                    .readBuffByVAccFreqIdx(Authorization, ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG32")) {
            MSSBamSchemaId32GenBuff[] subList = schema.getTableSchemaId32Gen()
                    .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 MSSBamInt32DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int32DefTable.java

public MSSBamInt32DefBuff[] readDerivedByEAccFreqIdx(MSSBamAuthorization Authorization,
        Short EditAccessFrequencyId) {
    final String S_ProcName = "readDerivedByEAccFreqIdx";
    if (!schema.isTransactionOpen()) {
        throw CFLib.getDefaultExceptionFactory().newUsageException(getClass(), S_ProcName,
                "Transaction not open");
    }//from w w  w  . j a  va  2 s  . c  o m
    ArrayList<String> classCodeList = new ArrayList<String>();
    String classCode;
    try {
        Connection cnx = schema.getCnx();
        String sql = S_sqlSelectInt32DefDistinctClassCode + "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<MSSBamInt32DefBuff> resultList = new ArrayList<MSSBamInt32DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I32")) {
            MSSBamInt32DefBuff[] subList = readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI32")) {
            MSSBamTableInt32Buff[] subList = schema.getTableTableInt32().readBuffByEAccFreqIdx(Authorization,
                    EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI32")) {
            MSSBamSchemaInt32Buff[] subList = schema.getTableSchemaInt32().readBuffByEAccFreqIdx(Authorization,
                    EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G32")) {
            MSSBamId32GenDefBuff[] subList = schema.getTableId32GenDef().readBuffByEAccFreqIdx(Authorization,
                    EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG32")) {
            MSSBamTableId32GenBuff[] subList = schema.getTableTableId32Gen()
                    .readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG32")) {
            MSSBamSchemaId32GenBuff[] subList = schema.getTableSchemaId32Gen()
                    .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 MSSBamInt32DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int64DefTable.java

public MSSBamInt64DefBuff[] 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 va 2 s  .  c  o  m
    ArrayList<String> classCodeList = new ArrayList<String>();
    String classCode;
    try {
        Connection cnx = schema.getCnx();
        String sql = S_sqlSelectInt64DefDistinctClassCode + "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<MSSBamInt64DefBuff> resultList = new ArrayList<MSSBamInt64DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I64")) {
            MSSBamInt64DefBuff[] subList = readBuffByVAccFreqIdx(Authorization, ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI64")) {
            MSSBamTableInt64Buff[] subList = schema.getTableTableInt64().readBuffByVAccFreqIdx(Authorization,
                    ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI64")) {
            MSSBamSchemaInt64Buff[] subList = schema.getTableSchemaInt64().readBuffByVAccFreqIdx(Authorization,
                    ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G64")) {
            MSSBamId64GenDefBuff[] subList = schema.getTableId64GenDef().readBuffByVAccFreqIdx(Authorization,
                    ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG64")) {
            MSSBamTableId64GenBuff[] subList = schema.getTableTableId64Gen()
                    .readBuffByVAccFreqIdx(Authorization, ViewAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG64")) {
            MSSBamSchemaId64GenBuff[] subList = schema.getTableSchemaId64Gen()
                    .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 MSSBamInt64DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int64DefTable.java

public MSSBamInt64DefBuff[] readDerivedByEAccFreqIdx(MSSBamAuthorization Authorization,
        Short EditAccessFrequencyId) {
    final String S_ProcName = "readDerivedByEAccFreqIdx";
    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;
    try {
        Connection cnx = schema.getCnx();
        String sql = S_sqlSelectInt64DefDistinctClassCode + "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<MSSBamInt64DefBuff> resultList = new ArrayList<MSSBamInt64DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I64")) {
            MSSBamInt64DefBuff[] subList = readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI64")) {
            MSSBamTableInt64Buff[] subList = schema.getTableTableInt64().readBuffByEAccFreqIdx(Authorization,
                    EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI64")) {
            MSSBamSchemaInt64Buff[] subList = schema.getTableSchemaInt64().readBuffByEAccFreqIdx(Authorization,
                    EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G64")) {
            MSSBamId64GenDefBuff[] subList = schema.getTableId64GenDef().readBuffByEAccFreqIdx(Authorization,
                    EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG64")) {
            MSSBamTableId64GenBuff[] subList = schema.getTableTableId64Gen()
                    .readBuffByEAccFreqIdx(Authorization, EditAccessFrequencyId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG64")) {
            MSSBamSchemaId64GenBuff[] subList = schema.getTableSchemaId64Gen()
                    .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 MSSBamInt64DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int32DefTable.java

public MSSBamInt32DefBuff[] readDerivedByContPrevIdx(MSSBamAuthorization Authorization, long ValueContainerId,
        Long PrevId) {// ww w .ja  v  a2 s .c  o m
    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_sqlSelectInt32DefDistinctClassCode + "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<MSSBamInt32DefBuff> resultList = new ArrayList<MSSBamInt32DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I32")) {
            MSSBamInt32DefBuff[] subList = readBuffByContPrevIdx(Authorization, ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI32")) {
            MSSBamTableInt32Buff[] subList = schema.getTableTableInt32().readBuffByContPrevIdx(Authorization,
                    ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI32")) {
            MSSBamSchemaInt32Buff[] subList = schema.getTableSchemaInt32().readBuffByContPrevIdx(Authorization,
                    ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G32")) {
            MSSBamId32GenDefBuff[] subList = schema.getTableId32GenDef().readBuffByContPrevIdx(Authorization,
                    ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG32")) {
            MSSBamTableId32GenBuff[] subList = schema.getTableTableId32Gen()
                    .readBuffByContPrevIdx(Authorization, ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG32")) {
            MSSBamSchemaId32GenBuff[] subList = schema.getTableSchemaId32Gen()
                    .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 MSSBamInt32DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int32DefTable.java

public MSSBamInt32DefBuff[] readDerivedByContNextIdx(MSSBamAuthorization Authorization, long ValueContainerId,
        Long NextId) {//from ww  w .  j a va2  s.  com
    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_sqlSelectInt32DefDistinctClassCode + "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<MSSBamInt32DefBuff> resultList = new ArrayList<MSSBamInt32DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I32")) {
            MSSBamInt32DefBuff[] subList = readBuffByContNextIdx(Authorization, ValueContainerId, NextId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI32")) {
            MSSBamTableInt32Buff[] subList = schema.getTableTableInt32().readBuffByContNextIdx(Authorization,
                    ValueContainerId, NextId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI32")) {
            MSSBamSchemaInt32Buff[] subList = schema.getTableSchemaInt32().readBuffByContNextIdx(Authorization,
                    ValueContainerId, NextId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G32")) {
            MSSBamId32GenDefBuff[] subList = schema.getTableId32GenDef().readBuffByContNextIdx(Authorization,
                    ValueContainerId, NextId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG32")) {
            MSSBamTableId32GenBuff[] subList = schema.getTableTableId32Gen()
                    .readBuffByContNextIdx(Authorization, ValueContainerId, NextId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG32")) {
            MSSBamSchemaId32GenBuff[] subList = schema.getTableSchemaId32Gen()
                    .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 MSSBamInt32DefBuff[0]));

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamPg8.MSSBamPg8Int64DefTable.java

public MSSBamInt64DefBuff[] readDerivedByContPrevIdx(MSSBamAuthorization Authorization, long ValueContainerId,
        Long PrevId) {/*  w w  w.  j av a 2 s.c  o m*/
    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_sqlSelectInt64DefDistinctClassCode + "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<MSSBamInt64DefBuff> resultList = new ArrayList<MSSBamInt64DefBuff>();
    ListIterator<String> classCodeIter = classCodeList.listIterator();
    while (classCodeIter.hasNext()) {
        classCode = classCodeIter.next();
        if (classCode.equals("I64")) {
            MSSBamInt64DefBuff[] subList = readBuffByContPrevIdx(Authorization, ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TI64")) {
            MSSBamTableInt64Buff[] subList = schema.getTableTableInt64().readBuffByContPrevIdx(Authorization,
                    ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SI64")) {
            MSSBamSchemaInt64Buff[] subList = schema.getTableSchemaInt64().readBuffByContPrevIdx(Authorization,
                    ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("G64")) {
            MSSBamId64GenDefBuff[] subList = schema.getTableId64GenDef().readBuffByContPrevIdx(Authorization,
                    ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("TG64")) {
            MSSBamTableId64GenBuff[] subList = schema.getTableTableId64Gen()
                    .readBuffByContPrevIdx(Authorization, ValueContainerId, PrevId);
            for (int subListIdx = 0; subListIdx < subList.length; subListIdx++) {
                resultList.add(subList[subListIdx]);
            }
        } else if (classCode.equals("SG64")) {
            MSSBamSchemaId64GenBuff[] subList = schema.getTableSchemaId64Gen()
                    .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 MSSBamInt64DefBuff[0]));

}