// Initialize a new SqlResultSetMapping (with the metadata name)
SQLResultSetMapping mapping = new SQLResultSetMapping(getName());
// Process the entity results first.
for (EntityResultMetadata entityResult : m_entityResults) {
mapping.addResult(entityResult.process(loader));
}
// Process the constructor results second.
for (ConstructorResultMetadata constructorResult : m_constructorResults) {
mapping.addResult(constructorResult.process(loader));