class DeleteFromCachedCollectionTask implements IDatabaseTask {

    @Override
    public void prepare(final IObject query) throws TaskPrepareException {

        try {
            isActiveField.out(query, false);
            updateTask = IOC.resolve(
                Keys.getOrAdd("db.collection.upsert"),
                connection,
                collectionNameField.in(query),
                documentField.in(query)
            );
        } catch (InvalidArgumentException | ReadValueException | ChangeValueException | ResolutionException e) {
            throw new TaskPrepareException("Can't prepare query for delete from cached collection", e);
        }

    }

    public  DeleteFromCachedCollectionTask(final IStorageConnection connection);

}