Add PolicyIdentOptVersion
[policy/models.git] / models-pdp / src / main / java / org / onap / policy / models / pdp / concepts / PolicyTypeIdent.java
  * ============LICENSE_END=========================================================
  */
 
-package org.onap.policy.models.base.keys;
+package org.onap.policy.models.pdp.concepts;
 
 import lombok.NoArgsConstructor;
 import lombok.NonNull;
 import org.onap.policy.models.base.PfConceptKey;
+import org.onap.policy.models.base.PfValidationResult;
+import org.onap.policy.models.base.Validated;
 
 /**
  * Identifies a policy type. Both the name and version must be non-null.
@@ -31,6 +33,7 @@ import org.onap.policy.models.base.PfConceptKey;
 @NoArgsConstructor
 public class PolicyTypeIdent extends PfConceptKey {
     private static final long serialVersionUID = 1L;
+    private static final Validated validator = new Validated();
 
     public PolicyTypeIdent(String name, String version) {
         super(name, version);
@@ -39,4 +42,9 @@ public class PolicyTypeIdent extends PfConceptKey {
     public PolicyTypeIdent(PolicyTypeIdent source) {
         super(source);
     }
+
+    @Override
+    public PfValidationResult validate(PfValidationResult result) {
+        return super.validate(validator.validateNotNull(this, result));
+    }
 }