Search code examples
androidrestgoogle-cloud-endpointsobjectify

Google Endpoint + Objectify + Android filter or search


I started with Objectify and Google endpoint. I successfully went through adding module, generating endpoints i have client libraries, I can get, list, insert, remove, update results on android. But I got stuck on filtering. I read on objectify wiki that there is something like that possible:

List<Car> cars = ofy().load().type(Car.class).filter("year >", 1999).list();

But problem is I cant get Objectify on android side. How can i achieve this. Can I even get it on android side?

I aslo read RESTful URL design for search i tried it and it worked but I would like to use objectify.

Also am not sure if I understand endpoints very well. Are they the only way to communicate with other side?


Solution

  • Probably I do understand endpoints better now. I created mehod on backend side eg

     @ApiMethod(name = "search")
    public List<Car> search(//some params){
            return ofy().load().type(Car.class).filter("year >", 1999).list();
    }
    

    this works perfectly on client side I just call myApi.search();