/** * Read the pems rows with the given ID and time range from the database. * * @see #read() if you want a transaction and logging around the operation. */ public PeMSProfile readProfile(Interval interval, Long vdsId) throws DatabaseException { PeMSProfile profile = new PeMSProfile(); profile.setPemsList(new ArrayList<PeMS>()); PeMS pems; String query = null; try { query = runQueryProfile(interval, vdsId); while (null != (pems = pemsFromQueryRS(query))) { profile.getPems().add(pems); } } finally { if (query != null) { dbr.psDestroy(query); } } return profile; }