class LdapAdapter implements TokenStorageAdapter<Connection> {

    @Override
    public Collection<PartialToken> partialQuery(Connection connection, TokenFilter query) throws DataLayerException {
        try {
            return queryFactory.createInstance()
                    .returnTheseAttributes(query.getReturnFields())
                    .withFilter(query.getQuery().accept(queryConverter, null))
                    .executeAttributeQuery(connection).next();
        } catch (DataLayerRuntimeException e) {
            throw new DataLayerException("Error during partial query", e);
        }
    }

    @Inject public  LdapAdapter(LdapTokenAttributeConversion conversion, LdapQueryFilterVisitor queryConverter,
            LdapQueryFactory queryFactory);

}