Package org.apache.ibatis.builder
Class MapperBuilderAssistant
- java.lang.Object
-
- org.apache.ibatis.builder.BaseBuilder
-
- org.apache.ibatis.builder.MapperBuilderAssistant
-
public class MapperBuilderAssistant extends BaseBuilder
- Author:
- Clinton Begin
-
-
Field Summary
-
Fields inherited from class org.apache.ibatis.builder.BaseBuilder
configuration, typeAliasRegistry, typeHandlerRegistry
-
-
Constructor Summary
Constructors Constructor Description MapperBuilderAssistant(Configuration configuration, String resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MappedStatement
addMappedStatement(String id, SqlSource sqlSource, StatementType statementType, SqlCommandType sqlCommandType, Integer fetchSize, Integer timeout, String parameterMap, Class<?> parameterType, String resultMap, Class<?> resultType, ResultSetType resultSetType, boolean flushCache, boolean useCache, boolean resultOrdered, KeyGenerator keyGenerator, String keyProperty, String keyColumn, String databaseId, LanguageDriver lang)
Backward compatibility signature 'addMappedStatement'.MappedStatement
addMappedStatement(String id, SqlSource sqlSource, StatementType statementType, SqlCommandType sqlCommandType, Integer fetchSize, Integer timeout, String parameterMap, Class<?> parameterType, String resultMap, Class<?> resultType, ResultSetType resultSetType, boolean flushCache, boolean useCache, boolean resultOrdered, KeyGenerator keyGenerator, String keyProperty, String keyColumn, String databaseId, LanguageDriver lang, String resultSets)
ParameterMap
addParameterMap(String id, Class<?> parameterClass, List<ParameterMapping> parameterMappings)
ResultMap
addResultMap(String id, Class<?> type, String extend, Discriminator discriminator, List<ResultMapping> resultMappings, Boolean autoMapping)
String
applyCurrentNamespace(String base, boolean isReference)
Discriminator
buildDiscriminator(Class<?> resultType, String column, Class<?> javaType, JdbcType jdbcType, Class<? extends TypeHandler<?>> typeHandler, Map<String,String> discriminatorMap)
ParameterMapping
buildParameterMapping(Class<?> parameterType, String property, Class<?> javaType, JdbcType jdbcType, String resultMap, ParameterMode parameterMode, Class<? extends TypeHandler<?>> typeHandler, Integer numericScale)
ResultMapping
buildResultMapping(Class<?> resultType, String property, String column, Class<?> javaType, JdbcType jdbcType, String nestedSelect, String nestedResultMap, String notNullColumn, String columnPrefix, Class<? extends TypeHandler<?>> typeHandler, List<ResultFlag> flags)
Backward compatibility signature 'buildResultMapping'.ResultMapping
buildResultMapping(Class<?> resultType, String property, String column, Class<?> javaType, JdbcType jdbcType, String nestedSelect, String nestedResultMap, String notNullColumn, String columnPrefix, Class<? extends TypeHandler<?>> typeHandler, List<ResultFlag> flags, String resultSet, String foreignColumn, boolean lazy)
String
getCurrentNamespace()
LanguageDriver
getLanguageDriver(Class<? extends LanguageDriver> langClass)
Deprecated.void
setCurrentNamespace(String currentNamespace)
Cache
useCacheRef(String namespace)
Cache
useNewCache(Class<? extends Cache> typeClass, Class<? extends Cache> evictionClass, Long flushInterval, Integer size, boolean readWrite, boolean blocking, Properties props)
-
Methods inherited from class org.apache.ibatis.builder.BaseBuilder
booleanValueOf, createInstance, getConfiguration, integerValueOf, parseExpression, resolveAlias, resolveClass, resolveJdbcType, resolveParameterMode, resolveResultSetType, resolveTypeHandler, resolveTypeHandler, stringSetValueOf
-
-
-
-
Constructor Detail
-
MapperBuilderAssistant
public MapperBuilderAssistant(Configuration configuration, String resource)
-
-
Method Detail
-
getCurrentNamespace
public String getCurrentNamespace()
-
setCurrentNamespace
public void setCurrentNamespace(String currentNamespace)
-
useNewCache
public Cache useNewCache(Class<? extends Cache> typeClass, Class<? extends Cache> evictionClass, Long flushInterval, Integer size, boolean readWrite, boolean blocking, Properties props)
-
addParameterMap
public ParameterMap addParameterMap(String id, Class<?> parameterClass, List<ParameterMapping> parameterMappings)
-
buildParameterMapping
public ParameterMapping buildParameterMapping(Class<?> parameterType, String property, Class<?> javaType, JdbcType jdbcType, String resultMap, ParameterMode parameterMode, Class<? extends TypeHandler<?>> typeHandler, Integer numericScale)
-
addResultMap
public ResultMap addResultMap(String id, Class<?> type, String extend, Discriminator discriminator, List<ResultMapping> resultMappings, Boolean autoMapping)
-
buildDiscriminator
public Discriminator buildDiscriminator(Class<?> resultType, String column, Class<?> javaType, JdbcType jdbcType, Class<? extends TypeHandler<?>> typeHandler, Map<String,String> discriminatorMap)
-
addMappedStatement
public MappedStatement addMappedStatement(String id, SqlSource sqlSource, StatementType statementType, SqlCommandType sqlCommandType, Integer fetchSize, Integer timeout, String parameterMap, Class<?> parameterType, String resultMap, Class<?> resultType, ResultSetType resultSetType, boolean flushCache, boolean useCache, boolean resultOrdered, KeyGenerator keyGenerator, String keyProperty, String keyColumn, String databaseId, LanguageDriver lang, String resultSets)
-
addMappedStatement
public MappedStatement addMappedStatement(String id, SqlSource sqlSource, StatementType statementType, SqlCommandType sqlCommandType, Integer fetchSize, Integer timeout, String parameterMap, Class<?> parameterType, String resultMap, Class<?> resultType, ResultSetType resultSetType, boolean flushCache, boolean useCache, boolean resultOrdered, KeyGenerator keyGenerator, String keyProperty, String keyColumn, String databaseId, LanguageDriver lang)
Backward compatibility signature 'addMappedStatement'.- Parameters:
id
- the idsqlSource
- the sql sourcestatementType
- the statement typesqlCommandType
- the sql command typefetchSize
- the fetch sizetimeout
- the timeoutparameterMap
- the parameter mapparameterType
- the parameter typeresultMap
- the result mapresultType
- the result typeresultSetType
- the result set typeflushCache
- the flush cacheuseCache
- the use cacheresultOrdered
- the result orderedkeyGenerator
- the key generatorkeyProperty
- the key propertykeyColumn
- the key columndatabaseId
- the database idlang
- the lang- Returns:
- the mapped statement
-
buildResultMapping
public ResultMapping buildResultMapping(Class<?> resultType, String property, String column, Class<?> javaType, JdbcType jdbcType, String nestedSelect, String nestedResultMap, String notNullColumn, String columnPrefix, Class<? extends TypeHandler<?>> typeHandler, List<ResultFlag> flags, String resultSet, String foreignColumn, boolean lazy)
-
buildResultMapping
public ResultMapping buildResultMapping(Class<?> resultType, String property, String column, Class<?> javaType, JdbcType jdbcType, String nestedSelect, String nestedResultMap, String notNullColumn, String columnPrefix, Class<? extends TypeHandler<?>> typeHandler, List<ResultFlag> flags)
Backward compatibility signature 'buildResultMapping'.- Parameters:
resultType
- the result typeproperty
- the propertycolumn
- the columnjavaType
- the java typejdbcType
- the jdbc typenestedSelect
- the nested selectnestedResultMap
- the nested result mapnotNullColumn
- the not null columncolumnPrefix
- the column prefixtypeHandler
- the type handlerflags
- the flags- Returns:
- the result mapping
-
getLanguageDriver
@Deprecated public LanguageDriver getLanguageDriver(Class<? extends LanguageDriver> langClass)
Deprecated.Gets the language driver.- Parameters:
langClass
- the lang class- Returns:
- the language driver
-
-