rest - Jersey Entity Filtering with Wildcard Annotation - How To? -
rest - Jersey Entity Filtering with Wildcard Annotation - How To? -
i looking 2 days suitable reply till found nothing.
i trying implement entity filtering in jersey. if utilize single custom created object (job object) works fine. works fine if utilize list< job > want utilize list< ? > or list< type > not work. wanted utilize wildcard because not have job objects deal with. if json object rest resource list entity empty.
this header rest resource:
@get @path("/jobs/") @produces(mediatype.application_json) public listresponse loadjoblist( @pathparam("session") string session, @pathparam(sessionfactoryutil.system_id_parameter) string system, @queryparam ("start") final int start, @queryparam ("limit") final int limit ) {
this method create response object converted json object:
public listresponse execute(){ list<job> jobslist = this.loadjobsfromdatabase(); string message = "job(s) loaded"; listresponse listresponse = new listresponse(true, message , jobslist, 24); homecoming listresponse; }
and snippets listresponse objects extends restresponse object
public class restresponse { private boolean success; private string message; private object data; public restresponse(boolean success, string message, object data) { this.success = success; this.message = message; if(data != null) { this.data = data; } else { info = null; } } public class listresponse extends restresponse{ private long maxresults; private list<job> jobs; public listresponse(boolean success, string message, list<job> jobs, long maxresults) { super(success, message, null); this.jobs = jobs; this.maxresults = maxresults; }
i tried set list object info restresponse won't work.
last not least: illustration url utilize retrieve data
http://localhost:8080/s_newdownloader/newdownloader/test/45db0000/jobs?start=0&limit=25
i hope guys can help me awesome.
thanks
rest jersey entity filtering wildcard
Comments
Post a Comment