package org.openbaton.catalogue.security;

import org.openbaton.catalogue.nfvo.Quota;
import org.openbaton.catalogue.util.IdGenerator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.PrePersist;
import java.io.Serializable;

/**
 * Created by lto on 24/05/16.
 */
@Entity
public class Project implements Serializable{
    @Id
    private String id;
    @Column(unique = true)
    private String name;
    private Quota quota;

    public String getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Override
    public String toString() {
        return "Project{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", quota=" + quota +
                '}';
    }

    public Quota getQuota() {
        return quota;
    }

    public void setQuota(Quota quota) {
        this.quota = quota;
    }

    @PrePersist
    public void ensureId() {
        id = IdGenerator.createUUID();
    }

}

@@ -154,22 +154,17 @@
 istence.
-Column
+*
 ;%0Aimport
@@ -172,123 +172,17 @@
 java
-x.persistence.Entity;%0Aimport javax.persistence.Id;%0Aimport javax.persistence.PrePersist;%0Aimport java.io.Serializable
+.util.Set
 ;%0A%0A/

update project and user