se.l4.silo.query.QueryFetchResult Maven / Gradle / Ivy
The newest version!
package se.l4.silo.query;
import java.util.function.Function;
import se.l4.silo.FetchResult;
import se.l4.silo.results.TransformingQueryFetchResult;
/**
* Extension to {@link FetchResult} to support sending extra metadata in
* the result.
*
* @author Andreas Holstenson
*
* @param
*/
public interface QueryFetchResult
extends FetchResult
{
/**
* Get some metadata from this query result.
*
* @param key
* @return
*/
M getMetadata(String key);
/**
* Transform this fetch result using the given function.
*
* @param func
* @return
*/
@Override
default QueryFetchResult transform(Function func)
{
return new TransformingQueryFetchResult(this, func);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy