function getExternalIdentifiersSearchResultAsRecordSet($queryResult)
 {
     $dbr = wfGetDB(DB_SLAVE);
     $externalIdentifierMatchStructure = new Structure($this->externalIdentifierAttribute, $this->collectionAttribute, $this->collectionMemberAttribute);
     $recordSet = new ArrayRecordSet($externalIdentifierMatchStructure, new Structure($this->externalIdentifierAttribute));
     while ($row = $dbr->fetchObject($queryResult)) {
         $record = new ArrayRecord($this->externalIdentifierMatchStructure);
         $record->setAttributeValue($this->externalIdentifierAttribute, $row->external_identifier);
         $record->setAttributeValue($this->collectionAttribute, $row->collection_mid);
         $record->setAttributeValue($this->collectionMemberAttribute, $row->member_mid);
         $recordSet->add($record);
     }
     expandDefinedMeaningReferencesInRecordSet($recordSet, array($this->collectionAttribute, $this->collectionMemberAttribute));
     return $recordSet;
 }
function getDefinedMeaningClassMembershipRecordSet( $definedMeaningId, ViewInformation $viewInformation ) {
	global
		$dataSet;

	$o = OmegaWikiAttributes::getInstance();

	$recordSet = queryRecordSet(
		$o->classMembershipStructure->getStructureType(),
		$viewInformation->queryTransactionInformation,
		$o->classMembershipId,
		new TableColumnsToAttributesMapping(
			new TableColumnsToAttribute( array( 'class_membership_id' ), $o->classMembershipId ),
			new TableColumnsToAttribute( array( 'class_mid' ), $o->class )
		),
		$dataSet->classMemberships,
		array( "class_member_mid=$definedMeaningId" )
	);
	
	expandDefinedMeaningReferencesInRecordSet( $recordSet, array( $o->class ) );
	
	return $recordSet;
}