class CoreTokenAdapter {

    public void deleteOnQuery(final TokenFilter filter) throws CoreTokenException, IllegalArgumentException {
        //Token ID should be always retrieved in order to be able to delete the returned tokens.
        filter.addReturnAttribute(CoreTokenField.TOKEN_ID);
        ResultHandler<Collection<PartialToken>, CoreTokenException> handler = handlerFactory.getDeleteOnQueryHandler();
        try {
            attributeQueryWithHandler(filter, handler);
        } catch (CoreTokenException e) {
            throw new QueryFailedException(filter, e);
        }
    }

    @Inject public  CoreTokenAdapter(TokenBlobStrategy strategy, TaskDispatcher dispatcher, ResultHandlerFactory handlerFactory,
                            CTSReaperInit reaperInit, @Named(CoreTokenConstants.CTS_DEBUG) Debug debug);

}