(nestedProperty != null ? PropertyAccessorUtils.getPropertyName(nestedProperty) : null); if (this.customEditors != null) { this.customEditors.forEach(target::registerCustomEditor);
(nestedProperty != null ? PropertyAccessorUtils.getPropertyName(nestedProperty) : null); if (this.customEditors != null) { this.customEditors.forEach(target::registerCustomEditor);
int index = PropertyAccessorUtils.getFirstNestedPropertySeparatorIndex(expression); String nestedProperty = index != -1 ? expression.substring(0, index) : expression; nestedProperty = PropertyAccessorUtils.getPropertyName(nestedProperty); propertyNames.add(nestedProperty); if (index == -1) {
(nestedProperty != null ? PropertyAccessorUtils.getPropertyName(nestedProperty) : null); if (this.customEditors != null) { for (Map.Entry<Class<?>, PropertyEditor> entry : this.customEditors.entrySet()) {
/** * @param value the original value, must not be {@literal null}.. * @param segment the property segment to look up, must not be {@literal null} or empty. * @return */ private Object lookupValueOn(Object value, String segment) { PersistentProperty<?> property = entities.getPersistentEntity(value.getClass()) // .map(it -> it.getPersistentProperty(PropertyAccessorUtils.getPropertyName(segment))) // .orElseThrow(() -> new NotReadablePropertyException(value.getClass(), segment)); ConfigurablePropertyAccessor accessor = property.usePropertyAccess() // ? PropertyAccessorFactory.forBeanPropertyAccess(value) // : PropertyAccessorFactory.forDirectFieldAccess(value); return accessor.getPropertyValue(segment); } };
/** * Gets indexes that have been modified. * * <p> * Returns a set of indexes which have been modified in the given collection. If the returned set contains * {@link java.lang.Integer#MAX_VALUE} then it means that it should be treated as if all items in the collection * have been modified. * </p> * * @return indexes which have been modified in the given collection */ private Set<Integer> extractModifiedIndicies(DataObjectCollection collectionMetadata, Map<String, Set<String>> decomposedPaths) { String relationshipName = collectionMetadata.getName(); Set<Integer> modifiedIndicies = Sets.newHashSet(); // if it contains *exactly* the collection relationship name, then indicate that all items modified if (decomposedPaths.containsKey(relationshipName)) { modifiedIndicies.add(Integer.valueOf(Integer.MAX_VALUE)); } for (String propertyName : decomposedPaths.keySet()) { if (relationshipName.equals(PropertyAccessorUtils.getPropertyName(relationshipName))) { Integer index = extractIndex(propertyName); if (index != null) { modifiedIndicies.add(index); } } } return modifiedIndicies; }
(nestedProperty != null ? PropertyAccessorUtils.getPropertyName(nestedProperty) : null); if (this.customEditors != null) { for (Iterator it = this.customEditors.entrySet().iterator(); it.hasNext();) {
int index = PropertyAccessorUtils.getFirstNestedPropertySeparatorIndex(expression); String nestedProperty = index != -1 ? expression.substring(0, index) : expression; nestedProperty = PropertyAccessorUtils.getPropertyName(nestedProperty); propertyNames.add(nestedProperty); if (index == -1) {
(nestedProperty != null ? PropertyAccessorUtils.getPropertyName(nestedProperty) : null); if (this.customEditors != null) { for (Map.Entry<Class<?>, PropertyEditor> entry : this.customEditors.entrySet()) {
/** * <p>Constructor for PropertyPath.</p> * * @param nestedPath a {@link java.lang.String} object. */ public PropertyPath(String nestedPath) { String canonicalPath = PropertyAccessorUtils.canonicalPropertyName(nestedPath); int lastIndex = PropertyAccessorUtils.getLastNestedPropertySeparatorIndex(canonicalPath); if (lastIndex < 0) { propertyName = PropertyAccessorUtils.getPropertyName(canonicalPath); key = computeKey(canonicalPath); } else { parent = new PropertyPath(canonicalPath.substring(0, lastIndex)); String lastProperty = canonicalPath.substring(lastIndex+1); propertyName = PropertyAccessorUtils.getPropertyName(lastProperty); key = computeKey(lastProperty); } }