code: public static ExtractFromRow extractPropertyValue( final Name propertyName,
                                                         final int indexInRow,
                                                         final NodeCache cache,
                                                         final TypeFactory<?> desiredType ) {
          return new ExtractFromRow() {
              @Override
              public Object getValueInRow( RowAccessor row ) {
                  CachedNode node = row.getNode(indexInRow);
                  if (node == null) return null;
                  org.modeshape.jcr.value.Property prop = node.getProperty(propertyName, cache);
                  return prop == null ? null : desiredType.create(prop.getFirstValue());
              }
  
              @Override
              public TypeFactory<?> getType() {
                  return desiredType;
              }
          };
      }
docs: Create an extractor that extracts the property value from the node at the given position in the row.
  
  @param propertyName the name of the property; may not be null
  @param indexInRow the index of the node in the rows; must be valid
  @param cache the cache containing the nodes; may not be null
  @param desiredType the desired type, which should be converted from the actual value; may not be null
  @return the path extractor; never null