package org.openbaton.vnfm.generic.model;

import javax.persistence.*;
import org.openbaton.catalogue.mano.common.Event;

@Entity
public class VNFRErrorStatus {

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  private Long id;

  private String vnfrId;

  @Enumerated(EnumType.STRING)
  private Event event;

  private Integer scriptIndex;

  public VNFRErrorStatus() {}

  public VNFRErrorStatus(String vnfrId, Event event, Integer script) {
    this.vnfrId = vnfrId;
    this.event = event;
    this.scriptIndex = script;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Integer getScriptIndex() {
    return scriptIndex;
  }

  public void setScriptIndex(Integer scriptIndex) {
    this.scriptIndex = scriptIndex;
  }

  public String getVnfrId() {
    return vnfrId;
  }

  public void setVnfrId(String vnfrId) {
    this.vnfrId = vnfrId;
  }

  public Event getEvent() {
    return event;
  }

  public void setEvent(Event event) {
    this.event = event;
  }

  @Override
  public String toString() {
    return "VNFRErrorStatus{"
        + "id="
        + id
        + ", vnfrId='"
        + vnfrId
        + '\''
        + ", event="
        + event
        + ", scriptIndex="
        + scriptIndex
        + '}';
  }
}

@@ -118,127 +118,114 @@
 nt;%0A
-%0A@Entity%0Apublic class VNFRErrorStatus %7B%0A%0A  @Id%0A  @GeneratedValue(strategy = GenerationType.IDENTITY)%0A  private Long id;
+import org.openbaton.catalogue.util.BaseEntity;%0A%0A@Entity%0Apublic class VNFRErrorStatus extends BaseEntity %7B
 %0A%0A  
@@ -527,106 +527,8 @@
  %7D%0A%0A
-  public Long getId() %7B%0A    return id;%0A  %7D%0A%0A  public void setId(Long id) %7B%0A    this.id = id;%0A  %7D%0A%0A
   pu
@@ -1011,39 +1011,8 @@
  + %22
-id=%22%0A        + id%0A        + %22, 
 vnfr

move id to base entity