java - Efficiently Adding Filters to Spring Repository Methods -
i have list of spring repository methods has grown more , more users request additional filters. i.e., these 5 example methods out of 20 have:
public interface managerrepository extends repository<manager, long> { list<manager> findmanagerbyname(long id); list<manager> findmanagerbynameandprojects(long id, string project) list<manager> findmanagerbynameandpojectlike(long id, string project) list<manager> findmanagerbynameandpojectstartswith(long id, string project) list<manager> findmanagerbynameandprojectlikeandemployeeslike(long id, string project, string employeename }
the # of filters seemingly endless new requirements, , don't think i'm utilizing spring repositories correctly in fashion. how can handle additional filters without creating new methods (as current methods might duplicated if want create another search crazy like:
findmanagerbynamestartswithascandprojectslikeignorecaseandmonthstarted (string name, string project, string month)
Comments
Post a Comment