SONAR-5305 Move some methods from ResourceDao to ComponentDao