use of edu.cornell.kfs.sys.dataaccess.ActionItemNoteDetailDto in project cu-kfs by CU-CommunityApps.
the class DocumentMaintenanceDaoJdbc method getActionNotesToBeRequeued.
@Override
public List<ActionItemNoteDetailDto> getActionNotesToBeRequeued() {
CuSqlQuery sqlQuery = buildActionNoteQuery();
RowMapper<ActionItemNoteDetailDto> actionItemNoteMapper = (resultSet, rowNum) -> {
ActionItemNoteDetailDto actionItemNote = new ActionItemNoteDetailDto();
actionItemNote.setPrincipalId(resultSet.getString(1));
actionItemNote.setDocHeaderId(resultSet.getString(2));
actionItemNote.setActionNote(resultSet.getString(3));
actionItemNote.setNoteTimeStamp(resultSet.getTimestamp(4, Calendar.getInstance()));
actionItemNote.setOriginalActionItemId(resultSet.getString(5));
return actionItemNote;
};
return queryForValues(sqlQuery, actionItemNoteMapper);
}
use of edu.cornell.kfs.sys.dataaccess.ActionItemNoteDetailDto in project cu-kfs by CU-CommunityApps.
the class DocumentMaintenanceServiceImpl method requeueDocumentByDocumentId.
@Transactional
private void requeueDocumentByDocumentId(List<ActionItemNoteDetailDto> noteDetails, String docId) {
LOG.info("requeueDocumentByDocumentId: Requesting requeue for document: " + docId);
documentRefreshQueue.refreshDocument(docId);
List<ActionItemNoteDetailDto> noteDetailsForDocument = findNoteDetailsForDocument(noteDetails, docId);
for (ActionItemNoteDetailDto detailDto : noteDetailsForDocument) {
ActionItem actionItem = findActionItem(detailDto);
if (ObjectUtils.isNotNull(actionItem)) {
ActionItemExtension actionItemExtension = findActionItemExtension(actionItem.getId());
if (ObjectUtils.isNull(actionItemExtension)) {
actionItemExtension = buildActionItemExtension(detailDto, actionItem);
LOG.info("requeueDocumentByDocumentId, adding note details " + detailDto.toString() + " to action item " + actionItem.getId());
} else {
actionItemExtension.setActionNote(detailDto.getActionNote());
LOG.info("requeueDocumentByDocumentId, updating note details " + detailDto.toString() + " to action item " + actionItem.getId());
}
businessObjectService.save(actionItemExtension);
}
}
}
Aggregations