Package com.nurkiewicz.jdbcrepository.sql

Examples of com.nurkiewicz.jdbcrepository.sql.SqlGenerator


    final JdbcDataSource dataSource = new JdbcDataSource();
    dataSource.setURL(JDBC_URL);

    final UserRepository userRepository = new UserRepository("users");
    userRepository.setDataSource(dataSource);
    userRepository.setSqlGenerator(new SqlGenerator())//optional

    //when
    final List<User> list = userRepository.findAll();

    //then
View Full Code Here


    final JdbcDataSource dataSource = new JdbcDataSource();
    dataSource.setURL(JDBC_URL);

    final UserRepository userRepository = new UserRepository("users");
    userRepository.setDataSource(dataSource);
    userRepository.setSqlGenerator(new SqlGenerator());

    //and
    final TransactionOperations tx = new TransactionTemplate(
        new DataSourceTransactionManager(dataSource));
View Full Code Here

  private void obtainSqlGenerator() {
    try {
      sqlGenerator = beanFactory.getBean(SqlGenerator.class);
    } catch (NoSuchBeanDefinitionException e) {
      sqlGenerator = new SqlGenerator();
    }
  }
View Full Code Here

TOP

Related Classes of com.nurkiewicz.jdbcrepository.sql.SqlGenerator

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.