}
private void initResultReader(JDBCEntityBridge2 entity, JDBCDeclaredQueryMetaData metadata) {
String entityName = metadata.getEJBName();
if (entityName != null) {
Catalog catalog = entity.getManager().getCatalog();
JDBCEntityBridge2 otherEntity = (JDBCEntityBridge2) catalog.getEntityByEJBName(entityName);
if (otherEntity == null) {
throw MESSAGES.unknownEntity(entityName);
}
this.entity = otherEntity;
} else {