* class that allows a model with many service templates to be constructed that contains a well
* formed overall TOSCA model.
*
- * <p>Validation runs {@link ToscaModel} validation on the model and all its sub concepts.
+ * <p>Validation runs {@link JpaToscaModel} validation on the model and all its sub concepts.
*/
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Data
@EqualsAndHashCode(callSuper = true)
-public class ToscaModel extends PfModel {
+public class JpaToscaModel extends PfModel {
private static final long serialVersionUID = 8800599637708309945L;
@OneToOne(cascade = CascadeType.ALL)
- private ToscaServiceTemplates serviceTemplates;
+ private JpaToscaServiceTemplates serviceTemplates;
/**
- * The Default Constructor creates a {@link ToscaModel} object with a null concept key and
+ * The Default Constructor creates a {@link JpaToscaModel} object with a null concept key and
* creates an empty TOSCA model.
*/
- public ToscaModel() {
+ public JpaToscaModel() {
this(new PfConceptKey());
}
/**
- * The Key Constructor creates a {@link ToscaModel} object with the given concept key and
+ * The Key Constructor creates a {@link JpaToscaModel} object with the given concept key and
* creates an empty TOSCA model.
*
* @param key the TOSCA model key
*/
- public ToscaModel(final PfConceptKey key) {
- this(key, new ToscaServiceTemplates(new PfConceptKey()));
+ public JpaToscaModel(final PfConceptKey key) {
+ this(key, new JpaToscaServiceTemplates(new PfConceptKey()));
}
/**
- * Constructor that initiates a {@link ToscaModel} with all its fields.
+ * Constructor that initiates a {@link JpaToscaModel} with all its fields.
*
* @param key the TOSCA model key
* @param serviceTemplates the service templates in the event model
*/
- public ToscaModel(@NonNull final PfConceptKey key, @NonNull final ToscaServiceTemplates serviceTemplates) {
+ public JpaToscaModel(@NonNull final PfConceptKey key, @NonNull final JpaToscaServiceTemplates serviceTemplates) {
super(key);
this.serviceTemplates = serviceTemplates;
}
*
* @param copyConcept the concept to copy from
*/
- public ToscaModel(@NonNull final ToscaModel copyConcept) {
+ public JpaToscaModel(@NonNull final JpaToscaModel copyConcept) {
super(copyConcept);
}
return this.hashCode() - otherConcept.hashCode();
}
- final ToscaModel other = (ToscaModel) otherConcept;
+ final JpaToscaModel other = (JpaToscaModel) otherConcept;
if (!super.equals(other)) {
return super.compareTo(other);
}
@Override
public PfConcept copyTo(@NonNull final PfConcept targetObject) {
- Assertions.instanceOf(targetObject, ToscaModel.class);
+ Assertions.instanceOf(targetObject, JpaToscaModel.class);
- final ToscaModel copy = ((ToscaModel) targetObject);
+ final JpaToscaModel copy = ((JpaToscaModel) targetObject);
super.copyTo(targetObject);
- copy.setServiceTemplates(new ToscaServiceTemplates(serviceTemplates));
+ copy.setServiceTemplates(new JpaToscaServiceTemplates(serviceTemplates));
return copy;
}