public Object toObjectDetermineType ( OResult source , OCommandContext ctx ) { String className = getClassNameForDocument ( ctx ) ; String type = getTypeForDocument ( ctx ) ; if ( className != null || ( type != null && "d" . equalsIgnoreCase ( type ) ) ) { return toDocument ( source , ctx , className ) ; } else { return toMap ( source , ctx ) ; } }
choosing return type is based on existence of