public static Object getFieldNull ( Record record , String fieldPath ) { Field f = record . get ( fieldPath ) ; if ( f != null ) { return f . getValue ( ) == null ? getTypedNullFromField ( f ) : f . getValue ( ) ; } return null ; }
Receive record and fieldPath from scripting processor . It resolves type of the field and if value is null it returns one of the NULL_XXX objects defined in this class . If field value is not null it returns the value stored in the field .