/*
 * Copyright 2013 - Elian ORIOU
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.vino.backend.model;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import org.jongo.marshall.jackson.oid.Id;
import org.jongo.marshall.jackson.oid.ObjectId;

/**
 * User: walien
 * Date: 1/7/14
 * Time: 9:41 PM
 */

@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public abstract class Entity {

    // It seems to be an issue on Jongo... This field will be temporarly public...
    @ObjectId
    @Id
    public String key;

    public Entity() {

    }

    public Entity setKey(String key) {
        this.key = key;
        return this;
    }

    public String getKey() {
        return this.key;
    }
}

@@ -961,91 +961,8 @@
  %7B%0A%0A
-    // It seems to be an issue on Jongo... This field will be temporarly public...%0A
     
@@ -980,29 +980,30 @@
    @Id%0A    p
-ublic
+rivate
  String key;
@@ -1008,38 +1008,8 @@
 y;%0A%0A
-    public Entity() %7B%0A%0A    %7D%0A%0A
     

Change key attribute to private after Jongo version changes