Java Code Examples for org.apache.ibatis.session.Configuration#setUseGeneratedKeys()

The following examples show how to use org.apache.ibatis.session.Configuration#setUseGeneratedKeys() . 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: BaseExecutorTest.java    From mybatis with Apache License 2.0 7 votes vote down vote up
public BaseExecutorTest() {
  config = new Configuration();
  config.setLazyLoadingEnabled(true);
  config.setUseGeneratedKeys(false);
  config.setMultipleResultSetsEnabled(true);
  config.setUseColumnLabel(true);
  config.setDefaultStatementTimeout(5000);
}
 
Example 2
Source File: AbstractDataBaseBean.java    From spring-boot-starter-dao with Apache License 2.0 5 votes vote down vote up
protected Configuration cloneConfiguration(Configuration configuration) { 
	Configuration relust=new Configuration();
	relust.setEnvironment(configuration.getEnvironment());
	relust.setSafeRowBoundsEnabled(configuration.isSafeRowBoundsEnabled());
	relust.setSafeResultHandlerEnabled(configuration.isSafeResultHandlerEnabled());
	relust.setMapUnderscoreToCamelCase(configuration.isMapUnderscoreToCamelCase());
	relust.setAggressiveLazyLoading(configuration.isAggressiveLazyLoading());
	relust.setMultipleResultSetsEnabled(configuration.isMultipleResultSetsEnabled());
	relust.setUseGeneratedKeys(configuration.isUseGeneratedKeys());
	relust.setUseColumnLabel(configuration.isUseColumnLabel());
	relust.setCacheEnabled(configuration.isCacheEnabled());
	relust.setCallSettersOnNulls(configuration.isCallSettersOnNulls());
	relust.setUseActualParamName(configuration.isUseActualParamName());
	relust.setReturnInstanceForEmptyRow(configuration.isReturnInstanceForEmptyRow());
	relust.setLogPrefix(configuration.getLogPrefix());
	relust.setLogImpl(configuration.getLogImpl());
	relust.setVfsImpl(configuration.getVfsImpl());
	relust.setLocalCacheScope(configuration.getLocalCacheScope());
	relust.setJdbcTypeForNull(configuration.getJdbcTypeForNull());
	relust.setLazyLoadTriggerMethods(configuration.getLazyLoadTriggerMethods());
	relust.setDefaultStatementTimeout(configuration.getDefaultStatementTimeout());
	relust.setDefaultFetchSize(configuration.getDefaultFetchSize());
	relust.setDefaultExecutorType(configuration.getDefaultExecutorType());
	relust.setAutoMappingBehavior(configuration.getAutoMappingBehavior());
	relust.setAutoMappingUnknownColumnBehavior(configuration.getAutoMappingUnknownColumnBehavior());
	relust.setVariables(configuration.getVariables());
	relust.setReflectorFactory(configuration.getReflectorFactory());
	relust.setObjectFactory(configuration.getObjectFactory());
	relust.setObjectWrapperFactory(configuration.getObjectWrapperFactory());
	relust.setLazyLoadingEnabled(configuration.isLazyLoadingEnabled());
	relust.setProxyFactory(configuration.getProxyFactory());
	relust.setDatabaseId(configuration.getDatabaseId());
	relust.setConfigurationFactory(configuration.getConfigurationFactory());
	relust.getTypeHandlerRegistry().setDefaultEnumTypeHandler(GlobalEnumTypeHandler.class);
	return relust;
}
 
Example 3
Source File: BaseExecutorTest.java    From mybaties with Apache License 2.0 5 votes vote down vote up
public BaseExecutorTest() {
  config = new Configuration();
  config.setLazyLoadingEnabled(true);
  config.setUseGeneratedKeys(false);
  config.setMultipleResultSetsEnabled(true);
  config.setUseColumnLabel(true);
  config.setDefaultStatementTimeout(5000);
}