/** * Reset records. * * @throws Exception the exception */ private static void resetRecords() throws Exception { // remove tracking records for (TrackingRecord trackingRecord : workflowService.getTrackingRecords().getTrackingRecords()) workflowService.removeTrackingRecord(trackingRecord.getId()); // remove map records for (MapRecord mapRecord : mappingService.getMapRecords().getMapRecords()) mappingService.removeMapRecord(mapRecord.getId()); }
/** * Construct and return a map record for a user and status. * * @param user the user * @param status the status * @return the map record */ private MapRecord createRecord(MapUser user, WorkflowStatus status) { MapRecord record = new MapRecordJpa(); record.setConceptId(concept.getTerminologyId()); record.setConceptName(concept.getDefaultPreferredName()); record.setLastModified(new Date().getTime()); record.setLastModifiedBy(user); record.setMapProjectId(mapProject.getId()); record.setOwner(user); record.setTimestamp(new Date().getTime()); record.setWorkflowStatus(status); return record; }