Restructure for authorative models
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaDataType.java
@@ -56,28 +56,28 @@ import org.onap.policy.models.base.PfValidationResult.ValidationResult;
 @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
 @Data
 @EqualsAndHashCode(callSuper = true)
-public class ToscaDataType extends ToscaEntityType {
+public class JpaToscaDataType extends JpaToscaEntityType {
     private static final long serialVersionUID = -3922690413436539164L;
 
     @ElementCollection
-    private List<ToscaConstraint> constraints;
+    private List<JpaToscaConstraint> constraints;
 
     @ElementCollection
-    private List<ToscaProperty> properties;
+    private List<JpaToscaProperty> properties;
 
     /**
-     * The Default Constructor creates a {@link ToscaDataType} object with a null key.
+     * The Default Constructor creates a {@link JpaToscaDataType} object with a null key.
      */
-    public ToscaDataType() {
+    public JpaToscaDataType() {
         this(new PfConceptKey());
     }
 
     /**
-     * The Key Constructor creates a {@link ToscaDataType} object with the given concept key.
+     * The Key Constructor creates a {@link JpaToscaDataType} object with the given concept key.
      *
      * @param key the key
      */
-    public ToscaDataType(@NonNull final PfConceptKey key) {
+    public JpaToscaDataType(@NonNull final PfConceptKey key) {
         super(key);
     }
 
@@ -86,7 +86,7 @@ public class ToscaDataType extends ToscaEntityType {
      *
      * @param copyConcept the concept to copy from
      */
-    public ToscaDataType(final ToscaDataType copyConcept) {
+    public JpaToscaDataType(final JpaToscaDataType copyConcept) {
         super(copyConcept);
     }
 
@@ -95,13 +95,13 @@ public class ToscaDataType extends ToscaEntityType {
         final List<PfKey> keyList = super.getKeys();
 
         if (constraints != null) {
-            for (ToscaConstraint constraint : constraints) {
+            for (JpaToscaConstraint constraint : constraints) {
                 keyList.addAll(constraint.getKeys());
             }
         }
 
         if (properties != null) {
-            for (ToscaProperty property : properties) {
+            for (JpaToscaProperty property : properties) {
                 keyList.addAll(property.getKeys());
             }
         }
@@ -114,13 +114,13 @@ public class ToscaDataType extends ToscaEntityType {
         super.clean();
 
         if (constraints != null) {
-            for (ToscaConstraint constraint : constraints) {
+            for (JpaToscaConstraint constraint : constraints) {
                 constraint.clean();
             }
         }
 
         if (properties != null) {
-            for (ToscaProperty property : properties) {
+            for (JpaToscaProperty property : properties) {
                 property.clean();
             }
         }
@@ -150,7 +150,7 @@ public class ToscaDataType extends ToscaEntityType {
     private PfValidationResult validateConstraints(@NonNull final PfValidationResult resultIn) {
         PfValidationResult result = resultIn;
 
-        for (ToscaConstraint constraint : constraints) {
+        for (JpaToscaConstraint constraint : constraints) {
             if (constraint == null) {
                 result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
                         "data type constraint may not be null "));
@@ -170,7 +170,7 @@ public class ToscaDataType extends ToscaEntityType {
     private PfValidationResult validateProperties(final PfValidationResult resultIn) {
         PfValidationResult result = resultIn;
 
-        for (ToscaProperty property : properties) {
+        for (JpaToscaProperty property : properties) {
             if (property == null) {
                 result.addValidationMessage(new PfValidationMessage(getKey(), this.getClass(), ValidationResult.INVALID,
                         "data type property may not be null "));
@@ -193,7 +193,7 @@ public class ToscaDataType extends ToscaEntityType {
             return this.hashCode() - otherConcept.hashCode();
         }
 
-        final ToscaDataType other = (ToscaDataType) otherConcept;
+        final JpaToscaDataType other = (JpaToscaDataType) otherConcept;
         if (!super.equals(other)) {
             return super.compareTo(other);
         }
@@ -216,15 +216,15 @@ public class ToscaDataType extends ToscaEntityType {
         final Object copyObject = target;
         Assertions.instanceOf(copyObject, PfConcept.class);
 
-        final ToscaDataType copy = ((ToscaDataType) copyObject);
+        final JpaToscaDataType copy = ((JpaToscaDataType) copyObject);
         super.copyTo(target);
 
         if (constraints == null) {
             copy.setConstraints(null);
         }
         else {
-            final List<ToscaConstraint> newConstraints = new ArrayList<>();
-            for (final ToscaConstraint constraint : constraints) {
+            final List<JpaToscaConstraint> newConstraints = new ArrayList<>();
+            for (final JpaToscaConstraint constraint : constraints) {
                 newConstraints.add(constraint); // Constraints are immutable
             }
             copy.setConstraints(newConstraints);
@@ -234,9 +234,9 @@ public class ToscaDataType extends ToscaEntityType {
             copy.setProperties(null);
         }
         else {
-            final List<ToscaProperty> newProperties = new ArrayList<>();
-            for (final ToscaProperty property : properties) {
-                newProperties.add(new ToscaProperty(property));
+            final List<JpaToscaProperty> newProperties = new ArrayList<>();
+            for (final JpaToscaProperty property : properties) {
+                newProperties.add(new JpaToscaProperty(property));
             }
             copy.setProperties(newProperties);
         }