package org.project.neutrino.nfvo.catalogue.nfvo;

import org.project.neutrino.nfvo.catalogue.util.IdGenerator;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Version;

/**
 * Created by lto on 20/05/15.
 */
@Entity
public class Server {
    @Id
    private String id = IdGenerator.createUUID();
    @Version
    private int version = 0;
    private String name;
    private String extId;
    private String ip;

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

    public String getName() {
        return name;
    }

    public void setExtId(String extId) {
        this.extId = extId;
    }

    public String getExtId() {
        return extId;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getIp() {
        return ip;
    }
}

@@ -44,16 +44,90 @@
 .nfvo;%0A%0A
+import org.project.neutrino.nfvo.catalogue.mano.common.DeploymentFlavour;%0A
 import o
@@ -275,16 +275,39 @@
 Version;
+%0Aimport java.util.Date;
 %0A%0A/**%0A *
@@ -510,427 +510,2128 @@
 ate 
-String extId;%0A    private String ip;%0A%0A    public void setName(String name) %7B%0A        this.name = name;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public void setExtId(String extId) %7B%0A        this.extId = extId;%0A    %7D%0A%0A    public String getExtId() %7B%0A        return extId;%0A    %7D%0A%0A    public void setIp(String ip) %7B%0A        this.ip = ip;%0A    %7D%0A%0A    public String getIp() %7B%0A        return ip;%0A    %7D%0A%7D
+NFVImage image;%0A    private DeploymentFlavour flavor;%0A    private String status;%0A    private String extendedStatus;%0A    private String extId;%0A    private String ip;%0A    private Date created;%0A    private Date updated;%0A%0A    public String getId() %7B return id; %7D%0A%0A    public int getVersion() %7B return version; %7D%0A%0A    public void setName(String name) %7B%0A        this.name = name;%0A    %7D%0A%0A    public String getName() %7B%0A        return name;%0A    %7D%0A%0A    public String getStatus() %7B%0A        return status;%0A    %7D%0A%0A    public void setStatus(String status) %7B%0A        this.status = status;%0A    %7D%0A%0A    public void setExtId(String extId) %7B%0A        this.extId = extId;%0A    %7D%0A%0A    public String getExtId() %7B%0A        return extId;%0A    %7D%0A%0A    public void setIp(String ip) %7B%0A        this.ip = ip;%0A    %7D%0A%0A    public String getIp() %7B%0A        return ip;%0A    %7D%0A%0A    public Date getUpdated() %7B%0A        return updated;%0A    %7D%0A%0A    public void setUpdated(Date updated) %7B%0A        this.updated = updated;%0A    %7D%0A%0A    public Date getCreated() %7B%0A        return created;%0A    %7D%0A%0A    public void setCreated(Date created) %7B%0A        this.created = created;%0A    %7D%0A%0A    public String getExtendedStatus() %7B%0A        return extendedStatus;%0A    %7D%0A%0A    public void setExtendedStatus(String extendedStatus) %7B%0A        this.extendedStatus = extendedStatus;%0A    %7D%0A%0A    public NFVImage getImage() %7B%0A        return image;%0A    %7D%0A%0A    public void setImage(NFVImage image) %7B%0A        this.image = image;%0A    %7D%0A%0A    public DeploymentFlavour getFlavor() %7B%0A        return flavor;%0A    %7D%0A%0A    public void setFlavor(DeploymentFlavour flavor) %7B%0A        this.flavor = flavor;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return %22Server%7B%22 +%0A                %22id='%22 + id + '%5C'' +%0A                %22, name='%22 + name + '%5C'' +%0A                %22, status='%22 + status + '%5C'' +%0A                %22, extendedStatus='%22 + status + '%5C'' +%0A                %22, version=%22 + version +%0A                %22, extId='%22 + extId + '%5C'' +%0A                %22, ip='%22 + ip + '%5C'' +%0A                %22, created='%22 + created + '%5C'' +%0A                %22, updated='%22 + updated + '%5C'' +%0A                '%7D';%0A    %7D%0A%7D%0A
 %0A

add values: image, flavor, status, extendedStatus, created, updated; add getter/setter; updated toString()