package de.fau.cs.mad.kwikshop.common;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import de.fau.cs.mad.kwikshop.common.interfaces.DomainObject;

/**
 * Stores info about the deletion of a object
 */
public class DeletionInfo implements DomainObject {

    private int id;
    private int version;



    public DeletionInfo() {

    }

    public DeletionInfo(int id, int version) {
        this.id = id;
        this.version = version;
    }



    /**
     * Gets the id of the object that was deleted
     */
    @Override
    @JsonProperty("id")
    public int getId() {
        return this.id;
    }

    /**
     * Gets the id of the object that was deleted
     */
    @JsonProperty("id")
    public void setId(int value) {
        this.id = value;
    }

    /**
     * Gets the version of the object that was deleted at the time of the deletion
     */
    @JsonProperty("version")
    public int getVersion() {
        return this.version;
    }

    /**
     * Sets the version of the object that was deleted at the time of the deletion
     * @param value
     */
    @JsonProperty("version")
    public void setVersion(int value) {
        this.version = value;
    }


    @JsonIgnore
    public int getPredefinedId() {
        return 0;
    }
}

@@ -355,16 +355,45 @@
 ersion;%0A
+    private int predefinedId;
 %0A%0A%0A    p
@@ -466,16 +466,34 @@
  version
+, int predefinedId
 ) %7B%0A    
@@ -538,24 +538,66 @@
  = version;%0A
+        this.predefinedId = predefinedId;%0A
     %7D%0A%0A%0A%0A   
@@ -1339,21 +1339,53 @@
    @Json
-Ignor
+Property(%22predefinedId%22)%0A    @Overrid
 e%0A    pu
@@ -1432,9 +1432,119 @@
 urn 
-0
+this.predefinedId;%0A    %7D%0A%0A    public void setPredefinedId(int value) %7B%0A        this.predefinedId = predefinedId
 ;%0A  

Include predefinedId in DeletionInfo