public class CustomSuggestion implements Suggestion{
public CityNameDTO dto = null;
public CustomSuggestion(CityNameDTO dto) {
this.dto = dto;
}
@Override
public String getDisplayString() {
return dto.getCityName();
}
@Override
public String getReplacementString() {
return dto.getCityId();
}
}
public class CustomSuggestOracle extends SuggestOracle{
List<CustomSuggestion> citySugggestions = null;
@Override
public void requestSuggestions(Request request, Callback callback) {
Response response = new Response(getMatchingCities(request.getQuery(), request.getLimit()));
}
private List<CustomSuggestion> getMatchingCities(String query, int limit) {
List<CustomSuggestion> list = new ArrayList<CustomSuggestion>();
}
}
Now i am not able to understand how to go ahead with this customSuggestOracle.
Could you pls guide me here?
Thanks
Deepak