protected function extractRelationFromRow(array $row)
{
$relation = new Relation();
$relation->id = (int) $row['ezcontentobject_link_id'];
$relation->sourceContentId = (int) $row['ezcontentobject_link_from_contentobject_id'];
$relation->sourceContentVersionNo = (int) $row['ezcontentobject_link_from_contentobject_version'];
$relation->destinationContentId = (int) $row['ezcontentobject_link_to_contentobject_id'];
$relation->type = (int) $row['ezcontentobject_link_relation_type'];
$contentClassAttributeId = (int) $row['ezcontentobject_link_contentclassattribute_id'];
if ($contentClassAttributeId > 0) {
$relation->sourceFieldDefinitionId = $contentClassAttributeId;
}
return $relation;
}