Gemfire - Crud Repository - findBy Implementation -
we using single gemfire cluster non production environment , geting regionname dynamically using @resources. use need override crud operation. got struck implementation logic findbyfirstnameandlastname(string firstname,string lastname).
can share actual implementation of findby in crudrepository.
appreciate help.
public list<user> findbyfirstname(string firtstname) throws queryexception { list<user> user = new arraylist<>(); try { selectresults<user> results = (selectresults) userregion .query("select * /" + userregion.getname() + " d d.firtstname='" + firtstname+"'"); user.addall(results); } catch (functiondomainexception | typemismatchexception | nameresolutionexception | queryinvocationtargetexception e) { throw e; } return user; }
wiki
Comments
Post a Comment