@@ -134,10 +134,6 @@ public final class Alias {
|
||||
return isPresent() && type.isInstance(value) ? (T) value : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return isPresent() ? value.toString() : "NONE";
|
||||
@@ -147,10 +143,6 @@ public final class Alias {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -165,10 +157,6 @@ public final class Alias {
|
||||
return ObjectUtils.nullSafeEquals(value, alias.value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(value);
|
||||
|
||||
@@ -286,10 +286,6 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> {
|
||||
return this.hasSpelExpression.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -316,10 +312,6 @@ public class PreferredConstructor<T, P extends PersistentProperty<P>> {
|
||||
return ObjectUtils.nullSafeEquals(entity, parameter.entity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
var result = ObjectUtils.nullSafeHashCode(name);
|
||||
|
||||
@@ -213,10 +213,6 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
return PropertyPath.from(lookup, owningType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Iterable#iterator()
|
||||
*/
|
||||
public Iterator<PropertyPath> iterator() {
|
||||
|
||||
return new Iterator<PropertyPath>() {
|
||||
@@ -246,10 +242,6 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -284,10 +276,6 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
return ObjectUtils.nullSafeEquals(next, that.next);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
var result = ObjectUtils.nullSafeHashCode(owningType);
|
||||
@@ -473,10 +461,6 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("%s.%s", owningType.getType().getSimpleName(), toDotPath());
|
||||
@@ -504,10 +488,6 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -526,10 +506,6 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
return ObjectUtils.nullSafeEquals(path, key.path);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
var result = ObjectUtils.nullSafeHashCode(type);
|
||||
@@ -537,10 +513,6 @@ public class PropertyPath implements Streamable<PropertyPath> {
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PropertyPath.Key(type=" + this.getType() + ", path=" + this.getPath() + ")";
|
||||
|
||||
@@ -92,10 +92,6 @@ public class PropertyReferenceException extends RuntimeException {
|
||||
return propertyMatches.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Throwable#getMessage()
|
||||
*/
|
||||
@Override
|
||||
public String getMessage() {
|
||||
|
||||
|
||||
@@ -32,10 +32,6 @@ public abstract class TargetAwareIdentifierAccessor implements IdentifierAccesso
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.IdentifierAccessor#getRequiredIdentifier()
|
||||
*/
|
||||
@Override
|
||||
public Object getRequiredIdentifier() {
|
||||
|
||||
|
||||
@@ -59,10 +59,6 @@ class DefaultEntityCallbacks implements EntityCallbacks {
|
||||
this.callbackDiscoverer = new EntityCallbackDiscoverer(beanFactory);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.callback.EntityCallbacks#callback(java.lang.Class, java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> T callback(Class<? extends EntityCallback> callbackType, T entity, Object... args) {
|
||||
|
||||
@@ -91,10 +87,6 @@ class DefaultEntityCallbacks implements EntityCallbacks {
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.callback.EntityCallbacks#addEntityCallback(org.springframework.data.mapping.callback.EntityCallback)
|
||||
*/
|
||||
@Override
|
||||
public void addEntityCallback(EntityCallback<?> callback) {
|
||||
this.callbackDiscoverer.addEntityCallback(callback);
|
||||
|
||||
@@ -60,10 +60,6 @@ class DefaultReactiveEntityCallbacks implements ReactiveEntityCallbacks {
|
||||
this.callbackDiscoverer = new EntityCallbackDiscoverer(beanFactory);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.callback.ReactiveEntityCallbacks#callback(java.lang.Class, java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> Mono<T> callback(Class<? extends EntityCallback> callbackType, T entity, Object... args) {
|
||||
|
||||
@@ -94,10 +90,6 @@ class DefaultReactiveEntityCallbacks implements ReactiveEntityCallbacks {
|
||||
return deferredCallbackChain;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.callback.EntityCallbacks#addEntityCallback(org.springframework.data.mapping.callback.EntityCallback)
|
||||
*/
|
||||
@Override
|
||||
public void addEntityCallback(EntityCallback<?> callback) {
|
||||
this.callbackDiscoverer.addEntityCallback(callback);
|
||||
|
||||
@@ -415,10 +415,6 @@ class EntityCallbackDiscoverer {
|
||||
this.entityType = entityType;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
|
||||
@@ -432,10 +428,6 @@ class EntityCallbackDiscoverer {
|
||||
&& ObjectUtils.nullSafeEquals(this.entityType, otherKey.entityType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.callbackType.hashCode() * 17 + ObjectUtils.nullSafeHashCode(this.entityType);
|
||||
|
||||
@@ -121,19 +121,11 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
instantiators);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationEventPublisherAware#setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
|
||||
this.applicationEventPublisher = applicationEventPublisher;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
|
||||
@@ -178,10 +170,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
this.simpleTypeHolder = simpleTypes;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MappingContext#getPersistentEntities()
|
||||
*/
|
||||
@Override
|
||||
public Collection<E> getPersistentEntities() {
|
||||
|
||||
@@ -198,19 +186,11 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MappingContext#getPersistentEntity(java.lang.Class)
|
||||
*/
|
||||
@Nullable
|
||||
public E getPersistentEntity(Class<?> type) {
|
||||
return getPersistentEntity(ClassTypeInformation.from(type));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.MappingContext#hasPersistentEntityFor(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasPersistentEntityFor(Class<?> type) {
|
||||
|
||||
@@ -221,10 +201,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
return entity == null ? false : entity.isPresent();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MappingContext#getPersistentEntity(org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public E getPersistentEntity(TypeInformation<?> type) {
|
||||
@@ -264,10 +240,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
return addPersistentEntity(type).orElse(null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.MappingContext#getPersistentEntity(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public E getPersistentEntity(P persistentProperty) {
|
||||
@@ -282,28 +254,16 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
return getPersistentEntity(typeInfo.getRequiredActualType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.MappingContext#getPersistentPropertyPath(java.lang.Class, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public PersistentPropertyPath<P> getPersistentPropertyPath(PropertyPath propertyPath) {
|
||||
return persistentPropertyPathFactory.from(propertyPath);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.MappingContext#getPersistentPropertyPath(java.lang.String, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public PersistentPropertyPath<P> getPersistentPropertyPath(String propertyPath, Class<?> type) {
|
||||
return persistentPropertyPathFactory.from(type, propertyPath);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.MappingContext#findPersistentPropertyPath(java.lang.Class, java.util.function.Predicate)
|
||||
*/
|
||||
@Override
|
||||
public <T> PersistentPropertyPaths<T, P> findPersistentPropertyPaths(Class<T> type, Predicate<? super P> predicate) {
|
||||
|
||||
@@ -439,10 +399,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentEntityAware#getManagedTypes()
|
||||
*/
|
||||
@Override
|
||||
public Collection<TypeInformation<?>> getManagedTypes() {
|
||||
|
||||
@@ -475,10 +431,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
*/
|
||||
protected abstract P createPersistentProperty(Property property, E owner, SimpleTypeHolder simpleTypeHolder);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
initialize();
|
||||
@@ -536,10 +488,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
this.remainingDescriptors = remainingDescriptors;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.util.ReflectionUtils.FieldCallback#doWith(java.lang.reflect.Field)
|
||||
*/
|
||||
public void doWith(Field field) {
|
||||
|
||||
var fieldName = field.getName();
|
||||
@@ -706,10 +654,6 @@ public abstract class AbstractMappingContext<E extends MutablePersistentEntity<?
|
||||
UNMAPPED_PROPERTIES = Streamable.of(matches);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.util.ReflectionUtils.FieldFilter#matches(java.lang.reflect.Field)
|
||||
*/
|
||||
public boolean matches(Field field) {
|
||||
|
||||
if (Modifier.isStatic(field.getModifiers())) {
|
||||
|
||||
@@ -91,37 +91,21 @@ class DefaultPersistentPropertyPath<P extends PersistentProperty<P>> implements
|
||||
return new DefaultPersistentPropertyPath<>(properties);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#toDotPath()
|
||||
*/
|
||||
@Nullable
|
||||
public String toDotPath() {
|
||||
return toPath(DEFAULT_DELIMITER, DEFAULT_CONVERTER);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#toDotPath(org.springframework.core.convert.converter.Converter)
|
||||
*/
|
||||
@Nullable
|
||||
public String toDotPath(Converter<? super P, String> converter) {
|
||||
return toPath(DEFAULT_DELIMITER, converter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#toPath(java.lang.String)
|
||||
*/
|
||||
@Nullable
|
||||
public String toPath(String delimiter) {
|
||||
return toPath(delimiter, DEFAULT_CONVERTER);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#toPath(java.lang.String, org.springframework.core.convert.converter.Converter)
|
||||
*/
|
||||
@Nullable
|
||||
public String toPath(String delimiter, Converter<? super P, String> converter) {
|
||||
|
||||
@@ -136,28 +120,16 @@ class DefaultPersistentPropertyPath<P extends PersistentProperty<P>> implements
|
||||
return result.isEmpty() ? null : result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#getLeafProperty()
|
||||
*/
|
||||
@Nullable
|
||||
public P getLeafProperty() {
|
||||
return properties.isEmpty() ? null : properties.get(properties.size() - 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#getBaseProperty()
|
||||
*/
|
||||
@Nullable
|
||||
public P getBaseProperty() {
|
||||
return properties.isEmpty() ? null : properties.get(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#isBasePathOf(org.springframework.data.mapping.context.PersistentPropertyPath)
|
||||
*/
|
||||
public boolean isBasePathOf(PersistentPropertyPath<P> path) {
|
||||
|
||||
Assert.notNull(path, "PersistentPropertyPath must not be null!");
|
||||
@@ -180,10 +152,6 @@ class DefaultPersistentPropertyPath<P extends PersistentProperty<P>> implements
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#getExtensionForBaseOf(org.springframework.data.mapping.context.PersistentPropertyPath)
|
||||
*/
|
||||
public PersistentPropertyPath<P> getExtensionForBaseOf(PersistentPropertyPath<P> base) {
|
||||
|
||||
if (!base.isBasePathOf(this)) {
|
||||
@@ -204,10 +172,6 @@ class DefaultPersistentPropertyPath<P extends PersistentProperty<P>> implements
|
||||
return new DefaultPersistentPropertyPath<>(result);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#getParentPath()
|
||||
*/
|
||||
public PersistentPropertyPath<P> getParentPath() {
|
||||
|
||||
var size = properties.size();
|
||||
@@ -215,18 +179,10 @@ class DefaultPersistentPropertyPath<P extends PersistentProperty<P>> implements
|
||||
return size == 0 ? this : new DefaultPersistentPropertyPath<>(properties.subList(0, size - 1));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.PersistentPropertyPath#getLength()
|
||||
*/
|
||||
public int getLength() {
|
||||
return properties.size();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Iterable#iterator()
|
||||
*/
|
||||
public Iterator<P> iterator() {
|
||||
return properties.iterator();
|
||||
}
|
||||
@@ -245,10 +201,6 @@ class DefaultPersistentPropertyPath<P extends PersistentProperty<P>> implements
|
||||
.anyMatch(property -> type.equals(property.getTypeInformation().getActualType()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -263,19 +215,11 @@ class DefaultPersistentPropertyPath<P extends PersistentProperty<P>> implements
|
||||
return ObjectUtils.nullSafeEquals(properties, that.properties);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ObjectUtils.nullSafeHashCode(properties);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public String toString() {
|
||||
|
||||
@@ -166,10 +166,6 @@ public class PersistentEntities implements Streamable<PersistentEntity<?, ? exte
|
||||
return Streamable.of(target);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Iterable#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<PersistentEntity<?, ? extends PersistentProperty<?>>> iterator() {
|
||||
|
||||
|
||||
@@ -293,10 +293,6 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
return this.path;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -315,10 +311,6 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
return ObjectUtils.nullSafeEquals(path, that.path);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
var result = ObjectUtils.nullSafeHashCode(type);
|
||||
@@ -326,10 +318,6 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PersistentPropertyPathFactory.TypeAndPath(type=" + this.getType() + ", path=" + this.getPath() + ")";
|
||||
@@ -367,28 +355,16 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
return new DefaultPersistentPropertyPaths<>(type, sorted);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyPaths#getFirst()
|
||||
*/
|
||||
@Override
|
||||
public Optional<PersistentPropertyPath<P>> getFirst() {
|
||||
return isEmpty() ? Optional.empty() : Optional.of(iterator().next());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyPaths#contains(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(String path) {
|
||||
return contains(PropertyPath.from(path, type));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyPaths#contains(org.springframework.data.mapping.PropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(PropertyPath path) {
|
||||
|
||||
@@ -403,19 +379,11 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
return stream().anyMatch(it -> dotPath.equals(it.toDotPath()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Iterable#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<PersistentPropertyPath<P>> iterator() {
|
||||
return paths.iterator();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyPaths#dropPathIfSegmentMatches(java.util.function.Predicate)
|
||||
*/
|
||||
@Override
|
||||
public PersistentPropertyPaths<T, P> dropPathIfSegmentMatches(Predicate<? super P> predicate) {
|
||||
|
||||
@@ -428,10 +396,6 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
return paths.equals(this.paths) ? this : new DefaultPersistentPropertyPaths<>(type, paths);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PersistentPropertyPathFactory.DefaultPersistentPropertyPaths(type=" + this.type + ", paths=" + this.paths
|
||||
|
||||
@@ -113,55 +113,31 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
|
||||
protected abstract Association<P> createAssociation();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getOwner()
|
||||
*/
|
||||
@Override
|
||||
public PersistentEntity<?, P> getOwner() {
|
||||
return this.owner;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getType()
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getType() {
|
||||
return information.getType();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getRawType()
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getRawType() {
|
||||
return this.rawType;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getTypeInformation()
|
||||
*/
|
||||
@Override
|
||||
public TypeInformation<?> getTypeInformation() {
|
||||
return information;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getPersistentEntityTypeInformation()
|
||||
*/
|
||||
@Override
|
||||
public Iterable<? extends TypeInformation<?>> getPersistentEntityTypeInformation() {
|
||||
|
||||
@@ -176,105 +152,61 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
return entityTypeInformation.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getGetter()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Method getGetter() {
|
||||
return this.getter;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getSetter()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Method getSetter() {
|
||||
return this.setter;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getWither()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Method getWither() {
|
||||
return this.wither;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getField()
|
||||
*/
|
||||
@Nullable
|
||||
public Field getField() {
|
||||
return this.field;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getSpelExpression()
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public String getSpelExpression() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isTransient()
|
||||
*/
|
||||
@Override
|
||||
public boolean isTransient() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isWritable()
|
||||
*/
|
||||
@Override
|
||||
public boolean isWritable() {
|
||||
return !isTransient();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isImmutable()
|
||||
*/
|
||||
@Override
|
||||
public boolean isImmutable() {
|
||||
return immutable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isAssociation()
|
||||
*/
|
||||
@Override
|
||||
public boolean isAssociation() {
|
||||
return isAssociation.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getAssociation()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Association<P> getAssociation() {
|
||||
return association.orElse(null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getAssociationTargetType()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<?> getAssociationTargetType() {
|
||||
@@ -284,66 +216,38 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
return result != null ? result.getType() : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getAssociationTargetTypeInformation()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public TypeInformation<?> getAssociationTargetTypeInformation() {
|
||||
return associationTargetType.getNullable();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isCollectionLike()
|
||||
*/
|
||||
@Override
|
||||
public boolean isCollectionLike() {
|
||||
return information.isCollectionLike();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isMap()
|
||||
*/
|
||||
@Override
|
||||
public boolean isMap() {
|
||||
return Map.class.isAssignableFrom(getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isArray()
|
||||
*/
|
||||
@Override
|
||||
public boolean isArray() {
|
||||
return getType().isArray();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isEntity()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEntity() {
|
||||
return !isTransient() && !entityTypeInformation.get().isEmpty();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getComponentType()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<?> getComponentType() {
|
||||
return isMap() || isCollectionLike() ? information.getRequiredComponentType().getType() : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getMapValueType()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Class<?> getMapValueType() {
|
||||
@@ -360,19 +264,11 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#getActualType()
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getActualType() {
|
||||
return getActualTypeInformation().getType();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mongodb.core.mapping.MongoPersistentProperty#usePropertyAccess()
|
||||
*/
|
||||
public boolean usePropertyAccess() {
|
||||
return usePropertyAccess.get();
|
||||
}
|
||||
@@ -387,10 +283,6 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
return targetType == null ? information.getRequiredActualType() : targetType;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
|
||||
@@ -405,19 +297,11 @@ public abstract class AbstractPersistentProperty<P extends PersistentProperty<P>
|
||||
return this.property.equals(that.property);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.hashCode.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return property.toString();
|
||||
|
||||
@@ -199,18 +199,10 @@ public abstract class AnnotationBasedPersistentProperty<P extends PersistentProp
|
||||
return isTransient.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isIdProperty()
|
||||
*/
|
||||
public boolean isIdProperty() {
|
||||
return isId.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#isVersionProperty()
|
||||
*/
|
||||
public boolean isVersionProperty() {
|
||||
return isVersion.get();
|
||||
}
|
||||
@@ -223,10 +215,6 @@ public abstract class AnnotationBasedPersistentProperty<P extends PersistentProp
|
||||
return isReference.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#isWritable()
|
||||
*/
|
||||
@Override
|
||||
public boolean isWritable() {
|
||||
return isWritable.get();
|
||||
@@ -266,10 +254,6 @@ public abstract class AnnotationBasedPersistentProperty<P extends PersistentProp
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentProperty#findPropertyOrOwnerAnnotation(java.lang.Class)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public <A extends Annotation> A findPropertyOrOwnerAnnotation(Class<A> annotationType) {
|
||||
@@ -289,29 +273,17 @@ public abstract class AnnotationBasedPersistentProperty<P extends PersistentProp
|
||||
return doFindAnnotation(annotationType).isPresent();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#usePropertyAccess()
|
||||
*/
|
||||
@Override
|
||||
public boolean usePropertyAccess() {
|
||||
return usePropertyAccess.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#getAssociationTargetTypeInformation()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public TypeInformation<?> getAssociationTargetTypeInformation() {
|
||||
return associationTargetType.getNullable();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -127,85 +127,45 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
.anyMatch(it -> !(isConstructorArgument(it) || it.isTransient())));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getPersistenceConstructor()
|
||||
*/
|
||||
@Nullable
|
||||
public PreferredConstructor<T, P> getPersistenceConstructor() {
|
||||
return constructor;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#isConstructorArgument(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
public boolean isConstructorArgument(PersistentProperty<?> property) {
|
||||
return constructor != null && constructor.isConstructorParameter(property);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#isIdProperty(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
public boolean isIdProperty(PersistentProperty<?> property) {
|
||||
return idProperty != null && idProperty.equals(property);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#isVersionProperty(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
public boolean isVersionProperty(PersistentProperty<?> property) {
|
||||
return versionProperty != null && versionProperty.equals(property);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getName()
|
||||
*/
|
||||
public String getName() {
|
||||
return getType().getName();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getIdProperty()
|
||||
*/
|
||||
@Nullable
|
||||
public P getIdProperty() {
|
||||
return idProperty;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getVersionProperty()
|
||||
*/
|
||||
@Nullable
|
||||
public P getVersionProperty() {
|
||||
return versionProperty;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#hasIdProperty()
|
||||
*/
|
||||
public boolean hasIdProperty() {
|
||||
return idProperty != null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#hasVersionProperty()
|
||||
*/
|
||||
public boolean hasVersionProperty() {
|
||||
return versionProperty != null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MutablePersistentEntity#addPersistentProperty(P)
|
||||
*/
|
||||
public void addPersistentProperty(P property) {
|
||||
|
||||
Assert.notNull(property, "Property must not be null!");
|
||||
@@ -245,10 +205,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MutablePersistentEntity#setEvaluationContextProvider(org.springframework.data.spel.EvaluationContextProvider)
|
||||
*/
|
||||
@Override
|
||||
public void setEvaluationContextProvider(EvaluationContextProvider provider) {
|
||||
this.evaluationContextProvider = provider;
|
||||
@@ -277,10 +233,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
return property;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MutablePersistentEntity#addAssociation(org.springframework.data.mapping.model.Association)
|
||||
*/
|
||||
public void addAssociation(Association<P> association) {
|
||||
|
||||
Assert.notNull(association, "Association must not be null!");
|
||||
@@ -288,20 +240,12 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
associations.add(association);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getPersistentProperty(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public P getPersistentProperty(String name) {
|
||||
return propertyCache.get(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getPersistentProperties(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<P> getPersistentProperties(Class<? extends Annotation> annotationType) {
|
||||
|
||||
@@ -324,34 +268,18 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
.filter(it -> it.isAnnotationPresent(annotationType)).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getType()
|
||||
*/
|
||||
public Class<T> getType() {
|
||||
return information.getType();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getTypeAlias()
|
||||
*/
|
||||
public Alias getTypeAlias() {
|
||||
return typeAlias.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getTypeInformation()
|
||||
*/
|
||||
public TypeInformation<T> getTypeInformation() {
|
||||
return information;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#doWithProperties(org.springframework.data.mapping.PropertyHandler)
|
||||
*/
|
||||
public void doWithProperties(PropertyHandler<P> handler) {
|
||||
|
||||
Assert.notNull(handler, "PropertyHandler must not be null!");
|
||||
@@ -361,10 +289,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#doWithProperties(org.springframework.data.mapping.PropertyHandler.Simple)
|
||||
*/
|
||||
@Override
|
||||
public void doWithProperties(SimplePropertyHandler handler) {
|
||||
|
||||
@@ -375,10 +299,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#doWithAssociations(org.springframework.data.mapping.AssociationHandler)
|
||||
*/
|
||||
public void doWithAssociations(AssociationHandler<P> handler) {
|
||||
|
||||
Assert.notNull(handler, "Handler must not be null!");
|
||||
@@ -388,10 +308,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#doWithAssociations(org.springframework.data.mapping.SimpleAssociationHandler)
|
||||
*/
|
||||
public void doWithAssociations(SimpleAssociationHandler handler) {
|
||||
|
||||
Assert.notNull(handler, "Handler must not be null!");
|
||||
@@ -401,20 +317,12 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#findAnnotation(java.lang.Class)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public <A extends Annotation> A findAnnotation(Class<A> annotationType) {
|
||||
return doFindAnnotation(annotationType).orElse(null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#isAnnotationPresent(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <A extends Annotation> boolean isAnnotationPresent(Class<A> annotationType) {
|
||||
return doFindAnnotation(annotationType).isPresent();
|
||||
@@ -427,10 +335,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
it -> Optional.ofNullable(AnnotatedElementUtils.findMergedAnnotation(getType(), it)));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MutablePersistentEntity#verify()
|
||||
*/
|
||||
public void verify() {
|
||||
|
||||
if (comparator != null) {
|
||||
@@ -439,19 +343,11 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.MutablePersistentEntity#setPersistentPropertyAccessorFactory(org.springframework.data.mapping.model.PersistentPropertyAccessorFactory)
|
||||
*/
|
||||
@Override
|
||||
public void setPersistentPropertyAccessorFactory(PersistentPropertyAccessorFactory factory) {
|
||||
this.propertyAccessorFactory = factory;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getPropertyAccessor(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <B> PersistentPropertyAccessor<B> getPropertyAccessor(B bean) {
|
||||
|
||||
@@ -460,19 +356,11 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
return propertyAccessorFactory.getPropertyAccessor(this, bean);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getPropertyPathAccessor(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <B> PersistentPropertyPathAccessor<B> getPropertyPathAccessor(B bean) {
|
||||
return new SimplePersistentPropertyPathAccessor<>(getPropertyAccessor(bean));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#getIdentifierAccessor(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public IdentifierAccessor getIdentifierAccessor(Object bean) {
|
||||
|
||||
@@ -485,10 +373,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
return hasIdProperty() ? new IdPropertyIdentifierAccessor(this, bean) : new AbsentIdentifierAccessor(bean);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#isNew(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean isNew(Object bean) {
|
||||
|
||||
@@ -497,28 +381,16 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
return isNewStrategy.get().isNew(bean);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#isImmutable()
|
||||
*/
|
||||
@Override
|
||||
public boolean isImmutable() {
|
||||
return isImmutable.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentEntity#requiresPropertyPopulation()
|
||||
*/
|
||||
@Override
|
||||
public boolean requiresPropertyPopulation() {
|
||||
return requiresPropertyPopulation.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Iterable#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<P> iterator() {
|
||||
|
||||
@@ -614,10 +486,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
super(target);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.IdentifierAccessor#getIdentifier()
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getIdentifier() {
|
||||
@@ -640,10 +508,6 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
public int compare(@Nullable Association<P> left, @Nullable Association<P> right) {
|
||||
|
||||
if (left == null) {
|
||||
|
||||
@@ -52,10 +52,6 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#setProperty(org.springframework.data.mapping.PersistentProperty, java.util.Optional)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setProperty(PersistentProperty<?> property, @Nullable Object value) {
|
||||
|
||||
@@ -103,10 +99,6 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#getProperty(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
@Nullable
|
||||
public Object getProperty(PersistentProperty<?> property) {
|
||||
return getProperty(property, property.getType());
|
||||
@@ -147,10 +139,6 @@ class BeanWrapper<T> implements PersistentPropertyAccessor<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#getBean()
|
||||
*/
|
||||
public T getBean() {
|
||||
return bean;
|
||||
}
|
||||
|
||||
@@ -27,19 +27,11 @@ public enum BeanWrapperPropertyAccessorFactory implements PersistentPropertyAcce
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.PersistentPropertyAccessorFactory#getPropertyAccessor(org.springframework.data.mapping.PersistentEntity, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> PersistentPropertyAccessor<T> getPropertyAccessor(PersistentEntity<?, ?> entity, T bean) {
|
||||
return new BeanWrapper<>(bean);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.PersistentPropertyAccessorFactory#isSupported(org.springframework.data.mapping.PersistentEntity)
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported(PersistentEntity<?, ?> entity) {
|
||||
return true;
|
||||
|
||||
@@ -31,10 +31,6 @@ public class CamelCaseAbbreviatingFieldNamingStrategy extends CamelCaseSplitting
|
||||
super("");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mongodb.core.mapping.CamelCaseSplittingFieldNamingStrategy#preparePart(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
protected String preparePart(String part) {
|
||||
return part.substring(0, 1);
|
||||
|
||||
@@ -45,10 +45,6 @@ public class CamelCaseSplittingFieldNamingStrategy implements FieldNamingStrateg
|
||||
this.delimiter = delimiter;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.FieldNamingStrategy#getFieldName(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
@Override
|
||||
public String getFieldName(PersistentProperty<?> property) {
|
||||
|
||||
|
||||
@@ -71,10 +71,6 @@ class ClassGeneratingEntityInstantiator implements EntityInstantiator {
|
||||
this.generator = new ObjectInstantiatorClassGenerator();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
|
||||
*/
|
||||
@Override
|
||||
public <T, E extends PersistentEntity<? extends T, P>, P extends PersistentProperty<P>> T createInstance(E entity,
|
||||
ParameterValueProvider<P> provider) {
|
||||
@@ -235,10 +231,6 @@ class ClassGeneratingEntityInstantiator implements EntityInstantiator {
|
||||
this.instantiator = instantiator;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T, E extends PersistentEntity<? extends T, P>, P extends PersistentProperty<P>> T createInstance(E entity,
|
||||
@@ -307,10 +299,6 @@ class ClassGeneratingEntityInstantiator implements EntityInstantiator {
|
||||
return new MappingInstantiationExceptionEntityInstantiator(typeToCreate);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
|
||||
*/
|
||||
@Override
|
||||
public <T, E extends PersistentEntity<? extends T, P>, P extends PersistentProperty<P>> T createInstance(E entity,
|
||||
ParameterValueProvider<P> provider) {
|
||||
|
||||
@@ -75,10 +75,6 @@ public class ClassGeneratingPropertyAccessorFactory implements PersistentPropert
|
||||
private volatile Map<TypeInformation<?>, Class<PersistentPropertyAccessor<?>>> propertyAccessorClasses = new HashMap<>(
|
||||
32);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.PersistentPropertyAccessorFactory#getPropertyAccessor(org.springframework.data.mapping.PersistentEntity, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> PersistentPropertyAccessor<T> getPropertyAccessor(PersistentEntity<?, ?> entity, T bean) {
|
||||
|
||||
@@ -1403,10 +1399,6 @@ public class ClassGeneratingPropertyAccessorFactory implements PersistentPropert
|
||||
this.hash = hash;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public int compareTo(PropertyStackAddress o) {
|
||||
return Integer.compare(hash, o.hash);
|
||||
|
||||
@@ -54,19 +54,11 @@ public class ConvertingPropertyAccessor<T> extends SimplePersistentPropertyPathA
|
||||
this.conversionService = conversionService;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#setProperty(org.springframework.data.mapping.PersistentProperty, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void setProperty(PersistentProperty<?> property, @Nullable Object value) {
|
||||
accessor.setProperty(property, convertIfNecessary(value, property.getType()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#setProperty(org.springframework.data.mapping.PersistentPropertyPath, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void setProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, @Nullable Object value) {
|
||||
|
||||
@@ -91,10 +83,6 @@ public class ConvertingPropertyAccessor<T> extends SimplePersistentPropertyPathA
|
||||
return convertIfNecessary(getProperty(property), targetType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.SimplePersistentPropertyPathAccessor#getTypedProperty(org.springframework.data.mapping.PersistentProperty, java.lang.Class)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
protected <S> S getTypedProperty(PersistentProperty<?> property, Class<S> type) {
|
||||
|
||||
@@ -42,10 +42,6 @@ public class DefaultSpELExpressionEvaluator implements SpELExpressionEvaluator {
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.SpELExpressionEvaluator#evaluate(java.lang.String)
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T evaluate(String expression) {
|
||||
|
||||
@@ -54,10 +54,6 @@ public class IdPropertyIdentifierAccessor extends TargetAwareIdentifierAccessor
|
||||
this.accessor = entity.getPropertyAccessor(target);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.keyvalue.core.IdentifierAccessor#getIdentifier()
|
||||
*/
|
||||
@Nullable
|
||||
public Object getIdentifier() {
|
||||
return accessor.getProperty(idProperty);
|
||||
|
||||
@@ -66,10 +66,6 @@ public class InstantiationAwarePropertyAccessor<T> implements PersistentProperty
|
||||
this.bean = bean;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#setProperty(org.springframework.data.mapping.PersistentProperty, java.lang.Object)
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
public void setProperty(PersistentProperty<?> property, @Nullable Object value) {
|
||||
@@ -124,20 +120,12 @@ public class InstantiationAwarePropertyAccessor<T> implements PersistentProperty
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#getProperty(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Object getProperty(PersistentProperty<?> property) {
|
||||
return delegateFunction.apply(bean).getProperty(property);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#getBean()
|
||||
*/
|
||||
@Override
|
||||
public T getBean() {
|
||||
return this.bean;
|
||||
|
||||
@@ -37,20 +37,12 @@ public class InstantiationAwarePropertyAccessorFactory implements PersistentProp
|
||||
this.instantiators = instantiators;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.PersistentPropertyAccessorFactory#getPropertyAccessor(org.springframework.data.mapping.PersistentEntity, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> PersistentPropertyAccessor<T> getPropertyAccessor(PersistentEntity<?, ?> entity, T bean) {
|
||||
return new InstantiationAwarePropertyAccessor<>(bean, it -> delegate.getPropertyAccessor(entity, it),
|
||||
instantiators);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.PersistentPropertyAccessorFactory#isSupported(org.springframework.data.mapping.PersistentEntity)
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported(PersistentEntity<?, ?> entity) {
|
||||
return delegate.isSupported(entity);
|
||||
|
||||
@@ -42,10 +42,6 @@ import org.springframework.lang.Nullable;
|
||||
*/
|
||||
class KotlinClassGeneratingEntityInstantiator extends ClassGeneratingEntityInstantiator {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator#doCreateEntityInstantiator(org.springframework.data.mapping.PersistentEntity)
|
||||
*/
|
||||
@Override
|
||||
protected EntityInstantiator doCreateEntityInstantiator(PersistentEntity<?, ?> entity) {
|
||||
|
||||
@@ -190,10 +186,6 @@ class KotlinClassGeneratingEntityInstantiator extends ClassGeneratingEntityInsta
|
||||
this.synthetic = constructor.getConstructor();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.EntityInstantiator#createInstance(org.springframework.data.mapping.PersistentEntity, org.springframework.data.mapping.model.ParameterValueProvider)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T, E extends PersistentEntity<? extends T, P>, P extends PersistentProperty<P>> T createInstance(E entity,
|
||||
|
||||
@@ -41,10 +41,6 @@ class PersistableIdentifierAccessor extends TargetAwareIdentifierAccessor {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.IdentifierAccessor#getIdentifier()
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getIdentifier() {
|
||||
|
||||
@@ -86,10 +86,6 @@ class PersistentEntityIsNewStrategy implements IsNewStrategy {
|
||||
return new PersistentEntityIsNewStrategy(entity, false);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.support.IsNewStrategy#isNew(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean isNew(Object entity) {
|
||||
|
||||
|
||||
@@ -43,10 +43,6 @@ public class PersistentEntityParameterValueProvider<P extends PersistentProperty
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.ParameterValueProvider#getParameterValue(org.springframework.data.mapping.PreferredConstructor.Parameter)
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getParameterValue(Parameter<T, P> parameter) {
|
||||
|
||||
@@ -98,10 +98,6 @@ public interface PreferredConstructorDiscoverer<T, P extends PersistentProperty<
|
||||
*/
|
||||
DEFAULT {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.PreferredConstructorDiscoverers#discover(org.springframework.data.util.TypeInformation, org.springframework.data.mapping.PersistentEntity)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
<T, P extends PersistentProperty<P>> PreferredConstructor<T, P> discover(TypeInformation<T> type,
|
||||
@@ -143,10 +139,6 @@ public interface PreferredConstructorDiscoverer<T, P extends PersistentProperty<
|
||||
*/
|
||||
KOTLIN {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.PreferredConstructorDiscoverers#discover(org.springframework.data.util.TypeInformation, org.springframework.data.mapping.PersistentEntity)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
<T, P extends PersistentProperty<P>> PreferredConstructor<T, P> discover(TypeInformation<T> type,
|
||||
|
||||
@@ -212,10 +212,6 @@ public class Property {
|
||||
return rawType;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
|
||||
@@ -230,19 +226,11 @@ public class Property {
|
||||
return this.field.isPresent() ? this.field.equals(that.field) : this.descriptor.equals(that.descriptor);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return hashCode.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return toString.get();
|
||||
|
||||
@@ -27,10 +27,6 @@ public enum PropertyNameFieldNamingStrategy implements FieldNamingStrategy {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.FieldNamingStrategy#getFieldName(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
public String getFieldName(PersistentProperty<?> property) {
|
||||
return property.getName();
|
||||
}
|
||||
|
||||
@@ -59,39 +59,23 @@ class SimplePersistentPropertyPathAccessor<T> implements PersistentPropertyPathA
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#getBean()
|
||||
*/
|
||||
@Override
|
||||
public T getBean() {
|
||||
return delegate.getBean();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#getProperty(org.springframework.data.mapping.PersistentProperty)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Object getProperty(PersistentProperty<?> property) {
|
||||
return delegate.getProperty(property);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyPathAccessor#getProperty(org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Object getProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path) {
|
||||
return getProperty(path, DEFAULT_GET_OPTIONS);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyPathAccessor#getProperty(org.springframework.data.mapping.PersistentPropertyPath, org.springframework.data.mapping.PersistentPropertyPathAccessor.Options)
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Object getProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, GetOptions options) {
|
||||
@@ -118,28 +102,16 @@ class SimplePersistentPropertyPathAccessor<T> implements PersistentPropertyPathA
|
||||
return current;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyAccessor#setProperty(org.springframework.data.mapping.PersistentProperty, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void setProperty(PersistentProperty<?> property, @Nullable Object value) {
|
||||
delegate.setProperty(property, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.PersistentPropertyPathAccessor#setProperty(org.springframework.data.mapping.PersistentPropertyPath, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void setProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, @Nullable Object value) {
|
||||
setProperty(path, value, AccessOptions.defaultSetOptions());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.ConvertingPropertyAccessor#setProperty(org.springframework.data.mapping.PersistentPropertyPath, java.lang.Object)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, @Nullable Object value,
|
||||
|
||||
@@ -86,18 +86,10 @@ public class SpELContext {
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.SpELContext#getParser()
|
||||
*/
|
||||
public ExpressionParser getParser() {
|
||||
return this.parser;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.SpELContext#getEvaluationContext(java.lang.Object)
|
||||
*/
|
||||
public EvaluationContext getEvaluationContext(Object source) {
|
||||
|
||||
var evaluationContext = new StandardEvaluationContext(source);
|
||||
|
||||
@@ -42,10 +42,6 @@ public class SpELExpressionParameterValueProvider<P extends PersistentProperty<P
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.ParameterValueProvider#getParameterValue(org.springframework.data.mapping.PreferredConstructor.Parameter)
|
||||
*/
|
||||
@Nullable
|
||||
public <T> T getParameterValue(Parameter<T, P> parameter) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user