class PostgresSearchTask implements IDatabaseTask {

    @Override
    public void prepare(final IObject query) throws TaskPrepareException {
        try {
            SearchMessage message = IOC.resolve(Keys.getOrAdd(SearchMessage.class.getCanonicalName()), query);
            collection = message.getCollectionName();
            criteria = message.getCriteria();
            callback = message.getCallback();

            preparedQuery = new QueryStatement();
            PostgresSchema.search(preparedQuery, collection, criteria);
        } catch (Exception e) {
            throw new TaskPrepareException(e);
        }
    }

    public  PostgresSearchTask(final IStorageConnection connection);

}