package com.telephoners.krakyournet.ctf.repositories;

import com.sun.tools.javac.util.List;
import com.telephoners.krakyournet.ctf.beans.tasks.Task;
import org.ektorp.CouchDbConnector;

public class TasksRepository extends Repository<Task>
{
    public TasksRepository(Class<Task> type, CouchDbConnector connector)
    {
        super(type, connector);
    }

    public Task getByLevel(int level)
    {
        return null;
        /*
        return datastore.createQuery(Task.class)
                .filter("level", level)
                .asList()
                .stream()
                .findFirst()
                .orElseThrow(TaskNotFoundException::new);*/
    }

    public List<Task> getAllPublic()
    {
        return null;/*
        return datastore.createQuery(Task.class)
                .order("level")
                .retrievedFields(true, DBObjectUtils.getPublicFields(Task.class))
                .asList();*/
    }
}