Restructure for authorative models
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / simple / concepts / JpaToscaEntrySchema.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 ToscaEntrySchema extends PfConcept {
+public class JpaToscaEntrySchema extends PfConcept {
     private static final long serialVersionUID = 3645882081163287058L;
 
     @EmbeddedId
@@ -74,31 +74,31 @@ public class ToscaEntrySchema extends PfConcept {
     private String description;
 
     @ElementCollection
-    private List<ToscaConstraint> constraints;
+    private List<JpaToscaConstraint> constraints;
 
     /**
-     * The Default Constructor creates a {@link ToscaEntrySchema} object with a null key.
+     * The Default Constructor creates a {@link JpaToscaEntrySchema} object with a null key.
      */
-    public ToscaEntrySchema() {
+    public JpaToscaEntrySchema() {
         this(new PfReferenceKey());
     }
 
     /**
-     * The Key Constructor creates a {@link ToscaEntrySchema} object with the given concept key.
+     * The Key Constructor creates a {@link JpaToscaEntrySchema} object with the given concept key.
      *
      * @param key the key
      */
-    public ToscaEntrySchema(@NonNull final PfReferenceKey key) {
+    public JpaToscaEntrySchema(@NonNull final PfReferenceKey key) {
         this(key, new PfConceptKey());
     }
 
     /**
-     * The full constructor creates a {@link ToscaEntrySchema} object with mandatory fields.
+     * The full constructor creates a {@link JpaToscaEntrySchema} object with mandatory fields.
      *
      * @param key the key
      * @param type the type of the entry schema
      */
-    public ToscaEntrySchema(@NonNull final PfReferenceKey key, @NonNull final PfConceptKey type) {
+    public JpaToscaEntrySchema(@NonNull final PfReferenceKey key, @NonNull final PfConceptKey type) {
         this.key = key;
         this.type = type;
     }
@@ -108,7 +108,7 @@ public class ToscaEntrySchema extends PfConcept {
      *
      * @param copyConcept the concept to copy from
      */
-    public ToscaEntrySchema(final ToscaEntrySchema copyConcept) {
+    public JpaToscaEntrySchema(final JpaToscaEntrySchema copyConcept) {
         super(copyConcept);
     }
 
@@ -119,7 +119,7 @@ public class ToscaEntrySchema extends PfConcept {
         keyList.addAll(type.getKeys());
 
         if (constraints != null) {
-            for (ToscaConstraint constraint : constraints) {
+            for (JpaToscaConstraint constraint : constraints) {
                 keyList.addAll(constraint.getKeys());
             }
         }
@@ -135,7 +135,7 @@ public class ToscaEntrySchema extends PfConcept {
         description = (description != null ? description.trim() : null);
 
         if (constraints != null) {
-            for (ToscaConstraint constraint : constraints) {
+            for (JpaToscaConstraint constraint : constraints) {
                 constraint.clean();
             }
         }
@@ -164,7 +164,7 @@ public class ToscaEntrySchema 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 "));
@@ -189,7 +189,7 @@ public class ToscaEntrySchema extends PfConcept {
             return this.hashCode() - otherConcept.hashCode();
         }
 
-        final ToscaEntrySchema other = (ToscaEntrySchema) otherConcept;
+        final JpaToscaEntrySchema other = (JpaToscaEntrySchema) otherConcept;
         if (!key.equals(other.key)) {
             return key.compareTo(other.key);
         }
@@ -208,16 +208,16 @@ public class ToscaEntrySchema extends PfConcept {
 
     @Override
     public PfConcept copyTo(@NonNull final PfConcept target) {
-        Assertions.instanceOf(target, ToscaEntrySchema.class);
+        Assertions.instanceOf(target, JpaToscaEntrySchema.class);
 
-        final ToscaEntrySchema copy = ((ToscaEntrySchema) target);
+        final JpaToscaEntrySchema copy = ((JpaToscaEntrySchema) target);
         copy.setKey(new PfReferenceKey(key));
         copy.setType(new PfConceptKey(type));
         copy.setDescription(description);
 
         if (constraints != null) {
-            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);