package com.github.solairerove.woodstock.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;

/**
 * Created by krivitski-no on 10/1/16.
 */
@Data
@Document
public class Task implements Serializable {

    @Id
    private String id;

    private String question;
    private Boolean enable;
    private Boolean correct;
    private Collection<? extends Ticket> tickets = new ArrayList<>();

    public Task() {
    }

    public Task(String question, Collection<? extends Ticket> tickets) {
        this.question = question;
        this.enable = true;
        this.correct = false;
        this.tickets = tickets;
    }

    public Task(String question, Boolean enable, Boolean correct, Collection<? extends Ticket> tickets) {
        this.question = question;
        this.enable = enable;
        this.correct = correct;
        this.tickets = tickets;
    }
}

@@ -718,12 +718,20 @@
 e = 
-true
+Boolean.TRUE
 ;%0A  
@@ -755,13 +755,21 @@
 t = 
-false
+Boolean.FALSE
 ;%0A  

Change primitive to object in task model