Package org.apache.ibatis.session

Examples of org.apache.ibatis.session.Configuration.addMapper()


  @Test(expected = BuilderException.class)
  public void testFailFastOnBuildAll() throws Exception {
    Configuration configuration = new Configuration();
    try {
      configuration.addMapper(InvalidMapper.class);
    } catch (Exception e) {
      fail("No exception should be thrown before parsing statement nodes.");
    }
    configuration.getMappedStatementNames();
  }
View Full Code Here


 
  @Test(expected = BuilderException.class)
  public void testFailFastOnBuildAllWithInsert() throws Exception {
    Configuration configuration = new Configuration();
    try {
      configuration.addMapper(InvalidWithInsertMapper.class);
      configuration.addMapper(InvalidMapper.class);
    } catch (Exception e) {
      fail("No exception should be thrown before parsing statement nodes.");
    }
    configuration.getMappedStatementNames();
View Full Code Here

  @Test(expected = BuilderException.class)
  public void testFailFastOnBuildAllWithInsert() throws Exception {
    Configuration configuration = new Configuration();
    try {
      configuration.addMapper(InvalidWithInsertMapper.class);
      configuration.addMapper(InvalidMapper.class);
    } catch (Exception e) {
      fail("No exception should be thrown before parsing statement nodes.");
    }
    configuration.getMappedStatementNames();
  }
View Full Code Here

    Configuration configuration = new Configuration();
    Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(
        "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
    configuration.setEnvironment(environment);

    configuration.addMapper(PersonMapper.class);
    configuration.addMapper(PetMapper.class);

    return new SqlSessionFactoryBuilder().build(configuration);
  }
View Full Code Here

    Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(
        "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
    configuration.setEnvironment(environment);

    configuration.addMapper(PersonMapper.class);
    configuration.addMapper(PetMapper.class);

    return new SqlSessionFactoryBuilder().build(configuration);
  }

  private static void initDb(Connection conn) throws IOException, SQLException {
View Full Code Here

    Configuration configuration = new Configuration();
    Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(
        "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
    configuration.setEnvironment(environment);

    configuration.addMapper(ResultMapReferencePersonMapper.class);
    configuration.addMapper(ResultMapReferencePetMapper.class);

    return new SqlSessionFactoryBuilder().build(configuration);
  }
View Full Code Here

    Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(
        "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
    configuration.setEnvironment(environment);

    configuration.addMapper(ResultMapReferencePersonMapper.class);
    configuration.addMapper(ResultMapReferencePetMapper.class);

    return new SqlSessionFactoryBuilder().build(configuration);
  }

  private static void initDb(Connection conn) throws IOException, SQLException {
View Full Code Here

    Configuration configuration = new Configuration();
    Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(
        "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
    configuration.setEnvironment(environment);

    configuration.addMapper(SameIdPersonMapper.class);
    configuration.addMapper(SameIdPetMapper.class);

    return new SqlSessionFactoryBuilder().build(configuration);
  }
View Full Code Here

    Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(
        "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
    configuration.setEnvironment(environment);

    configuration.addMapper(SameIdPersonMapper.class);
    configuration.addMapper(SameIdPetMapper.class);

    return new SqlSessionFactoryBuilder().build(configuration);
  }

  private static void initDb(Connection conn) throws IOException, SQLException {
View Full Code Here

    Configuration configuration = new Configuration();
    Environment environment = new Environment("development", new JdbcTransactionFactory(), new UnpooledDataSource(
        "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:xmlextref", null));
    configuration.setEnvironment(environment);

    configuration.addMapper(ParameterMapReferencePersonMapper.class);
    configuration.addMapper(ParameterMapReferencePetMapper.class);

    return new SqlSessionFactoryBuilder().build(configuration);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.