DATACMNS-1161 - Renamed PersistentProperty.getPersitentEntityType(…) to ….getPersitentEntityTypes(…).
The new name currently delegates to old version, so classes only implementing the old method still work. Old name is deprecated. Original pull request: #243.
This commit is contained in:
committed by
Oliver Gierke
parent
404610ebb4
commit
ea03388a7c
@@ -30,6 +30,7 @@ import org.springframework.lang.Nullable;
|
||||
* @author Jon Brisbin
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
* @author Jens Schauder
|
||||
*/
|
||||
public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
|
||||
@@ -61,6 +62,16 @@ public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
*/
|
||||
TypeInformation<?> getTypeInformation();
|
||||
|
||||
/**
|
||||
* Returns the {@link TypeInformation} if the property references a {@link PersistentEntity}. Will return
|
||||
* {@literal null} in case it refers to a simple type. Will return {@link Collection}'s component type or the
|
||||
* {@link Map}'s value type transparently.
|
||||
*
|
||||
* @Deprecated Use getPersistentEntityTypes instead.
|
||||
*/
|
||||
@Deprecated
|
||||
Iterable<? extends TypeInformation<?>> getPersistentEntityType();
|
||||
|
||||
/**
|
||||
* Returns the {@link TypeInformation} if the property references a {@link PersistentEntity}. Will return
|
||||
* {@literal null} in case it refers to a simple type. Will return {@link Collection}'s component type or the
|
||||
@@ -68,7 +79,9 @@ public interface PersistentProperty<P extends PersistentProperty<P>> {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Iterable<? extends TypeInformation<?>> getPersistentEntityType();
|
||||
default Iterable<? extends TypeInformation<?>> getPersistentEntityTypes() {
|
||||
return getPersistentEntityType();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the getter method to access the property value if available. Might return {@literal null} in case there is
|
||||
|
||||
@@ -554,7 +554,7 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
return;
|
||||
}
|
||||
|
||||
property.getPersistentEntityType().forEach(AbstractMappingContext.this::addPersistentEntity);
|
||||
property.getPersistentEntityTypes().forEach(AbstractMappingContext.this::addPersistentEntity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,6 +133,7 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getPersistentEntityType()
|
||||
*/
|
||||
@Deprecated
|
||||
@Override
|
||||
public Iterable<? extends TypeInformation<?>> getPersistentEntityType() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user