Package org.apache.ibatis.binding
Class MapperRegistry
- java.lang.Object
-
- org.apache.ibatis.binding.MapperRegistry
-
public class MapperRegistry extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private Configuration
config
private java.util.Map<java.lang.Class<?>,MapperProxyFactory<?>>
knownMappers
-
Constructor Summary
Constructors Constructor Description MapperRegistry(Configuration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
addMapper(java.lang.Class<T> type)
void
addMappers(java.lang.String packageName)
Adds the mappers.void
addMappers(java.lang.String packageName, java.lang.Class<?> superType)
Adds the mappers.<T> T
getMapper(java.lang.Class<T> type, SqlSession sqlSession)
java.util.Collection<java.lang.Class<?>>
getMappers()
Gets the mappers.<T> boolean
hasMapper(java.lang.Class<T> type)
-
-
-
Field Detail
-
config
private final Configuration config
-
knownMappers
private final java.util.Map<java.lang.Class<?>,MapperProxyFactory<?>> knownMappers
-
-
Constructor Detail
-
MapperRegistry
public MapperRegistry(Configuration config)
-
-
Method Detail
-
getMapper
public <T> T getMapper(java.lang.Class<T> type, SqlSession sqlSession)
-
hasMapper
public <T> boolean hasMapper(java.lang.Class<T> type)
-
addMapper
public <T> void addMapper(java.lang.Class<T> type)
-
getMappers
public java.util.Collection<java.lang.Class<?>> getMappers()
Gets the mappers.- Returns:
- the mappers
- Since:
- 3.2.2
-
addMappers
public void addMappers(java.lang.String packageName, java.lang.Class<?> superType)
Adds the mappers.- Parameters:
packageName
- the package namesuperType
- the super type- Since:
- 3.2.2
-
addMappers
public void addMappers(java.lang.String packageName)
Adds the mappers.- Parameters:
packageName
- the package name- Since:
- 3.2.2
-
-