Spring Framework AbstractDriverBasedDataSource - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AbstractDriverBasedDataSource class.

This code example shows how to use the following methods:getConnection
    private Statement getStatement() throws SQLException {
        return getConnection().createStatement();
    } 
 
    private Connection getConnection() throws SQLException {
        connection = dataSource.getConnection();
        return connection;
    } 
 
    public void insertDecliningPrincipalBalanceInterestType() throws SQLException {
        getStatement().execute("insert into lookup_value(lookup_id,entity_id,lookup_name) values((select max(lv.lookup_id)+1 from lookup_value lv), 37, 'InterestTypes-DecliningPrincipalBalance');");
        getStatement().execute("insert into interest_types (interest_type_id, lookup_id, category_id, descripton) values(5,(select lookup_id from lookup_value where entity_id =37 and lookup_name='InterestTypes-DecliningPrincipalBalance'),1,'InterestTypes-DecliningPrincipalBalance');");
        closeConnection(); 
    } 
 
    public boolean deosQuestionResponseForLoanExist(String loanID, String event, String question, String response) throws SQLException {
        return doesEntityExist("SELECT count(*) FROM question_group_response as qqr, sections_questions as sq, questions as q WHERE qqr.response = \""+response+"\" AND qqr.sections_questions_id = sq.id AND sq.question_id = q.question_id AND q.question_text = \""+question+"\""
                +" AND qqr.question_group_instance_id in (" 
                    +"SELECT qqi.id FROM question_group_instance as qqi, account as a WHERE qqi.entity_id = a.account_id AND a.global_account_num = \""+loanID+"\""
                    +" AND qqi.event_source_id = (" 
4
CodeRank
This code example shows how to use the following methods:getUrl
    protected void assertServiceConfiguration(AbstractDriverBasedDataSource dataSource) {
        assertConfiguration(dataSource, SERVICE_INFO.getJdbcUrl());
    } 
 
    private void assertConfiguration(AbstractDriverBasedDataSource dataSource, String url) {
        assertEquals(url, dataSource.getUrl());
    } 
 
} 
4
CodeRank
This code example shows how to use the following methods:getConnection
    } 
 
    public void dumpDatabase(String fileName, DriverManagerDataSource dataSource) throws SQLException, FileNotFoundException, DatabaseUnitException, IOException {
        Connection jdbcConnection = null;
        try { 
            jdbcConnection = dataSource.getConnection();
            this.dumpDatabase(fileName, jdbcConnection);
        } finally { 
            jdbcConnection.close();
        } 
    } 
 
    public void dumpDatabase(String fileName, Connection jdbcConnection) throws SQLException, DatabaseUnitException, FileNotFoundException, IOException {
        IDatabaseConnection connection = new DatabaseConnection(jdbcConnection);
        IDataSet fullDataSet = connection.createDataSet();
        FlatXmlDataSet.write(fullDataSet, new FileOutputStream(fileName));
    } 
 
    public void dumpDatabaseToTimestampedFileInConfigurationDirectory(DriverManagerDataSource dataSource) throws FileNotFoundException, SQLException, DatabaseUnitException, IOException {
        String configurationDirectory = new ConfigurationLocator().getConfigurationDirectory();
4
CodeRank
This code example shows how to use the following methods:getUrl
    protected void assertServiceConfiguration(AbstractDriverBasedDataSource dataSource) {
        assertConfiguration(dataSource, SERVICE_INFO.getJdbcUrl());
    } 
 
    private void assertConfiguration(AbstractDriverBasedDataSource dataSource, String url) {
        assertEquals(url, dataSource.getUrl());
    } 
 
} 
4
CodeRank
See Code Examples for Spring Framework AbstractDriverBasedDataSource Methods: