Merge branch 'hotfix/5.45.1'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / util / OperationsUtil.java
1 /**
2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
8 */
9 package eu.etaxonomy.taxeditor.util;
10
11 import java.util.ArrayList;
12 import java.util.List;
13 import java.util.UUID;
14
15 import eu.etaxonomy.cdm.model.common.CdmBase;
16
17 /**
18 * @author cmathew
19 * @date 29 Jun 2015
20 */
21 public class OperationsUtil {
22
23 public static List<UUID> convertToUuidList(List<CdmBase> cdmBaseList) {
24 List<UUID> uuids = new ArrayList<>();
25 for(CdmBase cdmBase : cdmBaseList) {
26 if(cdmBase == null) {
27 uuids.add(null);
28 } else {
29 uuids.add(cdmBase.getUuid());
30 }
31 }
32 return uuids;
33 }
34 }