package io.quarkus.hibernate.orm.rest.data.panache.deployment.repository;

import java.util.LinkedList;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;

@Entity
public class Collection {

    @Id
    private String name;

    @OneToMany(fetch = FetchType.EAGER, mappedBy = "collection")
    private List<Item> items = new LinkedList<>();

    public String getName() {
        return name;
    }

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

    public List<Item> getItems() {
        return items;
    }

    public void setItems(List<Item> items) {
        this.items = items;
    }
}
