Restructure for authorative models
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaProperty.java
@@ -61,7 +61,7 @@ import org.onap.policy.models.base.PfValidationResult.ValidationResult;
 @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
 @Data
 @EqualsAndHashCode(callSuper = false)
-public class ToscaProperty extends PfConcept {
+public class JpaToscaProperty extends PfConcept {
     private static final long serialVersionUID = 1675770231921107988L;
 
     public enum Status {
@@ -89,35 +89,35 @@ public class ToscaProperty extends PfConcept {
     private Status status = Status.SUPPORTED;
 
     @ElementCollection
-    private List<ToscaConstraint> constraints;
+    private List<JpaToscaConstraint> constraints;
 
     @Column
     @SerializedName("entry_schema")
-    private ToscaEntrySchema entrySchema;
+    private JpaToscaEntrySchema entrySchema;
 
     /**
-     * The Default Constructor creates a {@link ToscaProperty} object with a null key.
+     * The Default Constructor creates a {@link JpaToscaProperty} object with a null key.
      */
-    public ToscaProperty() {
+    public JpaToscaProperty() {
         this(new PfReferenceKey());
     }
 
     /**
-     * The Key Constructor creates a {@link ToscaProperty} object with the given concept key.
+     * The Key Constructor creates a {@link JpaToscaProperty} object with the given concept key.
      *
      * @param key the key
      */
-    public ToscaProperty(@NonNull final PfReferenceKey key) {
+    public JpaToscaProperty(@NonNull final PfReferenceKey key) {
         this(key, new PfConceptKey());
     }
 
     /**
-     * The Key Constructor creates a {@link ToscaProperty} object with the given concept key.
+     * The Key Constructor creates a {@link JpaToscaProperty} object with the given concept key.
      *
      * @param key the key
      * @param type the key of the property type
      */
-    public ToscaProperty(@NonNull final PfReferenceKey key, @NonNull final PfConceptKey type) {
+    public JpaToscaProperty(@NonNull final PfReferenceKey key, @NonNull final PfConceptKey type) {
         this.key = key;
         this.type = type;
     }
@@ -127,7 +127,7 @@ public class ToscaProperty extends PfConcept {
      *
      * @param copyConcept the concept to copy from
      */
-    public ToscaProperty(final ToscaProperty copyConcept) {
+    public JpaToscaProperty(final JpaToscaProperty copyConcept) {
         super(copyConcept);
     }
 
@@ -138,7 +138,7 @@ public class ToscaProperty extends PfConcept {
         keyList.addAll(type.getKeys());
 
         if (constraints != null) {
-            for (ToscaConstraint constraint : constraints) {
+            for (JpaToscaConstraint constraint : constraints) {
                 keyList.addAll(constraint.getKeys());
             }
         }
@@ -165,7 +165,7 @@ public class ToscaProperty extends PfConcept {
         }
 
         if (constraints != null) {
-            for (ToscaConstraint constraint : constraints) {
+            for (JpaToscaConstraint constraint : constraints) {
                 constraint.clean();
             }
         }
@@ -214,7 +214,7 @@ public class ToscaProperty extends PfConcept {
         }
 
         if (constraints != null) {
-            for (ToscaConstraint constraint : constraints) {
+            for (JpaToscaConstraint constraint : constraints) {
                 if (constraint == null) {
                     result.addValidationMessage(new PfValidationMessage(key, this.getClass(), ValidationResult.INVALID,
                             "property constraint may not be null "));
@@ -238,7 +238,7 @@ public class ToscaProperty extends PfConcept {
             return this.hashCode() - otherConcept.hashCode();
         }
 
-        final ToscaProperty other = (ToscaProperty) otherConcept;
+        final JpaToscaProperty other = (JpaToscaProperty) otherConcept;
         if (!key.equals(other.key)) {
             return key.compareTo(other.key);
         }
@@ -252,7 +252,7 @@ public class ToscaProperty extends PfConcept {
      *
      * @param other the other ToscaProperty object
      */
-    private int compareFields(final ToscaProperty other) {
+    private int compareFields(final JpaToscaProperty other) {
         if (!type.equals(other.type)) {
             return type.compareTo(other.type);
         }
@@ -287,9 +287,9 @@ public class ToscaProperty extends PfConcept {
 
     @Override
     public PfConcept copyTo(@NonNull final PfConcept target) {
-        Assertions.instanceOf(target, ToscaProperty.class);
+        Assertions.instanceOf(target, JpaToscaProperty.class);
 
-        final ToscaProperty copy = ((ToscaProperty) target);
+        final JpaToscaProperty copy = ((JpaToscaProperty) target);
         copy.setKey(new PfReferenceKey(key));
         copy.setType(new PfConceptKey(type));
         copy.setDescription(description);
@@ -297,7 +297,7 @@ public class ToscaProperty extends PfConcept {
         copy.setDefaultValue(defaultValue);
         copy.setStatus(status);
         copy.constraints = constraints; // Constraints are immutable
-        copy.setEntrySchema(entrySchema != null ? new ToscaEntrySchema(entrySchema) : null);
+        copy.setEntrySchema(entrySchema != null ? new JpaToscaEntrySchema(entrySchema) : null);
 
         return copy;
     }