📄 advancedsearchmanager.java
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.horizongroup.mcompanion.web.db;import java.sql.ResultSet;/** * * @author Administrator */public class AdvancedSearchManager extends DBManager{ public AdvancedSearchManager() { super(); } public String SearchHospital(String Query) { String res =""; try { ResultSet rs = getStatement().executeQuery(Query) ; while(rs.next()) { res+="Hospital:"; res += rs.getString(1) + ":"+ rs.getString(3) + ":" + rs.getString(6) +":"+ rs.getString(8) + ":" + rs.getString(9) + ":" ; res += "#"; } } catch(Exception ie) { ie.printStackTrace(); } System.out.println(res); return res; } public String SearchRestaurant(String Query) { String res =""; System.out.println(Query); try { ResultSet rs1 = getStatement().executeQuery(Query) ; // rs.next(); while(rs1.next()) { res+="Restaurant:"; res += rs1.getString(1)+":"+rs1.getString(3)+":"+rs1.getString(5)+":"+rs1.getString(6)+ ":" + rs1.getString(7) + ":" ; res += "#"; } } catch(Exception ie) { ie.printStackTrace(); } System.out.println("QUERY OUT"); System.out.println(res); return res; } public String SearchInstitution(String Query) { String res =""; try { ResultSet rs = getStatement().executeQuery(Query) ; while(rs.next()) { res+="Institution:"; res += rs.getString(1) + ":" + rs.getString(4) + ":" + rs.getString(7) +":" + rs.getString(8) + ":" + rs.getString(9) + ":" ; res += "#"; } } catch(Exception ie) { ie.printStackTrace(); } System.out.println(res); return res; } public String SearchReligiousSpot(String Query) { String res =""; try { ResultSet rs = getStatement().executeQuery(Query) ; while(rs.next()) { res+="Religious_spots:"; res += rs.getString(1) + ":" + rs.getString(2) + ":" + rs.getString(5) +":" + rs.getString(7) + ":" + rs.getString(6) + ":" ; res += "#"; } } catch(Exception ie) { ie.printStackTrace(); } System.out.println(res); return res; } public String SearchLocation(String Query) { String res =""; try { ResultSet rs = getStatement().executeQuery(Query) ; while(rs.next()) { res+="Location:"; res += rs.getString(1) + ":" + rs.getString(2) + ":" + rs.getString(5) +":" + rs.getString(6) + ":" + rs.getString(7) + ":" ; res += "#"; } } catch(Exception ie) { ie.printStackTrace(); } System.out.println(res); return res; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -