Package fi.luomus.commons.db.connectivity

Examples of fi.luomus.commons.db.connectivity.TransactionConnection


        dao.addDocumentToQueue(feedEntry);
        dao.close();
    }

    private List<SavedDocument> getFiles() throws Exception {
        TransactionConnection con = new PreparedStatementStoringAndClosingTransactionConnection(description);
        PreparedStatement query = con.prepareStatement("SELECT * FROM ETL.XMLFile");
        ResultSet rs = query.executeQuery();

        List<SavedDocument> savedDocuments = new ArrayList<SavedDocument>();
        while (rs.next()) {
            savedDocuments.add(new SavedDocument(rs.getString("DocumentID"),
                    rs.getString("XMLData"), rs.getInt("SourceFK")));
        }

        query.close();
        rs.close();
        con.release();

        return savedDocuments;
    }
View Full Code Here


        return savedDocuments;
    }

    private void resetDbs() throws SQLException {
        TransactionConnection con = new PreparedStatementStoringAndClosingTransactionConnection(description);
        con.prepareStatement("DELETE FROM ETL.XMLQueue").execute();
        con.prepareStatement("DELETE FROM ETL.XMLFile").execute();
        con.prepareStatement("DELETE FROM ETL.XMLSequence").execute();
        con.release();
    }
View Full Code Here

TOP

Related Classes of fi.luomus.commons.db.connectivity.TransactionConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.