tk.mybatis.mapper.mapperhelper.MapperHelper Java Examples
The following examples show how to use
tk.mybatis.mapper.mapperhelper.MapperHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Configuration.java From Mapper with MIT License | 5 votes |
@Override public void addMappedStatement(MappedStatement ms) { try { super.addMappedStatement(ms); //没有任何配置时,使用默认配置 if (this.mapperHelper == null) { this.mapperHelper = new MapperHelper(); } this.mapperHelper.processMappedStatement(ms); } catch (IllegalArgumentException e) { //这里的异常是导致 Spring 启动死循环的关键位置,为了避免后续会吞异常,这里直接输出 e.printStackTrace(); throw new RuntimeException(e); } }
Example #2
Source File: Configuration.java From Mapper with MIT License | 5 votes |
/** * 使用属性方式配置 * * @param properties */ public void setMapperProperties(Properties properties) { if (this.mapperHelper == null) { this.mapperHelper = new MapperHelper(); } this.mapperHelper.setProperties(properties); }
Example #3
Source File: BaseTest.java From Mapper with MIT License | 5 votes |
/** * 配置通用 Mapper */ protected void configMapperHelper(){ SqlSession session = getSqlSession(); try { //创建一个MapperHelper MapperHelper mapperHelper = new MapperHelper(); //设置配置 mapperHelper.setConfig(getConfig()); //配置完成后,执行下面的操作 mapperHelper.processConfiguration(session.getConfiguration()); } finally { session.close(); } }
Example #4
Source File: BaseTest.java From Mapper with MIT License | 5 votes |
/** * 配置通用 Mapper */ protected void configMapperHelper(){ SqlSession session = getSqlSession(); try { //创建一个MapperHelper MapperHelper mapperHelper = new MapperHelper(); //设置配置 mapperHelper.setConfig(getConfig()); //配置完成后,执行下面的操作 mapperHelper.processConfiguration(session.getConfiguration()); } finally { session.close(); } }
Example #5
Source File: SpringAnnotationTest.java From Mapper with MIT License | 5 votes |
@Bean public SqlSessionFactory sqlSessionFactory() throws Exception { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); sessionFactory.setDataSource(dataSource()); tk.mybatis.mapper.session.Configuration configuration = new tk.mybatis.mapper.session.Configuration(); configuration.setMapperHelper(new MapperHelper()); sessionFactory.setConfiguration(configuration); return sessionFactory.getObject(); }
Example #6
Source File: SelectPropertyProvider.java From Mapper with MIT License | 4 votes |
public SelectPropertyProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #7
Source File: CountMapperProvider.java From BlogManagePlatform with Apache License 2.0 | 4 votes |
public CountMapperProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #8
Source File: IdsProvider.java From Mapper with MIT License | 4 votes |
public IdsProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #9
Source File: ConditionProvider.java From Mapper with MIT License | 4 votes |
public ConditionProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); exampleProvider = new ExampleProvider(mapperClass, mapperHelper); }
Example #10
Source File: ExampleProvider.java From Mapper with MIT License | 4 votes |
public ExampleProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #11
Source File: HsqldbProvider.java From Mapper with MIT License | 4 votes |
public HsqldbProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #12
Source File: MapperScannerConfigurer.java From Mapper with MIT License | 4 votes |
public MapperHelper getMapperHelper() { return mapperHelper; }
Example #13
Source File: MapperScannerConfigurer.java From Mapper with MIT License | 4 votes |
public void setMapperHelper(MapperHelper mapperHelper) { this.mapperHelper = mapperHelper; }
Example #14
Source File: ClassPathMapperScanner.java From Mapper with MIT License | 4 votes |
public MapperHelper getMapperHelper() { return mapperHelper; }
Example #15
Source File: ClassPathMapperScanner.java From Mapper with MIT License | 4 votes |
public void setMapperHelper(MapperHelper mapperHelper) { this.mapperHelper = mapperHelper; }
Example #16
Source File: AggregationProvider.java From Mapper with MIT License | 4 votes |
public AggregationProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #17
Source File: SpecialProvider.java From Mapper with MIT License | 4 votes |
public SpecialProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #18
Source File: InsertListProvider.java From Mapper with MIT License | 4 votes |
public InsertListProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #19
Source File: UpdateByDifferProvider.java From Mapper with MIT License | 4 votes |
public UpdateByDifferProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #20
Source File: UpdateByPrimaryKeySelectiveForceProvider.java From Mapper with MIT License | 4 votes |
public UpdateByPrimaryKeySelectiveForceProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #21
Source File: OracleProvider.java From Mapper with MIT License | 4 votes |
public OracleProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #22
Source File: IdListProvider.java From Mapper with MIT License | 4 votes |
public IdListProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #23
Source File: EmptyProvider.java From Mapper with MIT License | 4 votes |
public EmptyProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #24
Source File: RegisterMapperTest.java From Mapper with MIT License | 4 votes |
@Test public void testHashRegisterMapper(){ MapperHelper mapperHelper = new MapperHelper(); Assert.assertTrue(mapperHelper.isExtendCommonMapper(UserMapper.class)); }
Example #25
Source File: RegisterMapperTest.java From Mapper with MIT License | 4 votes |
@Test public void testRoleMapper(){ MapperHelper mapperHelper = new MapperHelper(); Assert.assertFalse(mapperHelper.isExtendCommonMapper(RoleMapper.class)); }
Example #26
Source File: RegisterMapperTest.java From Mapper with MIT License | 4 votes |
@Test public void testRoleMapper2(){ MapperHelper mapperHelper = new MapperHelper(); Assert.assertFalse(mapperHelper.isExtendCommonMapper(RoleMapper2.class)); }
Example #27
Source File: SqlServerProvider.java From tk-mybatis with MIT License | 4 votes |
public SqlServerProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #28
Source File: InMapperProvider.java From BlogManagePlatform with Apache License 2.0 | 4 votes |
public InMapperProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #29
Source File: EqualMapperProvider.java From BlogManagePlatform with Apache License 2.0 | 4 votes |
public EqualMapperProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }
Example #30
Source File: IdsMapperProvider.java From BlogManagePlatform with Apache License 2.0 | 4 votes |
public IdsMapperProvider(Class<?> mapperClass, MapperHelper mapperHelper) { super(mapperClass, mapperHelper); }