public static <T> List<T> select(String query, ReadGetter<T> rg,
			ReadFilter<T> rf) {
		List<T> container = new LinkedList<T>();
		try {
			ResultSet result = Database.getConnection().prepareStatement(query)
					.executeQuery();
			rg.takeResultSet(result);
			T ref;
			while (result.next()) {
				ref = rg.read();
				if (rf == null || rf.accept(ref))
					container.add(ref);
			}
		} catch (SQLException e) {
			e.printStackTrace();
			return null;
		}
		Database.closeConnection();
		return container;
	}