Exemplo n.º 1
0
  static final void addUUIDToMap(
      final String label,
      final String valueIfNull,
      final UUID id,
      final Map<String, Object> parameters,
      @SuppressWarnings("rawtypes") ReferenceService referenceService)
      throws ObjectNotFoundException {

    if (id != null) {
      parameters.put(label, ((AbstractReference) referenceService.get(id)).getName());
    } else {
      parameters.put(label, valueIfNull);
    }
  }
Exemplo n.º 2
0
  static final void addUUIDSToMap(
      final String label,
      final String valueIfNull,
      final List<UUID> ids,
      final Map<String, Object> parameters,
      @SuppressWarnings("rawtypes") ReferenceService referenceService)
      throws ObjectNotFoundException {

    ArrayList<String> strs = new ArrayList<String>();
    if (ids != null && ids.size() > 0) {
      for (UUID id : ids) {
        strs.add(((AbstractReference) referenceService.get(id)).getName());
      }
    }
    parameters.put(label, concatNamesFromStrings(strs, valueIfNull));
  }