本文整理汇总了Java中org.apache.ibatis.session.Configuration.setObjectFactory方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.setObjectFactory方法的具体用法?Java Configuration.setObjectFactory怎么用?Java Configuration.setObjectFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.ibatis.session.Configuration
的用法示例。
在下文中一共展示了Configuration.setObjectFactory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cloneConfiguration
import org.apache.ibatis.session.Configuration; //导入方法依赖的package包/类
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;
}