private boolean equalsAny(String attribute, Set<? extends ExtendedAttribute<?, ?>> columnEquivalentAttributes) { StringBuilder sb = null; for (ExtendedAttribute<?, ?> columnEquivalentAttribute : columnEquivalentAttributes) { List<Attribute<?, ?>> attributePath = columnEquivalentAttribute.getAttributePath(); String attributeName; if (attributePath.size() == 1) { attributeName = attributePath.get(0).getName(); } else { if (sb == null) { sb = new StringBuilder(); } else { sb.setLength(0); } sb.append(attributePath.get(0).getName()); for (int i = 1; i < attributePath.size(); i++) { sb.append('.'); sb.append(attributePath.get(i).getName()); } attributeName = sb.toString(); } if (attribute.equals(attributeName)) { return true; } } return false; }
valuesLikeAttribute = extendedManagedType.getAttribute(attributeName); index = true; if (valuesLikeAttribute.getAttributePath().size() > 1) { ExtendedAttribute<?, ?> superAttr = extendedManagedType.getAttribute(valuesLikeAttribute.getAttributePathString().substring(0, valuesLikeAttribute.getAttributePathString().lastIndexOf('.'))); elementClass = JpaMetamodelUtils.resolveKeyClass(superAttr.getElementClass(), (MapAttribute<?, ?, ?>) valuesLikeAttribute.getAttribute());
if (!attribute.isVersion() && !attribute.isOptional()) { if ((attribute.getType() instanceof BasicType<?> || attribute.getType() instanceof EmbeddableType<?>) && extendedAttribute.getAttributePath().size() > 1) { List<Attribute<?, ?>> attributePath = extendedAttribute.getAttributePath();
if (entry.getKey().startsWith(prefix)) { if (filterCollections) { List<Attribute<?, ?>> attributePath = entry.getValue().getAttributePath(); for (int i = dotCount; i < attributePath.size(); i++) { if (attributePath.get(i).isCollection()) {
for (String attribute : attributes) { for (ExtendedAttribute<?, ?> columnEquivalentAttribute : managedType.getAttribute(associationNamePrefix + attribute).getColumnEquivalentAttributes()) { List<Attribute<?, ?>> attributePath = columnEquivalentAttribute.getAttributePath(); String attributeName; if (attributePath.size() == 1) {
final List<Attribute<?, ?>> attributePath = attributeEntry.getAttributePath(); final Attribute<?, ?> lastAttribute = attributePath.get(attributePath.size() - 1); boolean splitExpression = lastAttribute.getPersistentAttributeType() == Attribute.PersistentAttributeType.EMBEDDED;
List<PathElementExpression> paths = new ArrayList<>(expression.getExpressions().size() + 1); paths.addAll(expression.getExpressions()); for (Attribute<?, ?> attribute : extendedAttribute.getAttributePath()) { paths.add(new PropertyExpression(attribute.getName()));