Prefer implementing PersistentPropertyAccessor over PersistentPropertyPathAccessor.
Fixes: #1368 Related issue: spring-projects/spring-data-commons#2813
This commit is contained in:
@@ -1454,7 +1454,7 @@ public class MappingCassandraConverter extends AbstractCassandraConverter
|
||||
}
|
||||
}
|
||||
|
||||
private static class PropertyTranslatingPropertyAccessor<T> implements PersistentPropertyPathAccessor<T> {
|
||||
private static class PropertyTranslatingPropertyAccessor<T> implements PersistentPropertyAccessor<T> {
|
||||
|
||||
private final PersistentPropertyAccessor<T> delegate;
|
||||
private final PersistentPropertyTranslator propertyTranslator;
|
||||
@@ -1485,23 +1485,6 @@ public class MappingCassandraConverter extends AbstractCassandraConverter
|
||||
return delegate.getBean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, Object value,
|
||||
AccessOptions.SetOptions options) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path,
|
||||
AccessOptions.GetOptions context) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(PersistentPropertyPath<? extends PersistentProperty<?>> path, Object value) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private CassandraPersistentProperty translate(PersistentProperty<?> property) {
|
||||
return propertyTranslator.translate((CassandraPersistentProperty) property);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user