@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Data
@EqualsAndHashCode(callSuper = false)
-public class ToscaTrigger extends PfConcept {
+public class JpaToscaTrigger extends PfConcept {
private static final long serialVersionUID = -6515211640208986971L;
@EmbeddedId
@Column
@SerializedName("schedule")
- private ToscaTimeInterval schedule;
+ private JpaToscaTimeInterval schedule;
@Column
@SerializedName("target_filter")
- private ToscaEventFilter targetFilter;
+ private JpaToscaEventFilter targetFilter;
@Column
- private ToscaConstraint condition;
+ private JpaToscaConstraint condition;
@Column
- private ToscaConstraint constraint;
+ private JpaToscaConstraint constraint;
@Column
@SerializedName("period")
private String action;
/**
- * The Default Constructor creates a {@link ToscaTrigger} object with a null key.
+ * The Default Constructor creates a {@link JpaToscaTrigger} object with a null key.
*/
- public ToscaTrigger() {
+ public JpaToscaTrigger() {
this(new PfReferenceKey());
}
/**
- * The Key Constructor creates a {@link ToscaTrigger} object with the given concept key.
+ * The Key Constructor creates a {@link JpaToscaTrigger} object with the given concept key.
*
* @param key the key
*/
- public ToscaTrigger(@NonNull final PfReferenceKey key) {
+ public JpaToscaTrigger(@NonNull final PfReferenceKey key) {
this(key, "", "");
}
/**
- * The full Constructor creates a {@link ToscaTrigger} object with all mandatory objects.
+ * The full Constructor creates a {@link JpaToscaTrigger} object with all mandatory objects.
*
* @param key the key
* @param eventType the event type
* @param action the trigger action
*/
- public ToscaTrigger(@NonNull final PfReferenceKey key, @NonNull final String eventType,
+ public JpaToscaTrigger(@NonNull final PfReferenceKey key, @NonNull final String eventType,
@NonNull final String action) {
this.key = key;
this.eventType = eventType;
*
* @param copyConcept the concept to copy from
*/
- public ToscaTrigger(final ToscaTrigger copyConcept) {
+ public JpaToscaTrigger(final JpaToscaTrigger copyConcept) {
super(copyConcept);
}
return this.hashCode() - otherConcept.hashCode();
}
- final ToscaTrigger other = (ToscaTrigger) otherConcept;
+ final JpaToscaTrigger other = (JpaToscaTrigger) otherConcept;
if (!key.equals(other.key)) {
return key.compareTo(other.key);
}
*
* @param other the other ToscaTrigger object
*/
- private int compareFields(final ToscaTrigger other) {
+ private int compareFields(final JpaToscaTrigger other) {
int result = ObjectUtils.compare(description, other.description);
if (result != 0) {
return result;
@Override
public PfConcept copyTo(@NonNull final PfConcept target) {
- Assertions.instanceOf(target, ToscaTrigger.class);
+ Assertions.instanceOf(target, JpaToscaTrigger.class);
- final ToscaTrigger copy = ((ToscaTrigger) target);
+ final JpaToscaTrigger copy = ((JpaToscaTrigger) target);
copy.setKey(new PfReferenceKey(key));
copy.setDescription(description);
copy.setEventType(eventType);
- copy.setSchedule(schedule != null ? new ToscaTimeInterval(schedule) : null);
- copy.setTargetFilter(targetFilter != null ? new ToscaEventFilter(targetFilter) : null);
+ copy.setSchedule(schedule != null ? new JpaToscaTimeInterval(schedule) : null);
+ copy.setTargetFilter(targetFilter != null ? new JpaToscaEventFilter(targetFilter) : null);
copy.setCondition(condition);
copy.setConstraint(constraint);
copy.setPeriod(period);