Refine AbstractBaseRepository and dependent classes.