package com.telephoners.krakyournet.ctf.repositories;

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

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class TasksRepository extends Repository<Task>
{
    @Inject
    public TasksRepository()
    {
    }

    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();*/
    }
}