24
24
import org .springframework .util .Assert ;
25
25
26
26
/**
27
- * Represents a persistent entity.
27
+ * Represents a persistent entity. The order of the properties returned via the {@link Iterator} is not guaranteed.
28
28
*
29
29
* @author Oliver Gierke
30
30
* @author Graeme Rocher
@@ -136,17 +136,17 @@ default P getRequiredIdProperty() {
136
136
}
137
137
138
138
/**
139
- * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property is
140
- * available on the entity.
139
+ * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property
140
+ * is available on the entity.
141
141
*
142
142
* @return the version property of the {@link PersistentEntity}.
143
143
*/
144
144
@ Nullable
145
145
P getVersionProperty ();
146
146
147
147
/**
148
- * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property is
149
- * available on the entity.
148
+ * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property
149
+ * is available on the entity.
150
150
*
151
151
* @return the version property of the {@link PersistentEntity}.
152
152
* @throws IllegalStateException if {@link PersistentEntity} does not define a {@literal version} property.
@@ -237,8 +237,8 @@ default P getPersistentProperty(Class<? extends Annotation> annotationType) {
237
237
Class <T > getType ();
238
238
239
239
/**
240
- * Returns the alias to be used when storing type information. Might be {@literal null} to indicate that there was no
241
- * alias defined through the mapping metadata.
240
+ * Returns the alias to be used when storing type information. Might be {@literal null} to indicate that there was
241
+ * no alias defined through the mapping metadata.
242
242
*
243
243
* @return
244
244
*/
@@ -253,26 +253,39 @@ default P getPersistentProperty(Class<? extends Annotation> annotationType) {
253
253
254
254
/**
255
255
* Applies the given {@link PropertyHandler} to all {@link PersistentProperty}s contained in this
256
- * {@link PersistentEntity}.
256
+ * {@link PersistentEntity}. The iteration order is undefined.
257
257
*
258
258
* @param handler must not be {@literal null}.
259
259
*/
260
260
void doWithProperties (PropertyHandler <P > handler );
261
261
262
+ /**
263
+ * Applies the given {@link SimplePropertyHandler} to all {@link PersistentProperty}s contained in this
264
+ * {@link PersistentEntity}. The iteration order is undefined.
265
+ *
266
+ * @param handler must not be {@literal null}.
267
+ */
262
268
void doWithProperties (SimplePropertyHandler handler );
263
269
264
270
/**
265
- * Applies the given {@link AssociationHandler} to all {@link Association} contained in this {@link PersistentEntity}.
271
+ * Applies the given {@link AssociationHandler} to all {@link Association} contained in this
272
+ * {@link PersistentEntity}. The iteration order is undefined.
266
273
*
267
274
* @param handler must not be {@literal null}.
268
275
*/
269
276
void doWithAssociations (AssociationHandler <P > handler );
270
277
278
+ /**
279
+ * Applies the given {@link SimpleAssociationHandler} to all {@link Association} contained in this
280
+ * {@link PersistentEntity}. The iteration order is undefined.
281
+ *
282
+ * @param handler must not be {@literal null}.
283
+ */
271
284
void doWithAssociations (SimpleAssociationHandler handler );
272
285
273
286
/**
274
- * Applies the given {@link PropertyHandler} to both all {@link PersistentProperty}s as well as all inverse properties
275
- * of all {@link Association}s.
287
+ * Applies the given {@link PropertyHandler} to both all {@link PersistentProperty}s as well as all inverse
288
+ * properties of all {@link Association}s. The iteration order is undefined .
276
289
*
277
290
* @param handler must not be {@literal null}.
278
291
* @since 2.5
@@ -357,7 +370,7 @@ default <A extends Annotation> A getRequiredAnnotation(Class<A> annotationType)
357
370
*
358
371
* @param bean must not be {@literal null}.
359
372
* @throws IllegalArgumentException in case the given bean is not an instance of the typ represented by the
360
- * {@link PersistentEntity}.
373
+ * {@link PersistentEntity}.
361
374
* @return whether the given bean is considered a new instance.
362
375
*/
363
376
boolean isNew (Object bean );
@@ -373,8 +386,8 @@ default <A extends Annotation> A getRequiredAnnotation(Class<A> annotationType)
373
386
boolean isImmutable ();
374
387
375
388
/**
376
- * Returns whether the entity needs properties to be populated, i.e. if any property exists that's not initialized by
377
- * the constructor.
389
+ * Returns whether the entity needs properties to be populated, i.e. if any property exists that's not initialized
390
+ * by the constructor.
378
391
*
379
392
* @return
380
393
* @since 2.1
0 commit comments