if (id == null) {
throw new IllegalArgumentException("id may not be null");
}
AsyncRequest asyncRequest = null;
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
c = getConnection();
pstmt = AsyncRequestMapPersistenceUtil.getAsyncRequest(id, c);
rs = pstmt.executeQuery();
if (rs == null || !rs.next()) {
logger.debug("No Asyncrequest with ID " + id);
return null;
}
asyncRequest = AsyncRequestMapPersistenceUtil.rsToAsyncRequest(rs, this.repr, c);
VirtualMachine[] bindings = AsyncRequestMapPersistenceUtil.getAsyncVMs(asyncRequest.getId(), c);
asyncRequest.setBindings(bindings);
AsyncRequestMapPersistenceUtil.addAllocatedVMs(asyncRequest, c);
AsyncRequestMapPersistenceUtil.addFinishedVMs(asyncRequest, c);
AsyncRequestMapPersistenceUtil.addToBePreempted(asyncRequest, c);
} catch (SQLException e) {