Browse Source

Polishing.

Remove unneeded private getEntityInformation(…) method.

See #2053
pull/2065/head
Mark Paluch 7 months ago
parent
commit
811efbacf3
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
  1. 12
      spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java

12
spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java

@ -107,9 +107,7 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
@Override @Override
protected Object getTargetRepository(RepositoryInformation information) { protected Object getTargetRepository(RepositoryInformation information) {
RelationalEntityInformation<?, ?> entityInformation = getEntityInformation(information.getDomainType(), RelationalEntityInformation<?, ?> entityInformation = getEntityInformation(information.getDomainType());
information);
return getTargetRepositoryViaReflection(information, entityInformation, operations, this.converter); return getTargetRepositoryViaReflection(information, entityInformation, operations, this.converter);
} }
@ -119,16 +117,10 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
return Optional.of(new R2dbcQueryLookupStrategy(operations, new CachingValueExpressionDelegate(valueExpressionDelegate), converter, dataAccessStrategy)); return Optional.of(new R2dbcQueryLookupStrategy(operations, new CachingValueExpressionDelegate(valueExpressionDelegate), converter, dataAccessStrategy));
} }
@Override
public <T, ID> RelationalEntityInformation<T, ID> getEntityInformation(Class<T> domainClass) { public <T, ID> RelationalEntityInformation<T, ID> getEntityInformation(Class<T> domainClass) {
return getEntityInformation(domainClass, null);
}
@SuppressWarnings("unchecked")
private <T, ID> RelationalEntityInformation<T, ID> getEntityInformation(Class<T> domainClass,
@Nullable RepositoryInformation information) {
RelationalPersistentEntity<?> entity = this.mappingContext.getRequiredPersistentEntity(domainClass); RelationalPersistentEntity<?> entity = this.mappingContext.getRequiredPersistentEntity(domainClass);
return new MappingRelationalEntityInformation<>((RelationalPersistentEntity<T>) entity); return new MappingRelationalEntityInformation<>((RelationalPersistentEntity<T>) entity);
} }

Loading…
Cancel
Save