move fucntioanlity findBy and findOneBy from MetadataManager to MetadataRepository