Interface QueryResultTransformer<T>

  • Type Parameters:
    T - the type of the result

    public interface QueryResultTransformer<T>
    The QueryResultTransformer is used by the AssociatedContentQuery object to adapt the result set items from Resource to whatever type is needed.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Optional<T> transform​(org.apache.sling.api.resource.Resource resource)
      Transforms a Resource object to a different type.
    • Method Detail

      • transform

        java.util.Optional<T> transform​(org.apache.sling.api.resource.Resource resource)
        Transforms a Resource object to a different type.
        Parameters:
        resource - the object to transform
        Returns:
        an Optional of the requested type