Package org.springframework.jdbc.core.simple

Examples of org.springframework.jdbc.core.simple.SimpleJdbcTemplate


        documentId);
  }

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


    return query;
  }

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

    return sparseData;
  }

  public void setDataSource(DataSource ds) {
    this.jdbcTemplate = new JdbcTemplate(ds);
    this.simpleJdbcTemplate = new SimpleJdbcTemplate(ds);
    this.namedJdbcTemplate = new NamedParameterJdbcTemplate(ds);
  }
View Full Code Here

    super();
  }

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

    return dataSource;
  }

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

     *
     * @throws Exception JUnit3 signature for compatibility.
     */
    @Before
    public void setUp() throws Exception {
        setJdbcTemplate(new SimpleJdbcTemplate((DataSource) applicationContext.getBean("dataSource")));

        SimpleJdbcTestUtils.executeSqlScript(getJdbcTemplate(), new ClassPathResource(
                "/test/config/CreateSchema.sql"), false);
        SimpleJdbcTestUtils.executeSqlScript(getJdbcTemplate(), new ClassPathResource(
                "/test/config/CreateData.sql"), false);
View Full Code Here

        }
    };

    @Autowired
    public CompanyDAO(DataSource dataSource, IIndustryDAO industryDAO) {
        this.template = new SimpleJdbcTemplate(dataSource);
        this.insertCompany = new SimpleJdbcInsert(dataSource).withTableName("COMPANY").usingGeneratedKeyColumns("ID");
        this.industryDAO = industryDAO;
    }
View Full Code Here

        return this.template.query("SELECT * FROM industry WHERE UPPER(name) LIKE ? ORDER BY name", this.rowMapper, "%" + name.toUpperCase() + "%");
    }

    @Autowired
    public IndustryDAO(DataSource dataSource) {
        this.template = new SimpleJdbcTemplate(dataSource);
        this.insertIndustry = new SimpleJdbcInsert(dataSource).withTableName("INDUSTRY").usingGeneratedKeyColumns("ID");
    }
View Full Code Here

            return contact;
        }
    };

    public ContactDAO(DataSource dataSource) {
        this.template = new SimpleJdbcTemplate(dataSource);
        this.insertContact = new SimpleJdbcInsert(dataSource).withTableName("CONTACT").usingGeneratedKeyColumns("ID");
    }
View Full Code Here

        if (title.startsWith("Donkey")) {
            throw new IllegalArgumentException("We don't have Donkeys, only Camels");
        }

        // create new local datasource to store in DB
        new SimpleJdbcTemplate(dataSource).update("insert into books (title) values (?)", title);

        template.sendBody(title);
    }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.core.simple.SimpleJdbcTemplate

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.