public function getById($id = null)
    {
        if ($id === null) {
            throw new ItemNotSelectedException;
        }
        $entity = $this->repository->findById($id);
        if (!$entity) {
            throw new NonexistingItemException;
        }
        return $entity;
    }