package com.github.cstroe.sqs.dao;

import com.github.cstroe.sqs.model.Notebook;
import com.github.cstroe.sqs.model.Note;
import com.google.common.base.Preconditions;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Collections;
import java.util.List;

@Entity
@Table(name = "notebook")
public class NotebookDao implements Notebook {
    @Id
    @GeneratedValue(strategy= GenerationType.AUTO)
    @Column(name = "id")
    private long id;

    @Column(name = "name")
    private String name;

    //private List<Note> notes;

    private NotebookDao() {}

    public NotebookDao(long id, String name) {
        Preconditions.checkArgument(id >= 0);
        Preconditions.checkNotNull(name);
        this.setId(id);
        this.setName(name);
    }

    @Override
    public long getId() {
        return id;
    }

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

    @Override
    public String getName() {
        return name;
    }

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

//    public List<Note> getNotes() {
//        return Collections.unmodifiableList(notes);
//    }

//    public void setNotes(List<Note> notes) {
//        this.notes = notes;
//    }
}

@@ -668,41 +668,8 @@
 e;%0A%0A
-    //private List%3CNote%3E notes;%0A%0A
     
@@ -1162,193 +1162,7 @@
    %7D
-%0A%0A//    public List%3CNote%3E getNotes() %7B%0A//        return Collections.unmodifiableList(notes);%0A//    %7D%0A%0A//    public void setNotes(List%3CNote%3E notes) %7B%0A//        this.notes = notes;%0A//    %7D
 %0A%7D%0A

Remove unused code.