Interface and generic implementations of QueryExecutor