public static ArrayList<Integer> getMaps(String searchTerm, String criterion) {
		ArrayList<Integer> result= new ArrayList<Integer>();
		searchTerm= searchTerm.trim();
		if(searchTerm.isEmpty()) return result;
		String query= "";
		if(criterion.equals("giorno")){
			query= findStoriesForDay(searchTerm);
		}
		if(criterion.equals("teller")){
			query= "Select storyID from Stories where storyteller=\"" + searchTerm + "\" order by giorno;";
		}
		if(criterion.equals("location")){
			query= "Select distinct(storyID) from Locations where locationID in (select locationID from Points where name like '%" + searchTerm + "%');";
		}
		if (query == null) return result;
		Statement st= MyDBAccess.getStatement();
		try{
			ResultSet rs= st.executeQuery(query);
			while(rs.next()){
				result.add(rs.getInt(1));
			}
		}catch (SQLException e){
			System.out.println(query);
			return result;
		}
		return result;
	}