Use annotations on parameterized types
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaCapabilityAssignment.java
index 28e4cdc..1247a3e 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2020 Nordix Foundation.
- * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,15 +34,12 @@ import javax.persistence.Table;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NonNull;
-import org.onap.policy.common.parameters.annotations.Entries;
-import org.onap.policy.common.parameters.annotations.Items;
 import org.onap.policy.common.parameters.annotations.NotNull;
 import org.onap.policy.common.utils.coder.YamlJsonTranslator;
 import org.onap.policy.models.base.PfAuthorative;
 import org.onap.policy.models.base.PfConcept;
 import org.onap.policy.models.base.PfConceptKey;
 import org.onap.policy.models.base.PfUtils;
-import org.onap.policy.models.base.validation.annotations.PfItems;
 import org.onap.policy.models.base.validation.annotations.PfMin;
 import org.onap.policy.models.tosca.authorative.concepts.ToscaCapabilityAssignment;
 
@@ -66,17 +63,14 @@ public class JpaToscaCapabilityAssignment extends JpaToscaEntityType<ToscaCapabi
 
     @ElementCollection
     @Lob
-    @Entries(key = @Items(notNull = {@NotNull}), value = @Items(notNull = {@NotNull}))
-    private Map<String, String> properties;
+    private Map<@NotNull String, @NotNull String> properties;
 
     @ElementCollection
     @Lob
-    @Entries(key = @Items(notNull = {@NotNull}), value = @Items(notNull = {@NotNull}))
-    private Map<String, String> attributes;
+    private Map<@NotNull String, @NotNull String> attributes;
 
     @ElementCollection
-    @PfItems(notNull = {@NotNull}, pfMin = {@PfMin(value = 0, allowed = -1)})
-    private List<Integer> occurrences;
+    private List<@NotNull @PfMin(value = 0, allowed = -1) Integer> occurrences;
 
     /**
      * The Default Constructor creates a {@link JpaToscaCapabilityAssignment} object with a null key.