Remove non-Javadoc comments.
These are no longer serve their purpose. Closes #1347
This commit is contained in:
@@ -254,10 +254,6 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
return customWriteTarget.isPresent() && customWriteTarget.get().isAssignableFrom(JdbcValue.class);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.convert.JdbcConverter#writeValue(java.lang.Object, java.lang.Class, int)
|
||||
*/
|
||||
@Override
|
||||
public JdbcValue writeJdbcValue(@Nullable Object value, Class<?> columnType, SQLType sqlType) {
|
||||
|
||||
|
||||
@@ -50,10 +50,6 @@ abstract class FluentQuerySupport<S, R> implements FluentQuery.FetchableFluentQu
|
||||
this.fieldsToInclude = fieldsToInclude;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#sortBy(org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public FetchableFluentQuery<R> sortBy(Sort sort) {
|
||||
|
||||
@@ -62,10 +58,6 @@ abstract class FluentQuerySupport<S, R> implements FluentQuery.FetchableFluentQu
|
||||
return create(example, sort, resultType, fieldsToInclude);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#as(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <R> FetchableFluentQuery<R> as(Class<R> projection) {
|
||||
|
||||
@@ -74,10 +66,6 @@ abstract class FluentQuerySupport<S, R> implements FluentQuery.FetchableFluentQu
|
||||
return create(example, sort, projection, fieldsToInclude);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#project(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public FetchableFluentQuery<R> project(Collection<String> properties) {
|
||||
|
||||
|
||||
@@ -68,10 +68,6 @@ public abstract class AbstractR2dbcConfiguration implements ApplicationContextAw
|
||||
|
||||
private @Nullable ApplicationContext context;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.context = applicationContext;
|
||||
|
||||
@@ -39,19 +39,11 @@ public class PersistentEntitiesFactoryBean implements FactoryBean<PersistentEnti
|
||||
this.mappingContext = mappingContext;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObject()
|
||||
*/
|
||||
@Override
|
||||
public PersistentEntities getObject() {
|
||||
return PersistentEntities.of(mappingContext);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getObjectType() {
|
||||
return PersistentEntities.class;
|
||||
|
||||
@@ -37,19 +37,11 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
class R2dbcAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingBeanDefinitionRegistrarSupport#getAnnotation()
|
||||
*/
|
||||
@Override
|
||||
protected Class<? extends Annotation> getAnnotation() {
|
||||
return EnableR2dbcAuditing.class;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingBeanDefinitionRegistrarSupport#getAuditingHandlerBeanName()
|
||||
*/
|
||||
@Override
|
||||
protected String getAuditingHandlerBeanName() {
|
||||
return "r2dbcAuditingHandler";
|
||||
@@ -61,10 +53,6 @@ class R2dbcAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport {
|
||||
builder.setFactoryMethod("from").addConstructorArgReference("r2dbcMappingContext");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingBeanDefinitionRegistrarSupport#getAuditHandlerBeanDefinitionBuilder(org.springframework.data.auditing.config.AuditingConfiguration)
|
||||
*/
|
||||
@Override
|
||||
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration) {
|
||||
|
||||
@@ -74,10 +62,6 @@ class R2dbcAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport {
|
||||
BeanDefinitionBuilder.rootBeanDefinition(ReactiveIsNewAwareAuditingHandler.class));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingBeanDefinitionRegistrarSupport#registerAuditListener(org.springframework.beans.factory.config.BeanDefinition, org.springframework.beans.factory.support.BeanDefinitionRegistry)
|
||||
*/
|
||||
@Override
|
||||
protected void registerAuditListenerBeanDefinition(BeanDefinition auditingHandlerDefinition,
|
||||
BeanDefinitionRegistry registry) {
|
||||
|
||||
@@ -37,10 +37,6 @@ public class EntityRowMapper<T> implements BiFunction<Row, RowMetadata, T> {
|
||||
this.converter = converter;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.function.BiFunction#apply(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public T apply(Row row, RowMetadata metadata) {
|
||||
return converter.read(typeRoRead, row, metadata);
|
||||
|
||||
@@ -47,10 +47,6 @@ import org.springframework.data.convert.WritingConverter;
|
||||
@WritingConverter
|
||||
public abstract class EnumWriteSupport<E extends Enum<E>> implements Converter<E, E> {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public E convert(E enumInstance) {
|
||||
return enumInstance;
|
||||
|
||||
@@ -90,19 +90,11 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
|
||||
// Entity reading
|
||||
// ----------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.EntityReader#read(java.lang.Class, S)
|
||||
*/
|
||||
@Override
|
||||
public <R> R read(Class<R> type, Row row) {
|
||||
return read(type, row, null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.convert.R2dbcConverter#read(java.lang.Class, io.r2dbc.spi.Row, io.r2dbc.spi.RowMetadata)
|
||||
*/
|
||||
@Override
|
||||
public <R> R read(Class<R> type, Row row, @Nullable RowMetadata metadata) {
|
||||
|
||||
@@ -331,10 +323,6 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
|
||||
// Entity writing
|
||||
// ----------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.EntityWriter#write(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void write(Object source, OutboundRow sink) {
|
||||
|
||||
@@ -532,10 +520,6 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
|
||||
return Enum.class.isAssignableFrom(value.getClass()) ? ((Enum<?>) value).name() : value;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.convert.R2dbcConverter#getArrayValue(org.springframework.data.r2dbc.dialect.ArrayColumns, org.springframework.data.relational.core.mapping.RelationalPersistentProperty, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Object getArrayValue(ArrayColumns arrayColumns, RelationalPersistentProperty property, Object value) {
|
||||
|
||||
@@ -562,10 +546,6 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.convert.R2dbcConverter#getTargetType(Class)
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getTargetType(Class<?> valueType) {
|
||||
|
||||
@@ -576,10 +556,6 @@ public class MappingR2dbcConverter extends BasicRelationalConverter implements R
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.convert.R2dbcConverter#isSimpleType(Class)
|
||||
*/
|
||||
@Override
|
||||
public boolean isSimpleType(Class<?> type) {
|
||||
return getConversions().isSimpleType(type);
|
||||
|
||||
@@ -132,10 +132,6 @@ public class DefaultReactiveDataAccessStrategy implements ReactiveDataAccessStra
|
||||
this.mappingContext);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getAllColumns(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public List<SqlIdentifier> getAllColumns(Class<?> entityType) {
|
||||
|
||||
@@ -153,10 +149,6 @@ public class DefaultReactiveDataAccessStrategy implements ReactiveDataAccessStra
|
||||
return columnNames;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getIdentifierColumns(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public List<SqlIdentifier> getIdentifierColumns(Class<?> entityType) {
|
||||
|
||||
@@ -173,10 +165,6 @@ public class DefaultReactiveDataAccessStrategy implements ReactiveDataAccessStra
|
||||
return columnNames;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getOutboundRow(java.lang.Object)
|
||||
*/
|
||||
public OutboundRow getOutboundRow(Object object) {
|
||||
|
||||
Assert.notNull(object, "Entity object must not be null");
|
||||
@@ -256,28 +244,16 @@ public class DefaultReactiveDataAccessStrategy implements ReactiveDataAccessStra
|
||||
actualType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getBindValue(Parameter)
|
||||
*/
|
||||
@Override
|
||||
public Parameter getBindValue(Parameter value) {
|
||||
return this.updateMapper.getBindValue(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getRowMapper(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> BiFunction<Row, RowMetadata, T> getRowMapper(Class<T> typeToRead) {
|
||||
return new EntityRowMapper<>(typeToRead, this.converter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveDataAccessStrategy#processNamedParameters(java.lang.String, org.springframework.data.r2dbc.core.ReactiveDataAccessStrategy.NamedParameterProvider)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<?> processNamedParameters(String query, NamedParameterProvider parameterProvider) {
|
||||
|
||||
@@ -299,37 +275,21 @@ public class DefaultReactiveDataAccessStrategy implements ReactiveDataAccessStra
|
||||
return this.expander.expand(query, this.dialect.getBindMarkersFactory(), new MapBindParameterSource(namedBindings));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getTableName(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getTableName(Class<?> type) {
|
||||
return getRequiredPersistentEntity(type).getTableName();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#toSql(SqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public String toSql(SqlIdentifier identifier) {
|
||||
return this.updateMapper.toSql(identifier);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getStatementMapper()
|
||||
*/
|
||||
@Override
|
||||
public StatementMapper getStatementMapper() {
|
||||
return this.statementMapper;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.ReactiveDataAccessStrategy#getConverter()
|
||||
*/
|
||||
public R2dbcConverter getConverter() {
|
||||
return this.converter;
|
||||
}
|
||||
|
||||
@@ -72,10 +72,6 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
this.mappingContext = mappingContext;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#forType(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> TypedStatementMapper<T> forType(Class<T> type) {
|
||||
@@ -86,10 +82,6 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
(RelationalPersistentEntity<T>) this.mappingContext.getRequiredPersistentEntity(type));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.SelectSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<?> getMappedObject(SelectSpec selectSpec) {
|
||||
return getMappedObject(selectSpec, null);
|
||||
@@ -157,10 +149,6 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
return mapped;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.InsertSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<Insert> getMappedObject(InsertSpec insertSpec) {
|
||||
return getMappedObject(insertSpec, null);
|
||||
@@ -195,10 +183,6 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
return new DefaultPreparedOperation<>(withBuild.build(), this.renderContext, bindings);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.UpdateSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<Update> getMappedObject(UpdateSpec updateSpec) {
|
||||
return getMappedObject(updateSpec, null);
|
||||
@@ -239,19 +223,11 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
return new DefaultPreparedOperation<>(update, this.renderContext, bindings);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.DeleteSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<Delete> getMappedObject(DeleteSpec deleteSpec) {
|
||||
return getMappedObject(deleteSpec, null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getRenderContext()
|
||||
*/
|
||||
@Override
|
||||
public RenderContext getRenderContext() {
|
||||
return renderContext;
|
||||
@@ -284,10 +260,6 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
return new DefaultPreparedOperation<>(delete, this.renderContext, bindings);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#toSql(SqlIdentifier)
|
||||
*/
|
||||
private String toSql(SqlIdentifier identifier) {
|
||||
|
||||
Assert.notNull(identifier, "SqlIdentifier must not be null");
|
||||
@@ -313,19 +285,11 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
this.bindings = bindings;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.PreparedOperation#getSource()
|
||||
*/
|
||||
@Override
|
||||
public T getSource() {
|
||||
return this.source;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.QueryOperation#toQuery()
|
||||
*/
|
||||
@Override
|
||||
public String toQuery() {
|
||||
|
||||
@@ -365,55 +329,31 @@ class DefaultStatementMapper implements StatementMapper {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#forType(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <TC> TypedStatementMapper<TC> forType(Class<TC> type) {
|
||||
return DefaultStatementMapper.this.forType(type);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.SelectSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<?> getMappedObject(SelectSpec selectSpec) {
|
||||
return DefaultStatementMapper.this.getMappedObject(selectSpec, this.entity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.InsertSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<?> getMappedObject(InsertSpec insertSpec) {
|
||||
return DefaultStatementMapper.this.getMappedObject(insertSpec, this.entity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.UpdateSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<?> getMappedObject(UpdateSpec updateSpec) {
|
||||
return DefaultStatementMapper.this.getMappedObject(updateSpec, this.entity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getMappedObject(org.springframework.data.r2dbc.function.StatementMapper.DeleteSpec)
|
||||
*/
|
||||
@Override
|
||||
public PreparedOperation<?> getMappedObject(DeleteSpec deleteSpec) {
|
||||
return DefaultStatementMapper.this.getMappedObject(deleteSpec, this.entity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.StatementMapper#getRenderContext()
|
||||
*/
|
||||
@Override
|
||||
public RenderContext getRenderContext() {
|
||||
return DefaultStatementMapper.this.getRenderContext();
|
||||
|
||||
@@ -71,10 +71,6 @@ class MapBindParameterSource implements BindParameterSource {
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.SqlParameterSource#hasValue(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean hasValue(String paramName) {
|
||||
|
||||
@@ -83,10 +79,6 @@ class MapBindParameterSource implements BindParameterSource {
|
||||
return values.containsKey(paramName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.SqlParameterSource#getType(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getType(String paramName) {
|
||||
|
||||
@@ -100,10 +92,6 @@ class MapBindParameterSource implements BindParameterSource {
|
||||
return Object.class;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.SqlParameterSource#getValue(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String paramName) throws IllegalArgumentException {
|
||||
|
||||
@@ -114,10 +102,6 @@ class MapBindParameterSource implements BindParameterSource {
|
||||
return this.values.get(paramName).getValue();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.SqlParameterSource#getParameterNames()
|
||||
*/
|
||||
@Override
|
||||
public Streamable<String> getParameterNames() {
|
||||
return Streamable.of(this.values.keySet());
|
||||
|
||||
@@ -603,10 +603,6 @@ abstract class NamedParameterUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.function.QueryOperation#toQuery()
|
||||
*/
|
||||
@Override
|
||||
public String toQuery() {
|
||||
return this.expandedSql;
|
||||
|
||||
@@ -162,46 +162,25 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
this.projectionFactory = new SpelAwareProxyProjectionFactory();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#getDatabaseClient()
|
||||
*/
|
||||
@Override
|
||||
public DatabaseClient getDatabaseClient() {
|
||||
return this.databaseClient;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#getDataAccessStrategy()
|
||||
*/
|
||||
@Override
|
||||
public ReactiveDataAccessStrategy getDataAccessStrategy() {
|
||||
return this.dataAccessStrategy;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#getConverter()
|
||||
*/
|
||||
@Override
|
||||
public R2dbcConverter getConverter() {
|
||||
return this.dataAccessStrategy.getConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org.springframework.beans.factory.BeanFactory)
|
||||
* @deprecated since 1.2 in favor of #setApplicationContext.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
|
||||
@@ -234,37 +213,21 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
// Methods dealing with org.springframework.data.r2dbc.core.FluentR2dbcOperations
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation#select(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ReactiveSelect<T> select(Class<T> domainType) {
|
||||
return new ReactiveSelectOperationSupport(this).select(domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveInsertOperation#insert(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ReactiveInsert<T> insert(Class<T> domainType) {
|
||||
return new ReactiveInsertOperationSupport(this).insert(domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveUpdateOperation#update(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public ReactiveUpdate update(Class<?> domainType) {
|
||||
return new ReactiveUpdateOperationSupport(this).update(domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation#delete(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public ReactiveDelete delete(Class<?> domainType) {
|
||||
return new ReactiveDeleteOperationSupport(this).delete(domainType);
|
||||
@@ -274,10 +237,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
// Methods dealing with org.springframework.data.r2dbc.query.Query
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#count(org.springframework.data.r2dbc.query.Query, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Long> count(Query query, Class<?> entityClass) throws DataAccessException {
|
||||
|
||||
@@ -315,10 +274,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
.defaultIfEmpty(0L);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#exists(org.springframework.data.r2dbc.query.Query, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Boolean> exists(Query query, Class<?> entityClass) throws DataAccessException {
|
||||
|
||||
@@ -355,10 +310,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
.hasElement();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#select(org.springframework.data.r2dbc.query.Query, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Flux<T> select(Query query, Class<T> entityClass) throws DataAccessException {
|
||||
|
||||
@@ -415,20 +366,12 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
return getRowsFetchSpec(databaseClient.sql(operation), entityClass, returnType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#selectOne(org.springframework.data.r2dbc.query.Query, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Mono<T> selectOne(Query query, Class<T> entityClass) throws DataAccessException {
|
||||
return doSelect(query.isLimited() ? query : query.limit(2), entityClass, getTableName(entityClass), entityClass,
|
||||
RowsFetchSpec::one);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#update(org.springframework.data.r2dbc.query.Query, org.springframework.data.r2dbc.query.Update, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Long> update(Query query, Update update, Class<?> entityClass) throws DataAccessException {
|
||||
|
||||
@@ -455,10 +398,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
return this.databaseClient.sql(operation).fetch().rowsUpdated();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#delete(org.springframework.data.r2dbc.query.Query, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Long> delete(Query query, Class<?> entityClass) throws DataAccessException {
|
||||
|
||||
@@ -488,10 +427,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
// Methods dealing with org.springframework.r2dbc.core.PreparedOperation
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#query(org.springframework.r2dbc.core.PreparedOperation, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> RowsFetchSpec<T> query(PreparedOperation<?> operation, Class<T> entityClass) {
|
||||
|
||||
@@ -502,10 +437,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
getTableNameOrEmpty(entityClass));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#query(org.springframework.r2dbc.core.PreparedOperation, java.util.function.BiFunction)
|
||||
*/
|
||||
@Override
|
||||
public <T> RowsFetchSpec<T> query(PreparedOperation<?> operation, BiFunction<Row, RowMetadata, T> rowMapper) {
|
||||
|
||||
@@ -515,10 +446,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
return new EntityCallbackAdapter<>(databaseClient.sql(operation).map(rowMapper), SqlIdentifier.EMPTY);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#query(org.springframework.r2dbc.core.PreparedOperation, java.lang.Class, java.util.function.BiFunction)
|
||||
*/
|
||||
@Override
|
||||
public <T> RowsFetchSpec<T> query(PreparedOperation<?> operation, Class<?> entityClass,
|
||||
BiFunction<Row, RowMetadata, T> rowMapper) {
|
||||
@@ -534,10 +461,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
// Methods dealing with entities
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#insert(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> Mono<T> insert(T entity) throws DataAccessException {
|
||||
|
||||
@@ -637,10 +560,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
return (T) propertyAccessor.getBean();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#update(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> Mono<T> update(T entity) throws DataAccessException {
|
||||
|
||||
@@ -760,10 +679,6 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.R2dbcEntityOperations#delete(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> Mono<T> delete(T entity) throws DataAccessException {
|
||||
|
||||
|
||||
@@ -36,10 +36,6 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation#delete(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public ReactiveDelete delete(Class<?> domainType) {
|
||||
|
||||
@@ -64,10 +60,6 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation.DeleteWithTable#from(SqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public DeleteWithQuery from(SqlIdentifier tableName) {
|
||||
|
||||
@@ -76,10 +68,6 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
|
||||
return new ReactiveDeleteSupport(template, domainType, query, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation.DeleteWithQuery#matching(org.springframework.data.r2dbc.query.Query)
|
||||
*/
|
||||
@Override
|
||||
public TerminatingDelete matching(Query query) {
|
||||
|
||||
@@ -88,10 +76,6 @@ class ReactiveDeleteOperationSupport implements ReactiveDeleteOperation {
|
||||
return new ReactiveDeleteSupport(template, domainType, query, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveDeleteOperation.TerminatingDelete#all()
|
||||
*/
|
||||
public Mono<Long> all() {
|
||||
return template.doDelete(query, domainType, getTableName());
|
||||
}
|
||||
|
||||
@@ -35,10 +35,6 @@ class ReactiveInsertOperationSupport implements ReactiveInsertOperation {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveInsertOperation#insert(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ReactiveInsert<T> insert(Class<T> domainType) {
|
||||
|
||||
@@ -60,10 +56,6 @@ class ReactiveInsertOperationSupport implements ReactiveInsertOperation {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveInsertOperation.InsertWithTable#into(SqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public TerminatingInsert<T> into(SqlIdentifier tableName) {
|
||||
|
||||
@@ -72,10 +64,6 @@ class ReactiveInsertOperationSupport implements ReactiveInsertOperation {
|
||||
return new ReactiveInsertSupport<>(template, domainType, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveInsertOperation.TerminatingInsert#one(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Mono<T> using(T object) {
|
||||
|
||||
|
||||
@@ -38,10 +38,6 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation#select(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> ReactiveSelect<T> select(Class<T> domainType) {
|
||||
|
||||
@@ -68,10 +64,6 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.SelectWithTable#from(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public SelectWithProjection<T> from(SqlIdentifier tableName) {
|
||||
|
||||
@@ -80,10 +72,6 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
|
||||
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.SelectWithProjection#as(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <R> SelectWithQuery<R> as(Class<R> returnType) {
|
||||
|
||||
@@ -92,10 +80,6 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
|
||||
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.SelectWithQuery#matching(org.springframework.data.r2dbc.query.Query)
|
||||
*/
|
||||
@Override
|
||||
public TerminatingSelect<T> matching(Query query) {
|
||||
|
||||
@@ -104,46 +88,26 @@ class ReactiveSelectOperationSupport implements ReactiveSelectOperation {
|
||||
return new ReactiveSelectSupport<>(template, domainType, returnType, query, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.TerminatingSelect#count()
|
||||
*/
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return template.doCount(query, domainType, getTableName());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.TerminatingSelect#exists()
|
||||
*/
|
||||
@Override
|
||||
public Mono<Boolean> exists() {
|
||||
return template.doExists(query, domainType, getTableName());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.TerminatingSelect#first()
|
||||
*/
|
||||
@Override
|
||||
public Mono<T> first() {
|
||||
return template.doSelect(query.limit(1), domainType, getTableName(), returnType, RowsFetchSpec::first);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.TerminatingSelect#one()
|
||||
*/
|
||||
@Override
|
||||
public Mono<T> one() {
|
||||
return template.doSelect(query.limit(2), domainType, getTableName(), returnType, RowsFetchSpec::one);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveSelectOperation.TerminatingSelect#all()
|
||||
*/
|
||||
@Override
|
||||
public Flux<T> all() {
|
||||
return template.doSelect(query, domainType, getTableName(), returnType, RowsFetchSpec::all);
|
||||
|
||||
@@ -37,10 +37,6 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
|
||||
this.template = template;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveUpdateOperation#update(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public ReactiveUpdate update(Class<?> domainType) {
|
||||
|
||||
@@ -65,10 +61,6 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveUpdateOperation.UpdateWithTable#inTable(SqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public UpdateWithQuery inTable(SqlIdentifier tableName) {
|
||||
|
||||
@@ -77,10 +69,6 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
|
||||
return new ReactiveUpdateSupport(template, domainType, query, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveUpdateOperation.UpdateWithQuery#matching(org.springframework.data.r2dbc.query.Query)
|
||||
*/
|
||||
@Override
|
||||
public TerminatingUpdate matching(Query query) {
|
||||
|
||||
@@ -89,10 +77,6 @@ class ReactiveUpdateOperationSupport implements ReactiveUpdateOperation {
|
||||
return new ReactiveUpdateSupport(template, domainType, query, tableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.core.ReactiveUpdateOperation.TerminatingUpdate#apply(org.springframework.data.r2dbc.query.Update)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Long> apply(Update update) {
|
||||
|
||||
|
||||
@@ -56,28 +56,16 @@ public class MySqlDialect extends org.springframework.data.relational.core.diale
|
||||
private static final List<Object> CONVERTERS = Arrays.asList(ByteToBooleanConverter.INSTANCE,
|
||||
BooleanToByteConverter.INSTANCE);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getBindMarkersFactory()
|
||||
*/
|
||||
@Override
|
||||
public BindMarkersFactory getBindMarkersFactory() {
|
||||
return ANONYMOUS;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getSimpleTypesKeys()
|
||||
*/
|
||||
@Override
|
||||
public Collection<? extends Class<?>> getSimpleTypes() {
|
||||
return SIMPLE_TYPES;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.R2dbcDialect#getConverters()
|
||||
*/
|
||||
@Override
|
||||
public Collection<Object> getConverters() {
|
||||
return CONVERTERS;
|
||||
|
||||
@@ -34,10 +34,6 @@ public class OracleDialect extends org.springframework.data.relational.core.dial
|
||||
private static final BindMarkersFactory NAMED = BindMarkersFactory.named(":", "P", 32,
|
||||
OracleDialect::filterBindMarker);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getBindMarkersFactory()
|
||||
*/
|
||||
@Override
|
||||
public BindMarkersFactory getBindMarkersFactory() {
|
||||
return NAMED;
|
||||
|
||||
@@ -82,37 +82,21 @@ public class PostgresDialect extends org.springframework.data.relational.core.di
|
||||
private final Lazy<ArrayColumns> arrayColumns = Lazy
|
||||
.of(() -> new SimpleTypeArrayColumns(ObjectArrayColumns.INSTANCE, getSimpleTypeHolder()));
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getBindMarkersFactory()
|
||||
*/
|
||||
@Override
|
||||
public BindMarkersFactory getBindMarkersFactory() {
|
||||
return INDEXED;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getSimpleTypesKeys()
|
||||
*/
|
||||
@Override
|
||||
public Collection<? extends Class<?>> getSimpleTypes() {
|
||||
return SIMPLE_TYPES;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getArraySupport()
|
||||
*/
|
||||
@Override
|
||||
public ArrayColumns getArraySupport() {
|
||||
return this.arrayColumns.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getConverters()
|
||||
*/
|
||||
@Override
|
||||
public Collection<Object> getConverters() {
|
||||
|
||||
|
||||
@@ -26,19 +26,11 @@ public class SqlServerDialect extends org.springframework.data.relational.core.d
|
||||
private static final BindMarkersFactory NAMED = BindMarkersFactory.named("@", "P", 32,
|
||||
SqlServerDialect::filterBindMarker);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getBindMarkersFactory()
|
||||
*/
|
||||
@Override
|
||||
public BindMarkersFactory getBindMarkersFactory() {
|
||||
return NAMED;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.dialect.Dialect#getSimpleTypesKeys()
|
||||
*/
|
||||
@Override
|
||||
public Collection<? extends Class<?>> getSimpleTypes() {
|
||||
return SIMPLE_TYPES;
|
||||
|
||||
@@ -125,135 +125,75 @@ public class OutboundRow implements Map<SqlIdentifier, Parameter>, Cloneable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#size()
|
||||
*/
|
||||
@Override
|
||||
public int size() {
|
||||
return this.rowAsMap.size();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#isEmpty()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return this.rowAsMap.isEmpty();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#clone()
|
||||
*/
|
||||
@Override
|
||||
protected OutboundRow clone() {
|
||||
return new OutboundRow(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#containsKey(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsKey(Object key) {
|
||||
return this.rowAsMap.containsKey(convertKeyIfNecessary(key));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#containsValue(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean containsValue(Object value) {
|
||||
return this.rowAsMap.containsValue(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#get(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Parameter get(Object key) {
|
||||
return this.rowAsMap.get(convertKeyIfNecessary(key));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#put(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
public Parameter put(String key, Parameter value) {
|
||||
return put(SqlIdentifier.unquoted(key), value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#put(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Parameter put(SqlIdentifier key, Parameter value) {
|
||||
return this.rowAsMap.put(key, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#remove(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Parameter remove(Object key) {
|
||||
return this.rowAsMap.remove(key);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#putAll(java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public void putAll(Map<? extends SqlIdentifier, ? extends Parameter> m) {
|
||||
this.rowAsMap.putAll(m);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#clear()
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
this.rowAsMap.clear();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#keySet()
|
||||
*/
|
||||
@Override
|
||||
public Set<SqlIdentifier> keySet() {
|
||||
return this.rowAsMap.keySet();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#values()
|
||||
*/
|
||||
@Override
|
||||
public Collection<Parameter> values() {
|
||||
return this.rowAsMap.values();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.Map#entrySet()
|
||||
*/
|
||||
@Override
|
||||
public Set<Entry<SqlIdentifier, Parameter>> entrySet() {
|
||||
return this.rowAsMap.entrySet();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
|
||||
@@ -270,19 +210,11 @@ public class OutboundRow implements Map<SqlIdentifier, Parameter>, Cloneable {
|
||||
return this.rowAsMap.equals(row.rowAsMap);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.rowAsMap.hashCode();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OutboundRow[" + this.rowAsMap + "]";
|
||||
|
||||
@@ -45,10 +45,6 @@ public class R2dbcMappingContext extends RelationalMappingContext {
|
||||
setForceQuote(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.AbstractMappingContext#shouldCreatePersistentEntityFor(org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Override
|
||||
protected boolean shouldCreatePersistentEntityFor(TypeInformation<?> type) {
|
||||
|
||||
|
||||
@@ -48,19 +48,11 @@ public class ReactiveAuditingEntityCallback implements BeforeConvertCallback<Obj
|
||||
this.auditingHandlerFactory = auditingHandlerFactory;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.mapping.event.ReactiveBeforeConvertCallback#onBeforeConvert(java.lang.Object, SqlIdentifier)
|
||||
*/
|
||||
@Override
|
||||
public Publisher<Object> onBeforeConvert(Object entity, SqlIdentifier table) {
|
||||
return auditingHandlerFactory.getObject().markAudited(entity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.Ordered#getOrder()
|
||||
*/
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return 100;
|
||||
|
||||
@@ -27,19 +27,11 @@ import org.springframework.data.repository.config.RepositoryConfigurationExtensi
|
||||
*/
|
||||
class R2dbcRepositoriesRegistrar extends RepositoryBeanDefinitionRegistrarSupport {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport#getAnnotation()
|
||||
*/
|
||||
@Override
|
||||
protected Class<? extends Annotation> getAnnotation() {
|
||||
return EnableR2dbcRepositories.class;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport#getExtension()
|
||||
*/
|
||||
@Override
|
||||
protected RepositoryConfigurationExtension getExtension() {
|
||||
return new R2dbcRepositoryConfigurationExtension();
|
||||
|
||||
@@ -37,61 +37,33 @@ import org.springframework.data.repository.core.RepositoryMetadata;
|
||||
*/
|
||||
public class R2dbcRepositoryConfigurationExtension extends RepositoryConfigurationExtensionSupport {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getModuleName()
|
||||
*/
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return "R2DBC";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getModulePrefix()
|
||||
*/
|
||||
@Override
|
||||
protected String getModulePrefix() {
|
||||
return "r2dbc";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtension#getRepositoryFactoryBeanClassName()
|
||||
*/
|
||||
public String getRepositoryFactoryBeanClassName() {
|
||||
return R2dbcRepositoryFactoryBean.class.getName();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getIdentifyingAnnotations()
|
||||
*/
|
||||
@Override
|
||||
protected Collection<Class<? extends Annotation>> getIdentifyingAnnotations() {
|
||||
return Collections.singleton(Table.class);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getIdentifyingTypes()
|
||||
*/
|
||||
@Override
|
||||
protected Collection<Class<?>> getIdentifyingTypes() {
|
||||
return Collections.singleton(R2dbcRepository.class);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.XmlRepositoryConfigurationSource)
|
||||
*/
|
||||
@Override
|
||||
public void postProcess(BeanDefinitionBuilder builder, XmlRepositoryConfigurationSource config) {}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource)
|
||||
*/
|
||||
@Override
|
||||
public void postProcess(BeanDefinitionBuilder builder, AnnotationRepositoryConfigurationSource config) {
|
||||
|
||||
@@ -100,10 +72,6 @@ public class R2dbcRepositoryConfigurationExtension extends RepositoryConfigurati
|
||||
builder.addPropertyReference("entityOperations", attributes.getString("entityOperationsRef"));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#useRepositoryConfiguration(org.springframework.data.repository.core.RepositoryMetadata)
|
||||
*/
|
||||
@Override
|
||||
protected boolean useRepositoryConfiguration(RepositoryMetadata metadata) {
|
||||
return metadata.isReactiveRepository();
|
||||
|
||||
@@ -68,18 +68,10 @@ public abstract class AbstractR2dbcQuery implements RepositoryQuery {
|
||||
this.instantiators = new EntityInstantiators();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.RepositoryQuery#getQueryMethod()
|
||||
*/
|
||||
public R2dbcQueryMethod getQueryMethod() {
|
||||
return method;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.RepositoryQuery#execute(java.lang.Object[])
|
||||
*/
|
||||
public Object execute(Object[] parameters) {
|
||||
|
||||
Mono<R2dbcParameterAccessor> resolveParameters = new R2dbcParameterAccessor(method, parameters).resolveParameters();
|
||||
|
||||
@@ -48,10 +48,6 @@ class DefaultR2dbcSpELExpressionEvaluator implements R2dbcSpELExpressionEvaluato
|
||||
return NoOpExpressionEvaluator.INSTANCE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.R2dbcSpELExpressionEvaluator#evaluate(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Parameter evaluate(String expression) {
|
||||
|
||||
|
||||
@@ -75,37 +75,21 @@ public class PartTreeR2dbcQuery extends AbstractR2dbcQuery {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#isModifyingQuery()
|
||||
*/
|
||||
@Override
|
||||
protected boolean isModifyingQuery() {
|
||||
return this.tree.isDelete();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#isCountQuery()
|
||||
*/
|
||||
@Override
|
||||
protected boolean isCountQuery() {
|
||||
return this.tree.isCountProjection();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#isExistsQuery()
|
||||
*/
|
||||
@Override
|
||||
protected boolean isExistsQuery() {
|
||||
return this.tree.isExistsProjection();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#createQuery(org.springframework.data.relational.repository.query.RelationalParameterAccessor)
|
||||
*/
|
||||
@Override
|
||||
protected Mono<PreparedOperation<?>> createQuery(RelationalParameterAccessor accessor) {
|
||||
|
||||
|
||||
@@ -162,11 +162,6 @@ public class R2dbcQueryMethod extends QueryMethod {
|
||||
return this.lock;
|
||||
}
|
||||
|
||||
/*
|
||||
* All reactive query methods are streaming queries.
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.QueryMethod#isStreamQuery()
|
||||
*/
|
||||
@Override
|
||||
public boolean isStreamQuery() {
|
||||
return true;
|
||||
|
||||
@@ -119,37 +119,21 @@ public class StringBasedR2dbcQuery extends AbstractR2dbcQuery {
|
||||
return ExpressionDependencies.merged(dependencies);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#isModifyingQuery()
|
||||
*/
|
||||
@Override
|
||||
protected boolean isModifyingQuery() {
|
||||
return getQueryMethod().isModifyingQuery();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#isCountQuery()
|
||||
*/
|
||||
@Override
|
||||
protected boolean isCountQuery() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#isExistsQuery()
|
||||
*/
|
||||
@Override
|
||||
protected boolean isExistsQuery() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.r2dbc.repository.query.AbstractR2dbcQuery#createQuery(org.springframework.data.relational.repository.query.RelationalParameterAccessor)
|
||||
*/
|
||||
@Override
|
||||
protected Mono<PreparedOperation<?>> createQuery(RelationalParameterAccessor accessor) {
|
||||
return getSpelEvaluator(accessor).map(evaluator -> new ExpandedQuery(accessor, evaluator));
|
||||
|
||||
@@ -39,19 +39,11 @@ class CachingExpressionParser implements ExpressionParser {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.ExpressionParser#parseExpression(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public Expression parseExpression(String expressionString) throws ParseException {
|
||||
return cache.computeIfAbsent(expressionString, delegate::parseExpression);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.ExpressionParser#parseExpression(java.lang.String, org.springframework.expression.ParserContext)
|
||||
*/
|
||||
@Override
|
||||
public Expression parseExpression(String expressionString, ParserContext context) throws ParseException {
|
||||
throw new UnsupportedOperationException("Parsing using ParserContext is not supported");
|
||||
|
||||
@@ -99,19 +99,11 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
|
||||
setEvaluationContextProvider(ReactiveQueryMethodEvaluationContextProvider.DEFAULT);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactorySupport#getRepositoryBaseClass(org.springframework.data.repository.core.RepositoryMetadata)
|
||||
*/
|
||||
@Override
|
||||
protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {
|
||||
return SimpleR2dbcRepository.class;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactorySupport#getTargetRepository(org.springframework.data.repository.core.RepositoryInformation)
|
||||
*/
|
||||
@Override
|
||||
protected Object getTargetRepository(RepositoryInformation information) {
|
||||
|
||||
@@ -122,10 +114,6 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
|
||||
operations, this.converter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactorySupport#getQueryLookupStrategy(org.springframework.data.repository.query.QueryLookupStrategy.Key, org.springframework.data.repository.query.EvaluationContextProvider)
|
||||
*/
|
||||
@Override
|
||||
protected Optional<QueryLookupStrategy> getQueryLookupStrategy(@Nullable Key key,
|
||||
QueryMethodEvaluationContextProvider evaluationContextProvider) {
|
||||
@@ -134,10 +122,6 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
|
||||
this.dataAccessStrategy));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactorySupport#getEntityInformation(java.lang.Class)
|
||||
*/
|
||||
public <T, ID> RelationalEntityInformation<T, ID> getEntityInformation(Class<T> domainClass) {
|
||||
return getEntityInformation(domainClass, null);
|
||||
}
|
||||
@@ -174,10 +158,6 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.QueryLookupStrategy#resolveQuery(java.lang.reflect.Method, org.springframework.data.repository.core.RepositoryMetadata, org.springframework.data.projection.ProjectionFactory, org.springframework.data.repository.core.NamedQueries)
|
||||
*/
|
||||
@Override
|
||||
public RepositoryQuery resolveQuery(Method method, RepositoryMetadata metadata, ProjectionFactory factory,
|
||||
NamedQueries namedQueries) {
|
||||
|
||||
@@ -84,10 +84,6 @@ public class R2dbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID exten
|
||||
this.operations = operations;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#setMappingContext(org.springframework.data.mapping.context.MappingContext)
|
||||
*/
|
||||
@Override
|
||||
protected void setMappingContext(MappingContext<?, ?> mappingContext) {
|
||||
|
||||
@@ -95,10 +91,6 @@ public class R2dbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID exten
|
||||
super.setMappingContext(mappingContext);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#createRepositoryFactory()
|
||||
*/
|
||||
@Override
|
||||
protected final RepositoryFactorySupport createRepositoryFactory() {
|
||||
|
||||
@@ -106,10 +98,6 @@ public class R2dbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID exten
|
||||
: getFactoryInstance(this.client, this.dataAccessStrategy);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#createDefaultQueryMethodEvaluationContextProvider(ListableBeanFactory)
|
||||
*/
|
||||
@Override
|
||||
protected Optional<QueryMethodEvaluationContextProvider> createDefaultQueryMethodEvaluationContextProvider(
|
||||
ListableBeanFactory beanFactory) {
|
||||
@@ -139,19 +127,11 @@ public class R2dbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID exten
|
||||
return new R2dbcRepositoryFactory(operations);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
|
||||
|
||||
@@ -43,10 +43,6 @@ abstract class ReactiveFluentQuerySupport<P, T> implements FluentQuery.ReactiveF
|
||||
this.fieldsToInclude = fieldsToInclude;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#sortBy(org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public ReactiveFluentQuery<T> sortBy(Sort sort) {
|
||||
|
||||
@@ -55,10 +51,6 @@ abstract class ReactiveFluentQuerySupport<P, T> implements FluentQuery.ReactiveF
|
||||
return create(predicate, sort, resultType, fieldsToInclude);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#as(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <R> ReactiveFluentQuery<R> as(Class<R> projection) {
|
||||
|
||||
@@ -67,10 +59,6 @@ abstract class ReactiveFluentQuerySupport<P, T> implements FluentQuery.ReactiveF
|
||||
return create(predicate, sort, projection, fieldsToInclude);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#project(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public ReactiveFluentQuery<T> project(Collection<String> properties) {
|
||||
|
||||
|
||||
@@ -109,10 +109,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
// Methods from ReactiveCrudRepository
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#save(S)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public <S extends T> Mono<S> save(S objectToSave) {
|
||||
@@ -126,10 +122,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return this.entityOperations.update(objectToSave);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#saveAll(java.lang.Iterable)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public <S extends T> Flux<S> saveAll(Iterable<S> objectsToSave) {
|
||||
@@ -139,10 +131,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return Flux.fromIterable(objectsToSave).concatMap(this::save);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#saveAll(org.reactivestreams.Publisher)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public <S extends T> Flux<S> saveAll(Publisher<S> objectsToSave) {
|
||||
@@ -152,10 +140,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return Flux.from(objectsToSave).concatMap(this::save);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#findById(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Mono<T> findById(ID id) {
|
||||
|
||||
@@ -164,19 +148,11 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return this.entityOperations.selectOne(getIdQuery(id), this.entity.getJavaType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#findById(org.reactivestreams.Publisher)
|
||||
*/
|
||||
@Override
|
||||
public Mono<T> findById(Publisher<ID> publisher) {
|
||||
return Mono.from(publisher).flatMap(this::findById);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#existsById(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Boolean> existsById(ID id) {
|
||||
|
||||
@@ -185,28 +161,16 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return this.entityOperations.exists(getIdQuery(id), this.entity.getJavaType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#existsById(org.reactivestreams.Publisher)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Boolean> existsById(Publisher<ID> publisher) {
|
||||
return Mono.from(publisher).flatMap(this::findById).hasElement();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#findAll()
|
||||
*/
|
||||
@Override
|
||||
public Flux<T> findAll() {
|
||||
return this.entityOperations.select(Query.empty(), this.entity.getJavaType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#findAllById(java.lang.Iterable)
|
||||
*/
|
||||
@Override
|
||||
public Flux<T> findAllById(Iterable<ID> iterable) {
|
||||
|
||||
@@ -215,10 +179,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return findAllById(Flux.fromIterable(iterable));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#findAllById(org.reactivestreams.Publisher)
|
||||
*/
|
||||
@Override
|
||||
public Flux<T> findAllById(Publisher<ID> idPublisher) {
|
||||
|
||||
@@ -236,19 +196,11 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#count()
|
||||
*/
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return this.entityOperations.count(Query.empty(), this.entity.getJavaType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteById(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Mono<Void> deleteById(ID id) {
|
||||
@@ -258,10 +210,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return this.entityOperations.delete(getIdQuery(id), this.entity.getJavaType()).then();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteById(org.reactivestreams.Publisher)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Mono<Void> deleteById(Publisher<ID> idPublisher) {
|
||||
@@ -280,10 +228,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
}).then();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#delete(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Mono<Void> delete(T objectToDelete) {
|
||||
@@ -293,10 +237,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return deleteById(this.entity.getRequiredId(objectToDelete));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAllById(java.lang.Iterable)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Void> deleteAllById(Iterable<? extends ID> ids) {
|
||||
|
||||
@@ -308,10 +248,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
.then();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAll(java.lang.Iterable)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Mono<Void> deleteAll(Iterable<? extends T> iterable) {
|
||||
@@ -321,10 +257,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return deleteAll(Flux.fromIterable(iterable));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAll(org.reactivestreams.Publisher)
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Mono<Void> deleteAll(Publisher<? extends T> objectPublisher) {
|
||||
@@ -337,10 +269,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return deleteById(idPublisher);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveCrudRepository#deleteAll()
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public Mono<Void> deleteAll() {
|
||||
@@ -351,10 +279,6 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
// Methods from ReactiveSortingRepository
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.reactive.ReactiveSortingRepository#findAll(org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public Flux<T> findAll(Sort sort) {
|
||||
|
||||
@@ -456,37 +380,21 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return new ReactiveFluentQueryByExample<>(predicate, sort, resultType, fieldsToInclude);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#one()
|
||||
*/
|
||||
@Override
|
||||
public Mono<T> one() {
|
||||
return createQuery().one();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#first()
|
||||
*/
|
||||
@Override
|
||||
public Mono<T> first() {
|
||||
return createQuery().first();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#all()
|
||||
*/
|
||||
@Override
|
||||
public Flux<T> all() {
|
||||
return createQuery().all();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#page(org.springframework.data.domain.Pageable)
|
||||
*/
|
||||
@Override
|
||||
public Mono<Page<T>> page(Pageable pageable) {
|
||||
|
||||
@@ -497,19 +405,11 @@ public class SimpleR2dbcRepository<T, ID> implements R2dbcRepository<T, ID> {
|
||||
return items.flatMap(content -> ReactivePageableExecutionUtils.getPage(content, pageable, this.count()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#count()
|
||||
*/
|
||||
@Override
|
||||
public Mono<Long> count() {
|
||||
return createQuery().count();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery#exists()
|
||||
*/
|
||||
@Override
|
||||
public Mono<Boolean> exists() {
|
||||
return createQuery().exists();
|
||||
|
||||
@@ -62,19 +62,11 @@ class DefaultRootAggregateChange<T> implements RootAggregateChange<T> {
|
||||
actions.add(action);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.AggregateChange#getKind()
|
||||
*/
|
||||
@Override
|
||||
public Kind getKind() {
|
||||
return this.kind;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.AggregateChange#getEntityType()
|
||||
*/
|
||||
@Override
|
||||
public Class<T> getEntityType() {
|
||||
return this.entityType;
|
||||
@@ -103,19 +95,11 @@ class DefaultRootAggregateChange<T> implements RootAggregateChange<T> {
|
||||
return previousVersion;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.AggregateChange#getEntity()
|
||||
*/
|
||||
@Override
|
||||
public T getRoot() {
|
||||
return this.rootAction.getEntity();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.AggregateChange#forEachAction(java.util.function.Consumer)
|
||||
*/
|
||||
@Override
|
||||
public void forEachAction(Consumer<? super DbAction<?>> consumer) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user