Ejemplo n.º 1
0
 private void includeInputParams(List<FindingsVO> findingsVOList) {
   for (FindingsVO findingsVO : CollectionUtil.safe(findingsVOList)) {
     findingsVO.setImportanceSelection(
         CollectionUtil.toKVPairList(
             LookupValuesCache.getImportanceList(),
             "key",
             "value",
             String.valueOf(findingsVO.getImportance())));
   }
 }
Ejemplo n.º 2
0
  private List<FindingsVO> addFindingsGridSelection(List<FindingsVO> existingList) {
    List<FindingsVO> newList = new ArrayList<FindingsVO>();
    for (FindingsVO existingFindingsVO : CollectionUtil.safe(existingList)) {
      existingFindingsVO.setFindingsCategorySelection(
          CollectionUtil.toKVPairList(
              getEntityManager()
                  .createNamedQuery("FindingsCategory.findAll", FindingsCategory.class)
                  .getResultList(),
              "findingsCategoryId",
              "findingsCategoryName",
              String.valueOf(existingFindingsVO.getFindingsCategoryId())));
      existingFindingsVO.setImportanceSelection(
          CollectionUtil.toKVPairList(
              LookupValuesCache.getImportanceList(),
              "key",
              "value",
              existingFindingsVO.getImportance()));
      newList.add(existingFindingsVO);
    }

    return newList;
  }