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 ; } } ; }
Create an extractor that extracts the property value from the node at the given position in the row .