Package org.springframework.jdbc.core

Examples of org.springframework.jdbc.core.JdbcTemplate


  }

  // Spring setters
 
  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
  }
View Full Code Here


  }

  // Spring setters

  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
  }
View Full Code Here

  }

  // Spring setters
 
  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
  }
View Full Code Here

  }

  // Spring setters
 
  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
  }
View Full Code Here

  }

  // Spring setters

  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
  }
View Full Code Here

   * @param functionName  Name of function
   * @param functionBody  Body of function
   * @throws ApplicationException On failure
   */
  public static void loadFunction(JdbcTemplateDao dao, PostgreSQLFunction dbFunction) throws ApplicationException {
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();

    // initialize drop procedure, if database has been dropped
    jdbcTemplate.execute(new ResourceUtil(DROP_FUNCTION.getURI()).getContent());

    // drop previous function version, if necessary
    jdbcTemplate.queryForInt("select util.drop_function( ?,? )",
        dbFunction.getSchema(), dbFunction.getFunctionName());

    // load new function body
    jdbcTemplate.execute(new ResourceUtil(dbFunction.getURI()).getContent());
  }
View Full Code Here

      loadFunction(dao, dbFunction);
    }
  }
 
  public static void truncateTables(JdbcTemplateDao dao) throws ApplicationException {
    JdbcTemplate jdbcTemplate = dao.getJdbcTemplate();
    jdbcTemplate.execute("truncate music.artist cascade");
    jdbcTemplate.execute("truncate library.directory cascade");
    jdbcTemplate.execute("truncate music.tag cascade");
    jdbcTemplate.execute("truncate music.lastfmuser cascade");
   
    /*
     * If we really wanted to truncate all tables, we could do:
     * loadFunction(dao, PostgreSQLFunction.TRUNCATE_ALL_TABLES);
     * jdbcTemplate.execute("select util.truncate_all_tables()");
View Full Code Here

  }

  // Spring setters

  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
  }
View Full Code Here

  }

  // Spring setters
 
  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
  }
View Full Code Here

  }
 
  // Spring setters
 
  public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
    parseJDBCURL();
  }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.core.JdbcTemplate

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.