@@ -110,7 +110,7 @@ private static void addPropertiesFrom(Class<?> returnedType, Class<?> domainType
110
110
}
111
111
112
112
private static void processEntity (PropertyPath propertyPath , Collection <PropertyPath > filteredProperties ,
113
- Predicate <Class <?>> ding ,
113
+ Predicate <Class <?>> simpleTypePredicate ,
114
114
MappingContext <?, ?> mappingContext ) {
115
115
116
116
PropertyPath leafProperty = propertyPath .getLeafProperty ();
@@ -122,11 +122,11 @@ private static void processEntity(PropertyPath propertyPath, Collection<Property
122
122
Class <?> propertyEntityType = persistentProperty .getActualType ();
123
123
124
124
// Use domain type as root type for the property path
125
- addPropertiesFromEntity (filteredProperties , propertyPath , ding , propertyEntityType , mappingContext , new HashSet <>());
125
+ addPropertiesFromEntity (filteredProperties , propertyPath , simpleTypePredicate , propertyEntityType , mappingContext , new HashSet <>());
126
126
}
127
127
128
128
private static void addPropertiesFromEntity (Collection <PropertyPath > filteredProperties , PropertyPath propertyPath ,
129
- Predicate <Class <?>> ding ,
129
+ Predicate <Class <?>> simpleTypePredicate ,
130
130
Class <?> propertyType , MappingContext <?, ?> mappingContext ,
131
131
Collection <PersistentEntity <?, ?>> processedEntities ) {
132
132
@@ -143,7 +143,7 @@ private static void addPropertiesFromEntity(Collection<PropertyPath> filteredPro
143
143
processedEntities .add (mappingContext .getPersistentEntity (pathRootType ));
144
144
}
145
145
146
- takeAllPropertiesFromEntity (filteredProperties , ding , propertyPath , mappingContext , persistentEntityFromProperty , processedEntities );
146
+ takeAllPropertiesFromEntity (filteredProperties , simpleTypePredicate , propertyPath , mappingContext , persistentEntityFromProperty , processedEntities );
147
147
}
148
148
149
149
private static boolean hasProcessedEntity (PersistentEntity <?, ?> persistentEntityFromProperty ,
@@ -153,20 +153,20 @@ private static boolean hasProcessedEntity(PersistentEntity<?, ?> persistentEntit
153
153
}
154
154
155
155
private static void takeAllPropertiesFromEntity (Collection <PropertyPath > filteredProperties ,
156
- Predicate <Class <?>> ding , PropertyPath propertyPath ,
156
+ Predicate <Class <?>> simpleTypePredicate , PropertyPath propertyPath ,
157
157
MappingContext <?, ?> mappingContext ,
158
158
PersistentEntity <?, ?> persistentEntityFromProperty ,
159
159
Collection <PersistentEntity <?, ?>> processedEntities ) {
160
160
161
161
filteredProperties .add (propertyPath );
162
162
163
163
persistentEntityFromProperty .doWithAll (persistentProperty -> {
164
- addPropertiesFromEntity (filteredProperties , propertyPath .nested (persistentProperty .getName ()), ding , mappingContext , processedEntities );
164
+ addPropertiesFromEntity (filteredProperties , propertyPath .nested (persistentProperty .getName ()), simpleTypePredicate , mappingContext , processedEntities );
165
165
});
166
166
}
167
167
168
168
private static void addPropertiesFromEntity (Collection <PropertyPath > filteredProperties , PropertyPath propertyPath ,
169
- Predicate <Class <?>> ding , MappingContext <?, ?> mappingContext ,
169
+ Predicate <Class <?>> simpleTypePredicate , MappingContext <?, ?> mappingContext ,
170
170
Collection <PersistentEntity <?, ?>> processedEntities ) {
171
171
172
172
// break the recursion / cycles
@@ -175,11 +175,11 @@ private static void addPropertiesFromEntity(Collection<PropertyPath> filteredPro
175
175
}
176
176
Class <?> propertyType = propertyPath .getLeafType ();
177
177
// simple types can get added directly to the list.
178
- if (ding .test (propertyType )) {
178
+ if (simpleTypePredicate .test (propertyType )) {
179
179
filteredProperties .add (propertyPath );
180
180
// Other types are handled also as entities because there cannot be any nested projection within a real entity.
181
181
} else if (mappingContext .hasPersistentEntityFor (propertyType )) {
182
- addPropertiesFromEntity (filteredProperties , propertyPath , ding , propertyType , mappingContext , processedEntities );
182
+ addPropertiesFromEntity (filteredProperties , propertyPath , simpleTypePredicate , propertyType , mappingContext , processedEntities );
183
183
}
184
184
}
185
185
}
0 commit comments