List of usage examples for org.apache.ibatis.session Configuration getMappedStatements
public Collection<MappedStatement> getMappedStatements()
From source file:cn.org.awcp.core.mybatis.mapper.MapperHelper.java
License:Open Source License
/** * ????? <br>// ww w . j a v a2 s . com * ?configurationMappedStatement * * @param configuration */ public void processConfiguration(Configuration configuration) { Collection<MappedStatement> collection = configuration.getMappedStatements(); // ???? if (collectionSet.contains(collection)) { return; } else { collectionSet.add(collection); } int size = collection.size(); Iterator<?> iterator = collection.iterator(); while (iterator.hasNext()) { Object object = iterator.next(); if (object instanceof MappedStatement) { MappedStatement ms = (MappedStatement) object; if (isMapperMethod(ms.getId())) { if (ms.getSqlSource() instanceof ProviderSqlSource) { setSqlSource(ms); } } } // ??selectKeyms?? if (collection.size() != size) { size = collection.size(); iterator = collection.iterator(); } } }
From source file:com.github.abel533.mapperhelper.MapperHelper.java
License:Open Source License
/** * ?????// w ww.j a v a2s.c om * <br>?configurationMappedStatement * * @param configuration */ public void processConfiguration(Configuration configuration) { Collection<MappedStatement> collection = configuration.getMappedStatements(); //???? if (collectionSet.contains(collection)) { return; } else { collectionSet.add(collection); } int size = collection.size(); Iterator<?> iterator = collection.iterator(); while (iterator.hasNext()) { Object object = iterator.next(); if (object instanceof MappedStatement) { MappedStatement ms = (MappedStatement) object; if (isMapperMethod(ms.getId())) { if (ms.getSqlSource() instanceof ProviderSqlSource) { setSqlSource(ms); } } } //??selectKeyms?? if (collection.size() != size) { size = collection.size(); iterator = collection.iterator(); } } }
From source file:com.hand.hap.mybatis.mapperhelper.MapperHelper.java
License:Open Source License
/** * ??// w ww .j ava 2 s . c o m * * @param configuration * @param mapperInterface */ public void processConfiguration(Configuration configuration, Class<?> mapperInterface) { String prefix; if (mapperInterface != null) { prefix = mapperInterface.getCanonicalName(); } else { prefix = ""; } for (Object object : new ArrayList<Object>(configuration.getMappedStatements())) { if (object instanceof MappedStatement) { MappedStatement ms = (MappedStatement) object; if (ms.getId().startsWith(prefix) && isMapperMethod(ms.getId())) { if (ms.getSqlSource() instanceof ProviderSqlSource) { setSqlSource(ms); } } } } }
From source file:com.isea533.mybatis.mapperhelper.MapperHelper.java
License:Open Source License
/** * ?configurationMappedStatement//from w w w . ja va 2 s. c o m * * @param configuration */ public void processConfiguration(Configuration configuration) { Collection<MappedStatement> collection = configuration.getMappedStatements(); //???? if (collectionSet.contains(collection)) { return; } else { collectionSet.add(collection); } int size = collection.size(); Iterator iterator = collection.iterator(); while (iterator.hasNext()) { Object object = iterator.next(); if (object instanceof MappedStatement) { MappedStatement ms = (MappedStatement) object; if (isMapperMethod(ms.getId())) { if (ms.getSqlSource() instanceof ProviderSqlSource) { setSqlSource(ms); } } } //??selectKeyms?? if (collection.size() != size) { size = collection.size(); iterator = collection.iterator(); } } }