@@ -47,9 +47,9 @@ public interface PersistentEntity<T, P extends PersistentProperty<P>> extends It
4747 * Returns the {@link PreferredConstructor} to be used to instantiate objects of this {@link PersistentEntity}.
4848 *
4949 * @return {@literal null} in case no suitable constructor for automatic construction can be found. This usually
50- * indicates that the instantiation of the object of that persistent entity is done through either a
51- * customer {@link org.springframework.data.mapping.model.EntityInstantiator} or handled by custom
52- * conversion mechanisms entirely.
50+ * indicates that the instantiation of the object of that persistent entity is done through either a customer
51+ * {@link org.springframework.data.mapping.model.EntityInstantiator} or handled by custom conversion
52+ * mechanisms entirely.
5353 * @deprecated since 3.0, use {@link #getInstanceCreatorMetadata()}.
5454 */
5555 @ Nullable
@@ -61,8 +61,8 @@ public interface PersistentEntity<T, P extends PersistentProperty<P>> extends It
6161 *
6262 * @return {@literal null} in case no suitable creation mechanism for automatic construction can be found. This
6363 * usually indicates that the instantiation of the object of that persistent entity is done through either a
64- * customer {@link org.springframework.data.mapping.model.EntityInstantiator} or handled by custom
65- * conversion mechanisms entirely.
64+ * customer {@link org.springframework.data.mapping.model.EntityInstantiator} or handled by custom conversion
65+ * mechanisms entirely.
6666 * @since 3.0
6767 */
6868 @ Nullable
@@ -136,17 +136,17 @@ default P getRequiredIdProperty() {
136136 }
137137
138138 /**
139- * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property
140- * is available on the entity.
139+ * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property is
140+ * available on the entity.
141141 *
142142 * @return the version property of the {@link PersistentEntity}.
143143 */
144144 @ Nullable
145145 P getVersionProperty ();
146146
147147 /**
148- * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property
149- * is available on the entity.
148+ * Returns the version property of the {@link PersistentEntity}. Can be {@literal null} in case no version property is
149+ * available on the entity.
150150 *
151151 * @return the version property of the {@link PersistentEntity}.
152152 * @throws IllegalStateException if {@link PersistentEntity} does not define a {@literal version} property.
@@ -166,7 +166,7 @@ default P getRequiredVersionProperty() {
166166 /**
167167 * Obtains a {@link PersistentProperty} instance by name.
168168 *
169- * @param name The name of the property. Can be {@literal null}.
169+ * @param name the name of the property. Can be {@literal null}.
170170 * @return the {@link PersistentProperty} or {@literal null} if it doesn't exist.
171171 */
172172 @ Nullable
@@ -213,6 +213,28 @@ default P getPersistentProperty(Class<? extends Annotation> annotationType) {
213213 */
214214 Iterable <P > getPersistentProperties (Class <? extends Annotation > annotationType );
215215
216+ /**
217+ * Obtains a transient {@link PersistentProperty} instance by name. You can check with {@link #isTransient(String)}
218+ * whether there is a transient property before calling this method.
219+ *
220+ * @param name the name of the property. Can be {@literal null}.
221+ * @return the {@link PersistentProperty} or {@literal null} if it doesn't exist.
222+ * @since 3.3
223+ * @see #isTransient(String)
224+ */
225+ @ Nullable
226+ P getTransientProperty (String name );
227+
228+ /**
229+ * Returns whether the property is transient.
230+ *
231+ * @param property name of the property.
232+ * @return {@code true} if the property is transient. Applies only for existing properties. {@code false} if the
233+ * property does not exist or is not transient.
234+ * @since 3.3
235+ */
236+ boolean isTransient (String property );
237+
216238 /**
217239 * Returns whether the {@link PersistentEntity} has an id property. If this call returns {@literal true},
218240 * {@link #getIdProperty()} will return a non-{@literal null} value.
@@ -237,8 +259,8 @@ default P getPersistentProperty(Class<? extends Annotation> annotationType) {
237259 Class <T > getType ();
238260
239261 /**
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.
262+ * Returns the alias to be used when storing type information. Might be {@literal null} to indicate that there was no
263+ * alias defined through the mapping metadata.
242264 *
243265 * @return
244266 */
@@ -268,8 +290,8 @@ default P getPersistentProperty(Class<? extends Annotation> annotationType) {
268290 void doWithProperties (SimplePropertyHandler handler );
269291
270292 /**
271- * Applies the given {@link AssociationHandler} to all {@link Association} contained in this
272- * {@link PersistentEntity}. The iteration order is undefined.
293+ * Applies the given {@link AssociationHandler} to all {@link Association} contained in this {@link PersistentEntity}.
294+ * The iteration order is undefined.
273295 *
274296 * @param handler must not be {@literal null}.
275297 */
@@ -284,8 +306,8 @@ default P getPersistentProperty(Class<? extends Annotation> annotationType) {
284306 void doWithAssociations (SimpleAssociationHandler handler );
285307
286308 /**
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.
309+ * Applies the given {@link PropertyHandler} to both all {@link PersistentProperty}s as well as all inverse properties
310+ * of all {@link Association}s. The iteration order is undefined.
289311 *
290312 * @param handler must not be {@literal null}.
291313 * @since 2.5
@@ -370,7 +392,7 @@ default <A extends Annotation> A getRequiredAnnotation(Class<A> annotationType)
370392 *
371393 * @param bean must not be {@literal null}.
372394 * @throws IllegalArgumentException in case the given bean is not an instance of the typ represented by the
373- * {@link PersistentEntity}.
395+ * {@link PersistentEntity}.
374396 * @return whether the given bean is considered a new instance.
375397 */
376398 boolean isNew (Object bean );
@@ -386,8 +408,8 @@ default <A extends Annotation> A getRequiredAnnotation(Class<A> annotationType)
386408 boolean isImmutable ();
387409
388410 /**
389- * Returns whether the entity needs properties to be populated, i.e. if any property exists that's not initialized
390- * by the constructor.
411+ * Returns whether the entity needs properties to be populated, i.e. if any property exists that's not initialized by
412+ * the constructor.
391413 *
392414 * @return
393415 * @since 2.1
0 commit comments