class CreateCachedCollectionTask implements IDatabaseTask {

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

        try {
            Map<String, String> indexes = new HashMap<>();
            indexes.put(keyNameField.in(query), ORDERED_INDEX);
            indexes.put("isActive", ORDERED_INDEX);
            indexes.put("startDateTime", DATE_TIME_INDEX);
            indexesField.out(query, indexes);

            createCollectionTask.prepare(query);
        } catch (InvalidArgumentException | ReadValueException | ChangeValueException e) {
            throw new TaskPrepareException("Can't prepare query for create cached collection", e);
        }
    }

    public  CreateCachedCollectionTask(final IDatabaseTask createCollectionTask);

}