Add criteria support for repositories