/** * Creates a new {@link Entry} for the given {@link Field} with the given value. * * @param field must not be {@literal null}. * @param value can be {@literal null}. * @return */ protected final Entry<String, Object> createMapEntry(Field field, @Nullable Object value) { return createMapEntry(field.getMappedKey(), value); }
/** * Creates a new {@link Entry} for the given {@link Field} with the given value. * * @param field must not be {@literal null}. * @param value can be {@literal null}. * @return */ protected final Entry<String, Object> createMapEntry(Field field, @Nullable Object value) { return createMapEntry(field.getMappedKey(), value); }
/** * Extracts the mapped object value for given field out of rawValue taking nested {@link Keyword}s into account * * @param field * @param rawValue * @return */ protected Entry<String, Object> getMappedObjectForField(Field field, Object rawValue) { String key = field.getMappedKey(); Object value; if (isNestedKeyword(rawValue) && !field.isIdField()) { Keyword keyword = new Keyword((Document) rawValue); value = getMappedKeyword(field, keyword); } else { value = getMappedValue(field, rawValue); } return createMapEntry(key, value); }
/** * Extracts the mapped object value for given field out of rawValue taking nested {@link Keyword}s into account * * @param field * @param rawValue * @return */ protected Entry<String, Object> getMappedObjectForField(Field field, Object rawValue) { String key = field.getMappedKey(); Object value; if (isNestedKeyword(rawValue) && !field.isIdField()) { Keyword keyword = new Keyword((Document) rawValue); value = getMappedKeyword(field, keyword); } else { value = getMappedValue(field, rawValue); } return createMapEntry(key, value); }