package org.openbaton.catalogue.mano.common.faultmanagement;

import org.openbaton.catalogue.util.IdGenerator;

import javax.persistence.*;
import java.util.List;

/**
 * Created by mob on 29.10.15.
 */
@Entity
public class MonitoringParameter {

    @Id
    private String id;
    @Version
    private int version = 0;

    private Metric metric;

    @ElementCollection(fetch = FetchType.EAGER)
    private List<String> params;

    public MonitoringParameter(){}
    
    @PrePersist
    public void ensureId(){
        id= IdGenerator.createUUID();
    }
    public Metric getMetric() {
        return metric;
    }

    public void setMetric(Metric metric) {
        this.metric = metric;
    }

    public List<String> getParams() {
        return params;
    }

    public void setParams(List<String> params) {
        this.params = params;
    }
}

@@ -155,16 +155,38 @@
 il.List;
+%0Aimport java.util.Map;
 %0A%0A/**%0A *
@@ -424,21 +424,27 @@
 private 
-List%3C
+Map%3CString,
 String%3E 
@@ -733,21 +733,28 @@
  public 
-List%3C
+Map%3CString, 
 String%3E 
@@ -827,13 +827,20 @@
 ams(
-List%3C
+Map%3CString, 
 Stri
@@ -888,11 +888,280 @@
 s;%0A    %7D
+%0A%0A    @Override%0A    public String toString() %7B%0A        return %22MonitoringParameter%7B%22 +%0A                %22id='%22 + id + '%5C'' +%0A                %22, version=%22 + version +%0A                %22, metric=%22 + metric +%0A                %22, params=%22 + params +%0A                '%7D';%0A    %7D
 %0A%7D%0A

Clean files