protected Object prepareCompositeKeyParameter(ResultSet rs, ResultMapping resultMapping, Class parameterType) throws SQLException {
final Object parameterObject = instantiateParameterObject(parameterType);
final MetaObject metaObject = configuration.newMetaObject(parameterObject);
for (ResultMapping innerResultMapping : resultMapping.getComposites()) {
final Class propType = metaObject.getSetterType(innerResultMapping.getProperty());
final TypeHandler typeHandler = typeHandlerRegistry.getTypeHandler(propType);
final Object propValue = typeHandler.getResult(rs, innerResultMapping.getColumn());
metaObject.setValue(innerResultMapping.getProperty(), propValue);
}
return parameterObject;
}