}
public void processAfter(Executor executor, MappedStatement ms, Statement stmt, Object parameter) {
try {
final Configuration configuration = ms.getConfiguration();
final TypeHandlerRegistry typeHandlerRegistry = configuration.getTypeHandlerRegistry();
if (parameter != null) {
String keyProperty = ms.getKeyProperty();
final MetaObject metaParam = configuration.newMetaObject(parameter);
if (keyProperty != null && metaParam.hasSetter(keyProperty)) {
Class keyPropertyType = metaParam.getSetterType(keyProperty);
TypeHandler th = typeHandlerRegistry.getTypeHandler(keyPropertyType);
if (th != null) {
ResultSet rs = stmt.getGeneratedKeys();
try {
ResultSetMetaData rsmd = rs.getMetaData();
int colCount = rsmd.getColumnCount();