Example usage for org.springframework.jdbc.core JdbcTemplate JdbcTemplate

List of usage examples for org.springframework.jdbc.core JdbcTemplate JdbcTemplate

Introduction

In this page you can find the example usage for org.springframework.jdbc.core JdbcTemplate JdbcTemplate.

Prototype

public JdbcTemplate(DataSource dataSource) 

Source Link

Document

Construct a new JdbcTemplate, given a DataSource to obtain connections from.

Usage

From source file:com.beezas.dao.ContactDaoImpl.java

public List<Contact> getContactList() {
    List entireNam = new ArrayList();
    String sql = "SELECT * FROM CONTACT";
    jdbcTemplate = new JdbcTemplate(dataSource);
    entireNam = jdbcTemplate.query(sql, new ContactRowMapper());
    System.out.println("Present in DaomImpl mottam contact" + entireNam);
    return entireNam;
}

From source file:org.cleverbus.test.AbstractDbTest.java

/**
 * Gets {@link JdbcTemplate} for test DB.
 *
 * @return JdbcTemplate//www  . ja  v  a 2s.  c o  m
 */
protected JdbcTemplate getJdbcTemplate() {
    if (jdbcTemplate == null) {
        jdbcTemplate = new JdbcTemplate(dataSource);
    }

    return jdbcTemplate;
}

From source file:com.dai.dao.SelecaoTreinoDaoImpl.java

@Override
public void jogadorFaltou(int idUtilizador, int idTreino) {

    String sql = "update selecaoTreino set presenca = 0 where utilizador_idUtilizador_st =" + idUtilizador
            + " and treino_idtreino = " + idTreino;
    JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
    jdbcTemplate.update(sql);/*from   www  .  j av  a  2s  .co m*/

}

From source file:com.sinet.gage.dao.DomainsRepository.java

/**
 * @param dataSource//from  www  .  ja  v a 2 s.c om
 */
@Autowired
public void setDataSource(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
}

From source file:egovframework.rte.fdl.idgnr.impl.EgovTableIdGnrService.java

@Override
public void setDataSource(DataSource dataSource) {
    super.setDataSource(dataSource);

    this.jdbcTemplate = new JdbcTemplate(dataSource);
}