public static function GetRelationQueries($sRelCode)
 {
     switch ($sRelCode) {
         case "impacts":
             $aRels = array("server" => array("sQuery" => "SELECT Server AS s JOIN lnkServerToVolume AS l1 ON l1.server_id=s.id  WHERE l1.volume_id = :this->id", "bPropagate" => true, "iDistance" => 5));
             if (class_exists('VirtualDevice')) {
                 $aRels["virtualdevice"] = array("sQuery" => "SELECT VirtualDevice AS vd JOIN lnkVirtualDeviceToVolume AS l1 ON l1.virtualdevice_id=vd.id  WHERE l1.volume_id = :this->id", "bPropagate" => true, "iDistance" => 5);
             }
             return array_merge($aRels, parent::GetRelationQueries($sRelCode));
             break;
         case 'depends on':
             $aRels = array("sotragesystem" => array("sQuery" => "SELECT StorageSystem AS storage WHERE storage.id = :this->storagesystem_id", "bPropagate" => true, "iDistance" => 5));
             return array_merge($aRels, parent::GetRelationQueries($sRelCode));
             break;
         default:
             return parent::GetRelationQueries($sRelCode);
     }
 }
 /**
  * Placeholder for backward compatibility (iTop <= 2.1.0)
  * in case an extension attempts to redefine this function...	 
  */
 public static function GetRelationQueries($sRelCode)
 {
     return parent::GetRelationQueries($sRelCode);
 }
 public static function GetRelationQueries($sRelCode)
 {
     switch ($sRelCode) {
         case "impacts":
             $aRels = array("contact" => array("sQuery" => "SELECT Contact AS c JOIN lnkContactToFunctionalCI AS l1 ON l1.contact_id = c.id WHERE l1.functionalci_id = :this->id", "bPropagate" => true, "iDistance" => 3), "solution" => array("sQuery" => "SELECT ApplicationSolution AS s JOIN lnkApplicationSolutionToFunctionalCI AS l1 ON l1.applicationsolution_id = s.id WHERE l1.functionalci_id = :this->id", "bPropagate" => true, "iDistance" => 2), "SoftwareInstances" => array("sQuery" => "SELECT SoftwareInstance AS s  WHERE s.system_id = :this->id", "bPropagate" => true, "iDistance" => 10));
             return array_merge($aRels, parent::GetRelationQueries($sRelCode));
             break;
         default:
             return parent::GetRelationQueries($sRelCode);
     }
 }