return stringBuffer;
}
private StringBuffer getAirportList(String targetId) {
StringBuffer stringBuffer = new StringBuffer();
IAirportDAO factory = DAOFactory.getDAOFactory(1).getAirportDAO();
List<Airport> allAirportList = factory.allAirportList();
for (Airport airport: allAirportList) {
if(airport.getName().trim().toLowerCase().startsWith(targetId)) {
stringBuffer.append("<airport>");
stringBuffer.append("<name>");
stringBuffer.append(airport.getName());
stringBuffer.append("</name>");
stringBuffer.append("<incountry>");
stringBuffer.append(factory.loadCountryName(airport).getInCountry().getName());
stringBuffer.append("</incountry>");
stringBuffer.append("</airport>");
}
}
return stringBuffer;