public static List getPhoneBook() {

		Connection conn = null;
		List<Contact> listPhoneBook = null;
		try {
			conn = DBConnection.getConnection();

			String query = "SELECT * FROM  `mobilephone`";

			Statement stat = conn.createStatement();
			ResultSet result = stat.executeQuery(query);

			int numberOfRecords = 0;
			if (result.first()) {
				numberOfRecords = result.getRow();
				listPhoneBook = new ArrayList<Contact>(numberOfRecords);

				do {
					listPhoneBook.add(new Contact(result.getString(1), result.getString(2), result.getString(3), result.getInt(4)));
				} while (result.next());
				result.close();

			}
		} catch (SQLException e1) {
			e1.printStackTrace();
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		try {
			if (conn != null)
				conn.close();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return listPhoneBook;
	}