@@ -133,10 +133,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
this.entityCallbacks = entityCallbacks;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#save(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> T save(T instance) {
|
||||
|
||||
@@ -184,10 +180,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return store(instance, this::createUpdateChange, persistentEntity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#count(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public long count(Class<?> domainType) {
|
||||
|
||||
@@ -196,10 +188,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return accessStrategy.count(domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> T findById(Object id, Class<T> domainType) {
|
||||
|
||||
@@ -213,10 +201,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return entity;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#existsById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> boolean existsById(Object id, Class<T> domainType) {
|
||||
|
||||
@@ -226,10 +210,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return accessStrategy.existsById(id, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Sort sort) {
|
||||
|
||||
@@ -239,10 +219,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return triggerAfterConvert(all);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Pageable)
|
||||
*/
|
||||
@Override
|
||||
public <T> Page<T> findAll(Class<T> domainType, Pageable pageable) {
|
||||
|
||||
@@ -254,10 +230,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return PageableExecutionUtils.getPage(content, pageable, () -> accessStrategy.count(domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType) {
|
||||
|
||||
@@ -267,10 +239,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return triggerAfterConvert(all);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAllById(java.lang.Iterable, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType) {
|
||||
|
||||
@@ -281,10 +249,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
return triggerAfterConvert(allById);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#delete(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <S> void delete(S aggregateRoot, Class<S> domainType) {
|
||||
|
||||
@@ -297,10 +261,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
deleteTree(identifierAccessor.getRequiredIdentifier(), aggregateRoot, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#deleteById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <S> void deleteById(Object id, Class<S> domainType) {
|
||||
|
||||
@@ -310,10 +270,6 @@ public class JdbcAggregateTemplate implements JdbcAggregateOperations {
|
||||
deleteTree(id, null, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#deleteAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void deleteAll(Class<?> domainType) {
|
||||
|
||||
|
||||
@@ -131,10 +131,6 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
this.spELContext = new SpELContext(ResultSetAccessorPropertyAccessor.INSTANCE);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||
this.spELContext = new SpELContext(this.spELContext, applicationContext);
|
||||
@@ -165,19 +161,11 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
return getColumnType(referencedEntity.getRequiredIdProperty());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.convert.JdbcConverter#getSqlType(org.springframework.data.relational.core.mapping.RelationalPersistentProperty)
|
||||
*/
|
||||
@Override
|
||||
public int getSqlType(RelationalPersistentProperty property) {
|
||||
return JdbcUtil.sqlTypeFor(getColumnType(property));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.convert.JdbcConverter#getColumnType(org.springframework.data.relational.core.mapping.RelationalPersistentProperty)
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getColumnType(RelationalPersistentProperty property) {
|
||||
return doGetColumnType(property);
|
||||
@@ -210,10 +198,6 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
return componentColumnType;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#readValue(java.lang.Object, org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Object readValue(@Nullable Object value, TypeInformation<?> type) {
|
||||
@@ -241,10 +225,6 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
return super.readValue(value, type);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#writeValue(java.lang.Object, org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Object writeValue(@Nullable Object value, TypeInformation<?> type) {
|
||||
@@ -282,10 +262,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, int sqlType) {
|
||||
|
||||
@@ -608,10 +584,6 @@ public class BasicJdbcConverter extends BasicRelationalConverter implements Jdbc
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.ParameterValueProvider#getParameterValue(org.springframework.data.mapping.PreferredConstructor.Parameter)
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public <T> T getParameterValue(PreferredConstructor.Parameter<T, RelationalPersistentProperty> parameter) {
|
||||
|
||||
@@ -45,164 +45,92 @@ public class CascadingDataAccessStrategy implements DataAccessStrategy {
|
||||
this.strategies = new ArrayList<>(strategies);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, org.springframework.data.jdbc.core.ParentKeys)
|
||||
*/
|
||||
@Override
|
||||
public <T> Object insert(T instance, Class<T> domainType, Identifier identifier) {
|
||||
return collect(das -> das.insert(instance, domainType, identifier));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#update(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean update(S instance, Class<S> domainType) {
|
||||
return collect(das -> das.update(instance, domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#updateWithVersion(java.lang.Object, java.lang.Class, java.lang.Number)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean updateWithVersion(S instance, Class<S> domainType, Number previousVersion) {
|
||||
return collect(das -> das.updateWithVersion(instance, domainType, previousVersion));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object id, Class<?> domainType) {
|
||||
collectVoid(das -> das.delete(id, domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteInstance(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteWithVersion(Object id, Class<T> domainType, Number previousVersion) {
|
||||
collectVoid(das -> das.deleteWithVersion(id, domainType, previousVersion));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object rootId, PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
collectVoid(das -> das.delete(rootId, propertyPath));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteAll(Class<T> domainType) {
|
||||
collectVoid(das -> das.deleteAll(domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void deleteAll(PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
collectVoid(das -> das.deleteAll(propertyPath));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockById(java.lang.Object, org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockById(Object id, LockMode lockMode, Class<T> domainType) {
|
||||
collectVoid(das -> das.acquireLockById(id, lockMode, domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockAll(org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockAll(LockMode lockMode, Class<T> domainType) {
|
||||
collectVoid(das -> das.acquireLockAll(lockMode, domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#count(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public long count(Class<?> domainType) {
|
||||
return collect(das -> das.count(domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> T findById(Object id, Class<T> domainType) {
|
||||
return collect(das -> das.findById(id, domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType) {
|
||||
return collect(das -> das.findAll(domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAllById(java.lang.Iterable, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType) {
|
||||
return collect(das -> das.findAllById(ids, domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.RelationResolver#findAllByPath(org.springframework.data.jdbc.support.Identifier, org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<Object> findAllByPath(Identifier identifier,
|
||||
PersistentPropertyPath<? extends RelationalPersistentProperty> path) {
|
||||
return collect(das -> das.findAllByPath(identifier, path));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#existsById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> boolean existsById(Object id, Class<T> domainType) {
|
||||
return collect(das -> das.existsById(id, domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Sort sort) {
|
||||
return collect(das -> das.findAll(domainType, sort));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Pageable)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Pageable pageable) {
|
||||
return collect(das -> das.findAll(domainType, pageable));
|
||||
|
||||
@@ -187,10 +187,6 @@ public interface DataAccessStrategy extends RelationResolver {
|
||||
*/
|
||||
<T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.RelationResolver#findAllByPath(org.springframework.data.jdbc.support.Identifier, org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
Iterable<Object> findAllByPath(Identifier identifier,
|
||||
PersistentPropertyPath<? extends RelationalPersistentProperty> path);
|
||||
|
||||
@@ -100,10 +100,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
this.operations = operations;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public <T> Object insert(T instance, Class<T> domainType, Identifier identifier) {
|
||||
|
||||
@@ -155,10 +151,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
return getIdFromHolder(holder, persistentEntity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#update(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean update(S instance, Class<S> domainType) {
|
||||
|
||||
@@ -167,10 +159,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
getParameterSource(instance, persistentEntity, "", Predicates.includeAll(), getIdentifierProcessing())) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#updateWithVersion(java.lang.Object, java.lang.Class, java.lang.Number)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean updateWithVersion(S instance, Class<S> domainType, Number previousVersion) {
|
||||
|
||||
@@ -192,10 +180,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object id, Class<?> domainType) {
|
||||
|
||||
@@ -205,10 +189,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
operations.update(deleteByIdSql, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteInstance(java.lang.Object, java.lang.Class, java.lang.Number)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteWithVersion(Object id, Class<T> domainType, Number previousVersion) {
|
||||
|
||||
@@ -226,10 +206,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, org.springframework.data.mapping.PropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object rootId, PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
|
||||
@@ -251,29 +227,17 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
operations.update(delete, parameters);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteAll(Class<T> domainType) {
|
||||
operations.getJdbcOperations().update(sql(domainType).createDeleteAllSql(null));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(org.springframework.data.mapping.PropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void deleteAll(PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
operations.getJdbcOperations()
|
||||
.update(sql(propertyPath.getBaseProperty().getOwner().getType()).createDeleteAllSql(propertyPath));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockById(java.lang.Object, org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockById(Object id, LockMode lockMode, Class<T> domainType) {
|
||||
|
||||
@@ -283,10 +247,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
operations.query(acquireLockByIdSql, parameter, ResultSet::next);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockAll(org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockAll(LockMode lockMode, Class<T> domainType) {
|
||||
|
||||
@@ -294,10 +254,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
operations.getJdbcOperations().query(acquireLockAllSql, ResultSet::next);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#count(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public long count(Class<?> domainType) {
|
||||
|
||||
@@ -308,10 +264,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T findById(Object id, Class<T> domainType) {
|
||||
@@ -326,20 +278,12 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> Iterable<T> findAll(Class<T> domainType) {
|
||||
return operations.query(sql(domainType).getFindAll(), (RowMapper<T>) getEntityRowMapper(domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAllById(java.lang.Iterable, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType) {
|
||||
@@ -358,10 +302,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
return operations.query(findAllInListSql, parameterSource, (RowMapper<T>) getEntityRowMapper(domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.RelationResolver#findAllByPath(org.springframework.data.jdbc.support.Identifier, org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public Iterable<Object> findAllByPath(Identifier identifier,
|
||||
@@ -393,10 +333,6 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
return parameterSource;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#existsById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> boolean existsById(Object id, Class<T> domainType) {
|
||||
|
||||
@@ -409,20 +345,12 @@ public class DefaultDataAccessStrategy implements DataAccessStrategy {
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Sort sort) {
|
||||
return operations.query(sql(domainType).getFindAll(sort), (RowMapper<T>) getEntityRowMapper(domainType));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Pageable)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Pageable pageable) {
|
||||
|
||||
@@ -36,110 +36,62 @@ public class DelegatingDataAccessStrategy implements DataAccessStrategy {
|
||||
|
||||
private DataAccessStrategy delegate;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, org.springframework.data.jdbc.core.ParentKeys)
|
||||
*/
|
||||
@Override
|
||||
public <T> Object insert(T instance, Class<T> domainType, Identifier identifier) {
|
||||
return delegate.insert(instance, domainType, identifier);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#update(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean update(S instance, Class<S> domainType) {
|
||||
return delegate.update(instance, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#updateWithVersion(java.lang.Object, java.lang.Class, java.lang.Number)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean updateWithVersion(S instance, Class<S> domainType, Number nextVersion) {
|
||||
return delegate.updateWithVersion(instance, domainType, nextVersion);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object rootId, PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
delegate.delete(rootId, propertyPath);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object id, Class<?> domainType) {
|
||||
delegate.delete(id, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteWithVersion(java.lang.Object, java.lang.Class, Number)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteWithVersion(Object id, Class<T> domainType, Number previousVersion) {
|
||||
delegate.deleteWithVersion(id, domainType, previousVersion);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteAll(Class<T> domainType) {
|
||||
delegate.deleteAll(domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void deleteAll(PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
delegate.deleteAll(propertyPath);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockById(java.lang.Object, org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockById(Object id, LockMode lockMode, Class<T> domainType) {
|
||||
delegate.acquireLockById(id, lockMode, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockAll(org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockAll(LockMode lockMode, Class<T> domainType) {
|
||||
delegate.acquireLockAll(lockMode, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#count(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public long count(Class<?> domainType) {
|
||||
return delegate.count(domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> T findById(Object id, Class<T> domainType) {
|
||||
|
||||
@@ -148,56 +100,32 @@ public class DelegatingDataAccessStrategy implements DataAccessStrategy {
|
||||
return delegate.findById(id, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType) {
|
||||
return delegate.findAll(domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAllById(java.lang.Iterable, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType) {
|
||||
return delegate.findAllById(ids, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.RelationResolver#findAllByPath(org.springframework.data.jdbc.support.Identifier, org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<Object> findAllByPath(Identifier identifier,
|
||||
PersistentPropertyPath<? extends RelationalPersistentProperty> path) {
|
||||
return delegate.findAllByPath(identifier, path);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#existsById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> boolean existsById(Object id, Class<T> domainType) {
|
||||
return delegate.existsById(id, domainType);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Sort sort) {
|
||||
return delegate.findAll(domainType, sort);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Pageable)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Pageable pageable) {
|
||||
return delegate.findAll(domainType, pageable);
|
||||
|
||||
@@ -56,10 +56,6 @@ public class EntityRowMapper<T> implements RowMapper<T> {
|
||||
this.identifier = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
|
||||
*/
|
||||
@Override
|
||||
public T mapRow(ResultSet resultSet, int rowNumber) {
|
||||
|
||||
|
||||
@@ -43,19 +43,11 @@ class FunctionCollector<T> implements Collector<DataAccessStrategy, FunctionColl
|
||||
this.method = method;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.stream.Collector#supplier()
|
||||
*/
|
||||
@Override
|
||||
public Supplier<ResultOrException<T>> supplier() {
|
||||
return ResultOrException::new;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.stream.Collector#accumulator()
|
||||
*/
|
||||
@Override
|
||||
public BiConsumer<ResultOrException<T>, DataAccessStrategy> accumulator() {
|
||||
|
||||
@@ -72,10 +64,6 @@ class FunctionCollector<T> implements Collector<DataAccessStrategy, FunctionColl
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.stream.Collector#combiner()
|
||||
*/
|
||||
@Override
|
||||
public BinaryOperator<ResultOrException<T>> combiner() {
|
||||
|
||||
@@ -84,10 +72,6 @@ class FunctionCollector<T> implements Collector<DataAccessStrategy, FunctionColl
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.stream.Collector#finisher()
|
||||
*/
|
||||
@Override
|
||||
public Function<ResultOrException<T>, T> finisher() {
|
||||
|
||||
@@ -101,10 +85,6 @@ class FunctionCollector<T> implements Collector<DataAccessStrategy, FunctionColl
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.stream.Collector#characteristics()
|
||||
*/
|
||||
@Override
|
||||
public Set<Characteristics> characteristics() {
|
||||
return Collections.emptySet();
|
||||
|
||||
@@ -27,10 +27,6 @@ import org.springframework.data.relational.core.dialect.ArrayColumns;
|
||||
*/
|
||||
public interface JdbcArrayColumns extends ArrayColumns {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#getArrayType(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
default Class<?> getArrayType(Class<?> userType) {
|
||||
|
||||
@@ -62,19 +58,11 @@ public interface JdbcArrayColumns extends ArrayColumns {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#isSupported()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#JdbcArrayColumns(JDBCType)
|
||||
*/
|
||||
@Override
|
||||
public String getArrayTypeName(SQLType jdbcType) {
|
||||
throw new UnsupportedOperationException("Array types not supported");
|
||||
@@ -89,19 +77,11 @@ public interface JdbcArrayColumns extends ArrayColumns {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#isSupported()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#JdbcArrayColumns(JDBCType)
|
||||
*/
|
||||
@Override
|
||||
public String getArrayTypeName(SQLType jdbcType) {
|
||||
return jdbcType.getName();
|
||||
|
||||
@@ -30,28 +30,16 @@ class ResultSetAccessorPropertyAccessor implements PropertyAccessor {
|
||||
|
||||
static final PropertyAccessor INSTANCE = new ResultSetAccessorPropertyAccessor();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#getSpecificTargetClasses()
|
||||
*/
|
||||
@Override
|
||||
public Class<?>[] getSpecificTargetClasses() {
|
||||
return new Class<?>[] { ResultSetAccessor.class };
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#canRead(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean canRead(EvaluationContext context, @Nullable Object target, String name) {
|
||||
return target instanceof ResultSetAccessor && ((ResultSetAccessor) target).hasValue(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#read(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public TypedValue read(EvaluationContext context, @Nullable Object target, String name) {
|
||||
|
||||
@@ -68,19 +56,11 @@ class ResultSetAccessorPropertyAccessor implements PropertyAccessor {
|
||||
return new TypedValue(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#canWrite(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public boolean canWrite(EvaluationContext context, @Nullable Object target, String name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.expression.PropertyAccessor#write(org.springframework.expression.EvaluationContext, java.lang.Object, java.lang.String, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void write(EvaluationContext context, @Nullable Object target, String name, @Nullable Object newValue) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
@@ -60,19 +60,11 @@ public class BasicJdbcPersistentProperty extends BasicRelationalPersistentProper
|
||||
super(property, owner, simpleTypeHolder, namingStrategy);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.AnnotationBasedPersistentProperty#isAssociation()
|
||||
*/
|
||||
@Override
|
||||
public boolean isAssociation() {
|
||||
return super.isAssociation() || AggregateReference.class.isAssignableFrom(getRawType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.BasicRelationalPersistentProperty#isReference()
|
||||
*/
|
||||
@Override
|
||||
public boolean isReference() {
|
||||
return isAssociation();
|
||||
|
||||
@@ -59,10 +59,6 @@ public class JdbcMappingContext extends RelationalMappingContext {
|
||||
setSimpleTypeHolder(JdbcSimpleTypes.HOLDER);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalMappingContext#createPersistentEntity(org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Override
|
||||
protected <T> RelationalPersistentEntity<T> createPersistentEntity(TypeInformation<T> typeInformation) {
|
||||
|
||||
@@ -80,10 +76,6 @@ public class JdbcMappingContext extends RelationalMappingContext {
|
||||
return entity;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.AbstractMappingContext#createPersistentProperty(org.springframework.data.mapping.model.Property, org.springframework.data.mapping.model.MutablePersistentEntity, org.springframework.data.mapping.model.SimpleTypeHolder)
|
||||
*/
|
||||
@Override
|
||||
protected RelationalPersistentProperty createPersistentProperty(Property property,
|
||||
RelationalPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) {
|
||||
|
||||
@@ -146,10 +146,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
this.namespaceStrategy = namespaceStrategy;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#insert(java.lang.Object, java.lang.Class, ParentKeys)
|
||||
*/
|
||||
@Override
|
||||
public <T> Object insert(T instance, Class<T> domainType, Identifier identifier) {
|
||||
|
||||
@@ -159,10 +155,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
return myBatisContext.getId();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#update(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean update(S instance, Class<S> domainType) {
|
||||
|
||||
@@ -170,10 +162,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
new MyBatisContext(null, instance, domainType, Collections.emptyMap())) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#updateWithVersion(java.lang.Object, java.lang.Class, java.lang.Number)
|
||||
*/
|
||||
@Override
|
||||
public <S> boolean updateWithVersion(S instance, Class<S> domainType, Number previousVersion) {
|
||||
|
||||
@@ -183,10 +171,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
return sqlSession().update(statement, parameter) != 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object id, Class<?> domainType) {
|
||||
|
||||
@@ -195,10 +179,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
sqlSession().delete(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteInstance(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteWithVersion(Object id, Class<T> domainType, Number previousVersion) {
|
||||
|
||||
@@ -208,10 +188,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
sqlSession().delete(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#delete(java.lang.Object, org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void delete(Object rootId, PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
|
||||
@@ -223,10 +199,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
sqlSession().delete(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void deleteAll(Class<T> domainType) {
|
||||
|
||||
@@ -235,10 +207,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
sqlSession().delete(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#deleteAll(org.springframework.data.mapping.PersistentPropertyPath)
|
||||
*/
|
||||
@Override
|
||||
public void deleteAll(PersistentPropertyPath<RelationalPersistentProperty> propertyPath) {
|
||||
|
||||
@@ -250,10 +218,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
sqlSession().delete(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockById(java.lang.Object, org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockById(Object id, LockMode lockMode, Class<T> domainType) {
|
||||
|
||||
@@ -268,10 +232,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#acquireLockAll(org.springframework.data.relational.core.sql.LockMode, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> void acquireLockAll(LockMode lockMode, Class<T> domainType) {
|
||||
|
||||
@@ -281,10 +241,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
sqlSession().selectOne(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> T findById(Object id, Class<T> domainType) {
|
||||
|
||||
@@ -293,10 +249,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
return sqlSession().selectOne(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAll(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType) {
|
||||
|
||||
@@ -305,10 +257,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
return sqlSession().selectList(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#findAllById(java.lang.Iterable, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAllById(Iterable<?> ids, Class<T> domainType) {
|
||||
return sqlSession().selectList(namespace(domainType) + ".findAllById",
|
||||
@@ -327,10 +275,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#existsById(java.lang.Object, java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public <T> boolean existsById(Object id, Class<T> domainType) {
|
||||
|
||||
@@ -339,10 +283,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
return sqlSession().selectOne(statement, parameter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Sort)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Sort sort) {
|
||||
|
||||
@@ -352,10 +292,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
new MyBatisContext(null, null, domainType, additionalContext));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.JdbcAggregateOperations#findAll(java.lang.Class, org.springframework.data.domain.Pageable)
|
||||
*/
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> domainType, Pageable pageable) {
|
||||
|
||||
@@ -365,10 +301,6 @@ public class MyBatisDataAccessStrategy implements DataAccessStrategy {
|
||||
new MyBatisContext(null, null, domainType, additionalContext));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.core.DataAccessStrategy#count(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public long count(Class<?> domainType) {
|
||||
|
||||
|
||||
@@ -63,10 +63,6 @@ class JdbcAuditingRegistrar extends AuditingBeanDefinitionRegistrarSupport {
|
||||
return AUDITING_HANDLER_BEAN_NAME;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.auditing.config.AuditingBeanDefinitionRegistrarSupport#getAuditHandlerBeanDefinitionBuilder(org.springframework.data.auditing.config.AuditingConfiguration)
|
||||
*/
|
||||
@Override
|
||||
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration) {
|
||||
|
||||
|
||||
@@ -28,19 +28,11 @@ import org.springframework.data.repository.config.RepositoryConfigurationExtensi
|
||||
*/
|
||||
class JdbcRepositoriesRegistrar extends RepositoryBeanDefinitionRegistrarSupport {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport#getAnnotation()
|
||||
*/
|
||||
@Override
|
||||
protected Class<? extends Annotation> getAnnotation() {
|
||||
return EnableJdbcRepositories.class;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport#getExtension()
|
||||
*/
|
||||
@Override
|
||||
protected RepositoryConfigurationExtension getExtension() {
|
||||
return new JdbcRepositoryConfigExtension();
|
||||
|
||||
@@ -41,37 +41,21 @@ public class JdbcRepositoryConfigExtension extends RepositoryConfigurationExtens
|
||||
|
||||
private static final String DEFAULT_TRANSACTION_MANAGER_BEAN_NAME = "transactionManager";
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtension#getModuleName()
|
||||
*/
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return "JDBC";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getRepositoryFactoryBeanClassName()
|
||||
*/
|
||||
@Override
|
||||
public String getRepositoryFactoryBeanClassName() {
|
||||
return JdbcRepositoryFactoryBean.class.getName();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getModulePrefix()
|
||||
*/
|
||||
@Override
|
||||
protected String getModulePrefix() {
|
||||
return getModuleName().toLowerCase(Locale.US);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#postProcess(org.springframework.beans.factory.support.BeanDefinitionBuilder, org.springframework.data.repository.config.RepositoryConfigurationSource)
|
||||
*/
|
||||
@Override
|
||||
public void postProcess(BeanDefinitionBuilder builder, RepositoryConfigurationSource source) {
|
||||
|
||||
|
||||
@@ -38,10 +38,6 @@ public class MyBatisJdbcConfiguration extends AbstractJdbcConfiguration {
|
||||
|
||||
private @Autowired SqlSession session;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration#dataAccessStrategyBean(org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations, org.springframework.data.jdbc.core.convert.JdbcConverter, org.springframework.data.jdbc.core.mapping.JdbcMappingContext)
|
||||
*/
|
||||
@Bean
|
||||
@Override
|
||||
public DataAccessStrategy dataAccessStrategyBean(NamedParameterJdbcOperations operations, JdbcConverter jdbcConverter,
|
||||
|
||||
@@ -65,10 +65,6 @@ public abstract class AbstractJdbcQuery implements RepositoryQuery {
|
||||
this.operations = operations;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.RepositoryQuery#getQueryMethod()
|
||||
*/
|
||||
@Override
|
||||
public JdbcQueryMethod getQueryMethod() {
|
||||
return queryMethod;
|
||||
|
||||
@@ -67,10 +67,6 @@ interface JdbcQueryExecution<T> {
|
||||
mappingContext, instantiators));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Object convert(Object source) {
|
||||
|
||||
|
||||
@@ -68,17 +68,11 @@ public class JdbcQueryMethod extends QueryMethod {
|
||||
this.annotationCache = new ConcurrentReferenceHashMap<>();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.QueryMethod#createParameters(java.lang.reflect.Method)
|
||||
*/
|
||||
@Override
|
||||
protected RelationalParameters createParameters(Method method) {
|
||||
return new RelationalParameters(method);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.QueryMethod#getEntityInformation()
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public RelationalEntityMetadata<?> getEntityInformation() {
|
||||
@@ -109,9 +103,6 @@ public class JdbcQueryMethod extends QueryMethod {
|
||||
return this.metadata;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.QueryMethod#getParameters()
|
||||
*/
|
||||
@Override
|
||||
public RelationalParameters getParameters() {
|
||||
return (RelationalParameters) super.getParameters();
|
||||
|
||||
@@ -113,10 +113,6 @@ public class PartTreeJdbcQuery extends AbstractJdbcQuery {
|
||||
return parameters.potentiallySortsDynamically() ? accessor.getSort() : Sort.unsorted();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.RepositoryQuery#execute(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public Object execute(Object[] values) {
|
||||
|
||||
|
||||
@@ -803,19 +803,11 @@ class QueryMapper {
|
||||
return path;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mongodb.core.convert.QueryMapper.Field#isEmbedded()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmbedded() {
|
||||
return this.embedded;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mongodb.core.convert.QueryMapper.Field#getTypeHint()
|
||||
*/
|
||||
@Override
|
||||
public TypeInformation<?> getTypeHint() {
|
||||
|
||||
@@ -834,10 +826,6 @@ class QueryMapper {
|
||||
return this.property.getTypeInformation();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mongodb.core.convert.QueryMapper.Field#getSqlType()
|
||||
*/
|
||||
@Override
|
||||
public int getSqlType() {
|
||||
return this.sqlType;
|
||||
|
||||
@@ -108,10 +108,6 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.RepositoryQuery#execute(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public Object execute(Object[] objects) {
|
||||
|
||||
@@ -131,10 +127,6 @@ public class StringBasedJdbcQuery extends AbstractJdbcQuery {
|
||||
return queryExecution.execute(determineQuery(), this.bindParameters(accessor));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.query.RepositoryQuery#getQueryMethod()
|
||||
*/
|
||||
@Override
|
||||
public JdbcQueryMethod getQueryMethod() {
|
||||
return queryMethod;
|
||||
|
||||
@@ -96,10 +96,6 @@ class JdbcQueryLookupStrategy implements QueryLookupStrategy {
|
||||
this.beanfactory = beanfactory;
|
||||
}
|
||||
|
||||
/*
|
||||
* (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 repositoryMetadata,
|
||||
ProjectionFactory projectionFactory, NamedQueries namedQueries) {
|
||||
|
||||
@@ -109,10 +109,6 @@ public class JdbcRepositoryFactory extends RepositoryFactorySupport {
|
||||
return (EntityInformation<T, ID>) new PersistentEntityInformation<>(entity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactorySupport#getTargetRepository(org.springframework.data.repository.core.RepositoryInformation)
|
||||
*/
|
||||
@Override
|
||||
protected Object getTargetRepository(RepositoryInformation repositoryInformation) {
|
||||
|
||||
@@ -128,19 +124,11 @@ public class JdbcRepositoryFactory extends RepositoryFactorySupport {
|
||||
return getTargetRepositoryViaReflection(repositoryInformation.getRepositoryBaseClass(), template, persistentEntity);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactorySupport#getRepositoryBaseClass(org.springframework.data.repository.core.RepositoryMetadata)
|
||||
*/
|
||||
@Override
|
||||
protected Class<?> getRepositoryBaseClass(RepositoryMetadata repositoryMetadata) {
|
||||
return SimpleJdbcRepository.class;
|
||||
}
|
||||
|
||||
/*
|
||||
* (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 QueryLookupStrategy.Key key,
|
||||
QueryMethodEvaluationContextProvider evaluationContextProvider) {
|
||||
|
||||
@@ -68,10 +68,6 @@ public class JdbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extend
|
||||
super(repositoryInterface);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher)
|
||||
*/
|
||||
@Override
|
||||
public void setApplicationEventPublisher(ApplicationEventPublisher publisher) {
|
||||
|
||||
@@ -157,10 +153,6 @@ public class JdbcRepositoryFactoryBean<T extends Repository<S, ID>, S, ID extend
|
||||
this.beanFactory = beanFactory;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport#afterPropertiesSet()
|
||||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
|
||||
|
||||
@@ -50,20 +50,12 @@ public class SimpleJdbcRepository<T, ID> implements PagingAndSortingRepository<T
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#save(S)
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public <S extends T> S save(S instance) {
|
||||
return entityOperations.save(instance);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#save(java.lang.Iterable)
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public <S extends T> Iterable<S> saveAll(Iterable<S> entities) {
|
||||
@@ -73,84 +65,48 @@ public class SimpleJdbcRepository<T, ID> implements PagingAndSortingRepository<T
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#findOne(java.io.Serializable)
|
||||
*/
|
||||
@Override
|
||||
public Optional<T> findById(ID id) {
|
||||
return Optional.ofNullable(entityOperations.findById(id, entity.getType()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#exists(java.io.Serializable)
|
||||
*/
|
||||
@Override
|
||||
public boolean existsById(ID id) {
|
||||
return entityOperations.existsById(id, entity.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#findAll()
|
||||
*/
|
||||
@Override
|
||||
public Iterable<T> findAll() {
|
||||
return entityOperations.findAll(entity.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#findAll(java.lang.Iterable)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<T> findAllById(Iterable<ID> ids) {
|
||||
return entityOperations.findAllById(ids, entity.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#count()
|
||||
*/
|
||||
@Override
|
||||
public long count() {
|
||||
return entityOperations.count(entity.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#delete(java.io.Serializable)
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void deleteById(ID id) {
|
||||
entityOperations.deleteById(id, entity.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#delete(java.lang.Object)
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void delete(T instance) {
|
||||
entityOperations.delete(instance, entity.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.deleteAll#delete(java.lang.Iterable)
|
||||
*/
|
||||
@Override
|
||||
public void deleteAllById(Iterable<? extends ID> ids) {
|
||||
ids.forEach(it -> entityOperations.deleteById(it, entity.getType()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#delete(java.lang.Iterable)
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -158,29 +114,17 @@ public class SimpleJdbcRepository<T, ID> implements PagingAndSortingRepository<T
|
||||
entities.forEach(it -> entityOperations.delete(it, (Class<T>) it.getClass()));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.CrudRepository#deleteAll()
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public void deleteAll() {
|
||||
entityOperations.deleteAll(entity.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.PagingAndSortingRepository#findAll(org.springframework.data.domain.Sort sort)
|
||||
*/
|
||||
@Override
|
||||
public Iterable<T> findAll(Sort sort) {
|
||||
return entityOperations.findAll(entity.getType(), sort);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.PagingAndSortingRepository#findAll(org.springframework.data.domain.Pageable pageable)
|
||||
*/
|
||||
@Override
|
||||
public Page<T> findAll(Pageable pageable) {
|
||||
return entityOperations.findAll(entity.getType(), pageable);
|
||||
|
||||
@@ -41,10 +41,6 @@ class Db2DataSourceConfiguration extends DataSourceConfiguration {
|
||||
|
||||
private static Db2Container DB_2_CONTAINER;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
|
||||
*/
|
||||
@Override
|
||||
protected DataSource createDataSource() {
|
||||
|
||||
@@ -62,10 +58,6 @@ class Db2DataSourceConfiguration extends DataSourceConfiguration {
|
||||
DB_2_CONTAINER.getUsername(), DB_2_CONTAINER.getPassword());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.customizePopulator#createDataSource(org.springframework.jdbc.datasource.init.ResourceDatabasePopulator)
|
||||
*/
|
||||
@Override
|
||||
protected void customizePopulator(ResourceDatabasePopulator populator) {
|
||||
populator.setIgnoreFailedDrops(true);
|
||||
|
||||
@@ -41,10 +41,6 @@ class MariaDBDataSourceConfiguration extends DataSourceConfiguration implements
|
||||
|
||||
private static MariaDBContainer<?> MARIADB_CONTAINER;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
|
||||
*/
|
||||
@Override
|
||||
protected DataSource createDataSource() {
|
||||
|
||||
|
||||
@@ -41,10 +41,6 @@ public class MsSqlDataSourceConfiguration extends DataSourceConfiguration {
|
||||
|
||||
private static MSSQLServerContainer<?> MSSQL_CONTAINER;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
|
||||
*/
|
||||
@Override
|
||||
protected DataSource createDataSource() {
|
||||
|
||||
|
||||
@@ -43,10 +43,6 @@ class MySqlDataSourceConfiguration extends DataSourceConfiguration implements In
|
||||
|
||||
private static MySQLContainer<?> MYSQL_CONTAINER;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
|
||||
*/
|
||||
@Override
|
||||
protected DataSource createDataSource() {
|
||||
|
||||
|
||||
@@ -44,10 +44,6 @@ public class OracleDataSourceConfiguration extends DataSourceConfiguration {
|
||||
|
||||
private static OracleContainer ORACLE_CONTAINER;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
|
||||
*/
|
||||
@Override
|
||||
protected DataSource createDataSource() {
|
||||
|
||||
|
||||
@@ -39,10 +39,6 @@ public class PostgresDataSourceConfiguration extends DataSourceConfiguration {
|
||||
|
||||
private static PostgreSQLContainer<?> POSTGRESQL_CONTAINER;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.DataSourceConfiguration#createDataSource()
|
||||
*/
|
||||
@Override
|
||||
protected DataSource createDataSource() {
|
||||
|
||||
@@ -62,10 +58,6 @@ public class PostgresDataSourceConfiguration extends DataSourceConfiguration {
|
||||
return dataSource;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.jdbc.testing.DataSourceFactoryBean#customizePopulator(org.springframework.jdbc.datasource.init.ResourceDatabasePopulator)
|
||||
*/
|
||||
@Override
|
||||
protected void customizePopulator(ResourceDatabasePopulator populator) {
|
||||
populator.setIgnoreFailedDrops(true);
|
||||
|
||||
@@ -50,19 +50,11 @@ public class RelationalAuditingCallback implements BeforeConvertCallback<Object>
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.Ordered#getOrder()
|
||||
*/
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return AUDITING_ORDER;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.event.BeforeConvertCallback#onBeforeConvert(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Object onBeforeConvert(Object entity) {
|
||||
return handler.markAudited(entity);
|
||||
|
||||
@@ -103,10 +103,6 @@ public class BasicRelationalConverter implements RelationalConverter {
|
||||
conversions.registerConvertersIn(this.conversionService);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#getConversionService()
|
||||
*/
|
||||
@Override
|
||||
public ConversionService getConversionService() {
|
||||
return conversionService;
|
||||
@@ -116,19 +112,11 @@ public class BasicRelationalConverter implements RelationalConverter {
|
||||
return conversions;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#getMappingContext()
|
||||
*/
|
||||
@Override
|
||||
public MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> getMappingContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#getPropertyAccessor(org.springframework.data.mapping.PersistentEntity, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public <T> PersistentPropertyAccessor<T> getPropertyAccessor(PersistentEntity<T, ?> persistentEntity, T instance) {
|
||||
|
||||
@@ -136,10 +124,6 @@ public class BasicRelationalConverter implements RelationalConverter {
|
||||
return new ConvertingPropertyAccessor<>(accessor, conversionService);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#createInstance(org.springframework.data.mapping.PersistentEntity, java.util.function.Function)
|
||||
*/
|
||||
@Override
|
||||
public <T> T createInstance(PersistentEntity<T, RelationalPersistentProperty> entity,
|
||||
Function<Parameter<?, RelationalPersistentProperty>, Object> parameterValueProvider) {
|
||||
@@ -148,10 +132,6 @@ public class BasicRelationalConverter implements RelationalConverter {
|
||||
.createInstance(entity, new ConvertingParameterValueProvider<>(parameterValueProvider));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#readValue(java.lang.Object, org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Object readValue(@Nullable Object value, TypeInformation<?> type) {
|
||||
@@ -171,10 +151,6 @@ public class BasicRelationalConverter implements RelationalConverter {
|
||||
return getPotentiallyConvertedSimpleRead(value, type.getType());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.RelationalConverter#writeValue(java.lang.Object, org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Object writeValue(@Nullable Object value, TypeInformation<?> type) {
|
||||
@@ -281,10 +257,6 @@ public class BasicRelationalConverter implements RelationalConverter {
|
||||
this.delegate = delegate;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.ParameterValueProvider#getParameterValue(org.springframework.data.mapping.PreferredConstructor.Parameter)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getParameterValue(Parameter<T, P> parameter) {
|
||||
|
||||
@@ -61,19 +61,11 @@ class DefaultAggregateChange<T> implements MutableAggregateChange<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;
|
||||
@@ -95,19 +87,11 @@ class DefaultAggregateChange<T> implements MutableAggregateChange<T> {
|
||||
this.entity = aggregateRoot;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.AggregateChange#getEntity()
|
||||
*/
|
||||
@Override
|
||||
public T getEntity() {
|
||||
return this.entity;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.conversion.AggregateChange#forEachAction(java.util.function.Consumer)
|
||||
*/
|
||||
@Override
|
||||
public void forEachAction(Consumer<? super DbAction<?>> consumer) {
|
||||
|
||||
|
||||
@@ -36,10 +36,6 @@ public class RelationalEntityInsertWriter implements EntityWriter<Object, Mutabl
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.EntityWriter#save(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void write(Object root, MutableAggregateChange<?> aggregateChange) {
|
||||
|
||||
|
||||
@@ -36,10 +36,6 @@ public class RelationalEntityUpdateWriter implements EntityWriter<Object, Mutabl
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.EntityWriter#save(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void write(Object root, MutableAggregateChange<?> aggregateChange) {
|
||||
|
||||
|
||||
@@ -34,10 +34,6 @@ public class RelationalEntityWriter implements EntityWriter<Object, MutableAggre
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.convert.EntityWriter#save(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void write(Object root, MutableAggregateChange<?> aggregateChange) {
|
||||
|
||||
|
||||
@@ -32,10 +32,6 @@ import org.springframework.data.relational.core.sql.render.SelectRenderContext;
|
||||
*/
|
||||
public abstract class AbstractDialect implements Dialect {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getSelectContext()
|
||||
*/
|
||||
@Override
|
||||
public SelectRenderContext getSelectContext() {
|
||||
|
||||
@@ -113,19 +109,11 @@ public abstract class AbstractDialect implements Dialect {
|
||||
this.afterOrderBy = afterOrderBy;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.SelectRenderContext#afterFromTable()
|
||||
*/
|
||||
@Override
|
||||
public Function<Select, ? extends CharSequence> afterFromTable() {
|
||||
return afterFromTable;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.SelectRenderContext#afterOrderBy(boolean)
|
||||
*/
|
||||
@Override
|
||||
public Function<Select, ? extends CharSequence> afterOrderBy(boolean hasOrderBy) {
|
||||
return afterOrderBy;
|
||||
@@ -143,10 +131,6 @@ public abstract class AbstractDialect implements Dialect {
|
||||
this.clause = clause;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.function.Function#apply(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public CharSequence apply(Select select) {
|
||||
|
||||
@@ -180,10 +164,6 @@ public abstract class AbstractDialect implements Dialect {
|
||||
this.clause = clause;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.function.Function#apply(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public CharSequence apply(Select select) {
|
||||
|
||||
@@ -204,10 +184,6 @@ public abstract class AbstractDialect implements Dialect {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.util.function.Function#apply(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public CharSequence apply(CharSequence charSequence) {
|
||||
|
||||
|
||||
@@ -38,37 +38,21 @@ public class AnsiDialect extends AbstractDialect {
|
||||
|
||||
private static final LimitClause LIMIT_CLAUSE = new LimitClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getLimit(long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimit(long limit) {
|
||||
return String.format("FETCH FIRST %d ROWS ONLY", limit);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getOffset(long)
|
||||
*/
|
||||
@Override
|
||||
public String getOffset(long offset) {
|
||||
return String.format("OFFSET %d ROWS", offset);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClause(long, long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimitOffset(long limit, long offset) {
|
||||
return String.format("OFFSET %d ROWS FETCH FIRST %d ROWS ONLY", offset, limit);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
@@ -77,19 +61,11 @@ public class AnsiDialect extends AbstractDialect {
|
||||
|
||||
static final LockClause LOCK_CLAUSE = new LockClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LockClause#getLock(LockOptions)
|
||||
*/
|
||||
@Override
|
||||
public String getLock(LockOptions lockOptions) {
|
||||
return "FOR UPDATE";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
@@ -98,28 +74,16 @@ public class AnsiDialect extends AbstractDialect {
|
||||
|
||||
private final AnsiArrayColumns ARRAY_COLUMNS = new AnsiArrayColumns();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#limit()
|
||||
*/
|
||||
@Override
|
||||
public LimitClause limit() {
|
||||
return LIMIT_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#lock()
|
||||
*/
|
||||
@Override
|
||||
public LockClause lock() {
|
||||
return LOCK_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getArraySupport()
|
||||
*/
|
||||
@Override
|
||||
public ArrayColumns getArraySupport() {
|
||||
return ARRAY_COLUMNS;
|
||||
@@ -127,19 +91,11 @@ public class AnsiDialect extends AbstractDialect {
|
||||
|
||||
static class AnsiArrayColumns implements ArrayColumns {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#isSupported()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#getArrayType(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getArrayType(Class<?> userType) {
|
||||
|
||||
|
||||
@@ -48,19 +48,11 @@ public interface ArrayColumns {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#isSupported()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#getArrayType(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getArrayType(Class<?> userType) {
|
||||
throw new UnsupportedOperationException("Array types not supported");
|
||||
|
||||
@@ -38,56 +38,32 @@ public class Db2Dialect extends AbstractDialect {
|
||||
|
||||
private static final LimitClause LIMIT_CLAUSE = new LimitClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getLimit(long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimit(long limit) {
|
||||
return "FETCH FIRST " + limit + " ROWS ONLY";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getOffset(long)
|
||||
*/
|
||||
@Override
|
||||
public String getOffset(long offset) {
|
||||
return "OFFSET " + offset + " ROWS";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClause(long, long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimitOffset(long limit, long offset) {
|
||||
return String.format("OFFSET %d ROWS FETCH FIRST %d ROWS ONLY", offset, limit);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#limit()
|
||||
*/
|
||||
@Override
|
||||
public LimitClause limit() {
|
||||
return LIMIT_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#lock()
|
||||
*/
|
||||
@Override
|
||||
public LockClause lock() {
|
||||
|
||||
@@ -105,10 +81,6 @@ public class Db2Dialect extends AbstractDialect {
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getIdentifierProcessing()
|
||||
*/
|
||||
@Override
|
||||
public IdentifierProcessing getIdentifierProcessing() {
|
||||
return IdentifierProcessing.ANSI;
|
||||
|
||||
@@ -43,37 +43,21 @@ public class H2Dialect extends AbstractDialect {
|
||||
|
||||
private static final LimitClause LIMIT_CLAUSE = new LimitClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getLimit(long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimit(long limit) {
|
||||
return "LIMIT " + limit;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getOffset(long)
|
||||
*/
|
||||
@Override
|
||||
public String getOffset(long offset) {
|
||||
return "OFFSET " + offset;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClause(long, long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimitOffset(long limit, long offset) {
|
||||
return String.format("LIMIT %d OFFSET %d", limit, offset);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
@@ -82,28 +66,16 @@ public class H2Dialect extends AbstractDialect {
|
||||
|
||||
private final H2ArrayColumns ARRAY_COLUMNS = new H2ArrayColumns();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#limit()
|
||||
*/
|
||||
@Override
|
||||
public LimitClause limit() {
|
||||
return LIMIT_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#lock()
|
||||
*/
|
||||
@Override
|
||||
public LockClause lock() {
|
||||
return AnsiDialect.LOCK_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getArraySupport()
|
||||
*/
|
||||
@Override
|
||||
public ArrayColumns getArraySupport() {
|
||||
return ARRAY_COLUMNS;
|
||||
@@ -111,19 +83,11 @@ public class H2Dialect extends AbstractDialect {
|
||||
|
||||
static class H2ArrayColumns implements ArrayColumns {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#isSupported()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#getArrayType(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getArrayType(Class<?> userType) {
|
||||
|
||||
@@ -133,19 +97,11 @@ public class H2Dialect extends AbstractDialect {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getIdentifierProcessing()
|
||||
*/
|
||||
@Override
|
||||
public IdentifierProcessing getIdentifierProcessing() {
|
||||
return IdentifierProcessing.create(Quoting.ANSI, LetterCasing.UPPER_CASE);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#simpleTypes()
|
||||
*/
|
||||
@Override
|
||||
public Set<Class<?>> simpleTypes() {
|
||||
|
||||
|
||||
@@ -66,19 +66,11 @@ public class MySqlDialect extends AbstractDialect {
|
||||
|
||||
private static final LimitClause LIMIT_CLAUSE = new LimitClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getLimit(long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimit(long limit) {
|
||||
return "LIMIT " + limit;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getOffset(long)
|
||||
*/
|
||||
@Override
|
||||
public String getOffset(long offset) {
|
||||
// Ugly but the official workaround for offset without limit
|
||||
@@ -86,10 +78,6 @@ public class MySqlDialect extends AbstractDialect {
|
||||
return String.format("LIMIT %d, 18446744073709551615", offset);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClause(long, long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimitOffset(long limit, long offset) {
|
||||
|
||||
@@ -97,10 +85,6 @@ public class MySqlDialect extends AbstractDialect {
|
||||
return String.format("LIMIT %s, %s", offset, limit);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
@@ -109,10 +93,6 @@ public class MySqlDialect extends AbstractDialect {
|
||||
|
||||
private static final LockClause LOCK_CLAUSE = new LockClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LockClause#getLock(LockOptions)
|
||||
*/
|
||||
@Override
|
||||
public String getLock(LockOptions lockOptions) {
|
||||
switch (lockOptions.getLockMode()) {
|
||||
@@ -128,38 +108,22 @@ public class MySqlDialect extends AbstractDialect {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LockClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#limit()
|
||||
*/
|
||||
@Override
|
||||
public LimitClause limit() {
|
||||
return LIMIT_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#lock()
|
||||
*/
|
||||
@Override
|
||||
public LockClause lock() {
|
||||
return LOCK_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getIdentifierProcessing()
|
||||
*/
|
||||
@Override
|
||||
public IdentifierProcessing getIdentifierProcessing() {
|
||||
return identifierProcessing;
|
||||
|
||||
@@ -52,37 +52,21 @@ public class PostgresDialect extends AbstractDialect {
|
||||
|
||||
private static final LimitClause LIMIT_CLAUSE = new LimitClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getLimit(long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimit(long limit) {
|
||||
return "LIMIT " + limit;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getOffset(long)
|
||||
*/
|
||||
@Override
|
||||
public String getOffset(long offset) {
|
||||
return "OFFSET " + offset;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClause(long, long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimitOffset(long limit, long offset) {
|
||||
return String.format("LIMIT %d OFFSET %d", limit, offset);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
@@ -91,10 +75,6 @@ public class PostgresDialect extends AbstractDialect {
|
||||
|
||||
private final PostgresArrayColumns ARRAY_COLUMNS = new PostgresArrayColumns();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#limit()
|
||||
*/
|
||||
@Override
|
||||
public LimitClause limit() {
|
||||
return LIMIT_CLAUSE;
|
||||
@@ -102,19 +82,11 @@ public class PostgresDialect extends AbstractDialect {
|
||||
|
||||
private final PostgresLockClause LOCK_CLAUSE = new PostgresLockClause(this.getIdentifierProcessing());
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#lock()
|
||||
*/
|
||||
@Override
|
||||
public LockClause lock() {
|
||||
return LOCK_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getArraySupport()
|
||||
*/
|
||||
@Override
|
||||
public ArrayColumns getArraySupport() {
|
||||
return ARRAY_COLUMNS;
|
||||
@@ -133,10 +105,6 @@ public class PostgresDialect extends AbstractDialect {
|
||||
this.identifierProcessing = identifierProcessing;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LockClause#getLock(LockOptions)
|
||||
*/
|
||||
@Override
|
||||
public String getLock(LockOptions lockOptions) {
|
||||
|
||||
@@ -169,10 +137,6 @@ public class PostgresDialect extends AbstractDialect {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LockClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
@@ -181,19 +145,11 @@ public class PostgresDialect extends AbstractDialect {
|
||||
|
||||
protected static class PostgresArrayColumns implements ArrayColumns {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#isSupported()
|
||||
*/
|
||||
@Override
|
||||
public boolean isSupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.ArrayColumns#getArrayType(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getArrayType(Class<?> userType) {
|
||||
|
||||
@@ -208,10 +164,6 @@ public class PostgresDialect extends AbstractDialect {
|
||||
return IdentifierProcessing.create(Quoting.ANSI, LetterCasing.LOWER_CASE);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#simpleTypes()
|
||||
*/
|
||||
@Override
|
||||
public Set<Class<?>> simpleTypes() {
|
||||
|
||||
|
||||
@@ -96,19 +96,11 @@ public class RenderContextFactory {
|
||||
this.insertRenderContext = renderingDialect.getInsertRenderContext();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.RenderContext#getNamingStrategy()
|
||||
*/
|
||||
@Override
|
||||
public RenderNamingStrategy getNamingStrategy() {
|
||||
return renderNamingStrategy;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.RenderContext#getIdentifierProcessing()
|
||||
*/
|
||||
@Override
|
||||
public IdentifierProcessing getIdentifierProcessing() {
|
||||
return renderingDialect.getIdentifierProcessing();
|
||||
@@ -119,10 +111,6 @@ public class RenderContextFactory {
|
||||
return getSelectRenderContext();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.RenderContext#getSelect()
|
||||
*/
|
||||
@Override
|
||||
public SelectRenderContext getSelectRenderContext() {
|
||||
return selectRenderContext;
|
||||
|
||||
@@ -40,37 +40,21 @@ public class SqlServerDialect extends AbstractDialect {
|
||||
|
||||
private static final LimitClause LIMIT_CLAUSE = new LimitClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getLimit(long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimit(long limit) {
|
||||
return "OFFSET 0 ROWS FETCH NEXT " + limit + " ROWS ONLY";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getOffset(long)
|
||||
*/
|
||||
@Override
|
||||
public String getOffset(long offset) {
|
||||
return "OFFSET " + offset + " ROWS";
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClause(long, long)
|
||||
*/
|
||||
@Override
|
||||
public String getLimitOffset(long limit, long offset) {
|
||||
return String.format("OFFSET %d ROWS FETCH NEXT %d ROWS ONLY", offset, limit);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_ORDER_BY;
|
||||
@@ -79,10 +63,6 @@ public class SqlServerDialect extends AbstractDialect {
|
||||
|
||||
private static final LockClause LOCK_CLAUSE = new LockClause() {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LockClause#getLimit(LockOptions)
|
||||
*/
|
||||
@Override
|
||||
public String getLock(LockOptions lockOptions) {
|
||||
switch (lockOptions.getLockMode()) {
|
||||
@@ -98,10 +78,6 @@ public class SqlServerDialect extends AbstractDialect {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.LimitClause#getClausePosition()
|
||||
*/
|
||||
@Override
|
||||
public Position getClausePosition() {
|
||||
return Position.AFTER_FROM_TABLE;
|
||||
@@ -111,37 +87,21 @@ public class SqlServerDialect extends AbstractDialect {
|
||||
private final Lazy<SelectRenderContext> selectRenderContext = Lazy
|
||||
.of(() -> new SqlServerSelectRenderContext(getAfterFromTable(), getAfterOrderBy()));
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#limit()
|
||||
*/
|
||||
@Override
|
||||
public LimitClause limit() {
|
||||
return LIMIT_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#lock()
|
||||
*/
|
||||
@Override
|
||||
public LockClause lock() {
|
||||
return LOCK_CLAUSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.Dialect#getLikeEscaper()
|
||||
*/
|
||||
@Override
|
||||
public Escaper getLikeEscaper() {
|
||||
return Escaper.DEFAULT.withRewriteFor("[", "]");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.dialect.AbstractDialect#getSelectContext()
|
||||
*/
|
||||
@Override
|
||||
public SelectRenderContext getSelectContext() {
|
||||
return selectRenderContext.get();
|
||||
|
||||
@@ -118,10 +118,6 @@ public class BasicRelationalPersistentProperty extends AnnotationBasedPersistent
|
||||
return new DerivedSqlIdentifier(name, isForceQuote());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#createAssociation()
|
||||
*/
|
||||
@Override
|
||||
protected Association<RelationalPersistentProperty> createAssociation() {
|
||||
return new Association<>(this, null);
|
||||
@@ -145,28 +141,16 @@ public class BasicRelationalPersistentProperty extends AnnotationBasedPersistent
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.model.RelationalPersistentProperty#getColumnName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getColumnName() {
|
||||
return columnName.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#getOwner()
|
||||
*/
|
||||
@Override
|
||||
public RelationalPersistentEntity<?> getOwner() {
|
||||
return (RelationalPersistentEntity<?>) super.getOwner();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#getReverseColumnName(org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension)
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getReverseColumnName(PersistentPropertyPathExtension path) {
|
||||
|
||||
@@ -174,28 +158,16 @@ public class BasicRelationalPersistentProperty extends AnnotationBasedPersistent
|
||||
.orElseGet(() -> createDerivedSqlIdentifier(this.namingStrategy.getReverseColumnName(path)));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#getKeyColumn()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getKeyColumn() {
|
||||
return isQualified() ? collectionKeyColumnName.get() : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#isQualified()
|
||||
*/
|
||||
@Override
|
||||
public boolean isQualified() {
|
||||
return isMap() || isListLike();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#getQualifierColumnType()
|
||||
*/
|
||||
@Override
|
||||
public Class<?> getQualifierColumnType() {
|
||||
|
||||
@@ -209,37 +181,21 @@ public class BasicRelationalPersistentProperty extends AnnotationBasedPersistent
|
||||
return Integer.class;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#isOrdered()
|
||||
*/
|
||||
@Override
|
||||
public boolean isOrdered() {
|
||||
return isListLike();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#isEmbedded()
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmbedded() {
|
||||
return isEmbedded.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#getEmbeddedPrefix()
|
||||
*/
|
||||
@Override
|
||||
public String getEmbeddedPrefix() {
|
||||
return isEmbedded() ? embeddedPrefix.get() : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.RelationalPersistentProperty#shouldCreateEmptyEmbedded()
|
||||
*/
|
||||
@Override
|
||||
public boolean shouldCreateEmptyEmbedded() {
|
||||
|
||||
|
||||
@@ -52,65 +52,37 @@ class CachingNamingStrategy implements NamingStrategy {
|
||||
this.schema = Lazy.of(delegate::getSchema);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.NamingStrategy#getKeyColumn(org.springframework.data.relational.core.mapping.RelationalPersistentProperty)
|
||||
*/
|
||||
@Override
|
||||
public String getKeyColumn(RelationalPersistentProperty property) {
|
||||
return keyColumns.computeIfAbsent(property, delegate::getKeyColumn);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.NamingStrategy#getQualifiedTableName(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
public String getQualifiedTableName(Class<?> type) {
|
||||
return qualifiedTableNames.computeIfAbsent(type, delegate::getQualifiedTableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.NamingStrategy#getTableName(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
public String getTableName(Class<?> type) {
|
||||
return tableNames.computeIfAbsent(type, delegate::getTableName);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.NamingStrategy#getReverseColumnName(org.springframework.data.relational.core.mapping.PersistentPropertyPathExtension)
|
||||
*/
|
||||
@Override
|
||||
public String getReverseColumnName(PersistentPropertyPathExtension path) {
|
||||
return delegate.getReverseColumnName(path);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.NamingStrategy#getReverseColumnName(org.springframework.data.relational.core.mapping.RelationalPersistentProperty)
|
||||
*/
|
||||
@Override
|
||||
public String getReverseColumnName(RelationalPersistentProperty property) {
|
||||
return delegate.getReverseColumnName(property);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.NamingStrategy#getSchema()
|
||||
*/
|
||||
@Override
|
||||
public String getSchema() {
|
||||
return schema.get();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.NamingStrategy#getColumnName(org.springframework.data.relational.core.mapping.RelationalPersistentProperty)
|
||||
*/
|
||||
@Override
|
||||
public String getColumnName(RelationalPersistentProperty property) {
|
||||
return columnNames.computeIfAbsent(property, delegate::getColumnName);
|
||||
|
||||
@@ -42,19 +42,11 @@ class DerivedSqlIdentifier implements SqlIdentifier {
|
||||
this.quoted = quoted;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<SqlIdentifier> iterator() {
|
||||
return Collections.<SqlIdentifier> singleton(this).iterator();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#transform(java.util.function.UnaryOperator)
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier transform(UnaryOperator<String> transformationFunction) {
|
||||
|
||||
@@ -63,10 +55,6 @@ class DerivedSqlIdentifier implements SqlIdentifier {
|
||||
return new DerivedSqlIdentifier(transformationFunction.apply(name), quoted);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#toSql(org.springframework.data.relational.domain.IdentifierProcessing)
|
||||
*/
|
||||
@Override
|
||||
public String toSql(IdentifierProcessing processing) {
|
||||
|
||||
@@ -75,19 +63,11 @@ class DerivedSqlIdentifier implements SqlIdentifier {
|
||||
return quoted ? processing.quote(normalized) : normalized;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#getReference(org.springframework.data.relational.domain.IdentifierProcessing)
|
||||
*/
|
||||
@Override
|
||||
public String getReference(IdentifierProcessing processing) {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -102,19 +82,11 @@ class DerivedSqlIdentifier implements SqlIdentifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return quoted ? toSql(IdentifierProcessing.ANSI) : this.name;
|
||||
|
||||
@@ -77,10 +77,6 @@ public class RelationalMappingContext
|
||||
this.forceQuote = forceQuote;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.AbstractMappingContext#createPersistentEntity(org.springframework.data.util.TypeInformation)
|
||||
*/
|
||||
@Override
|
||||
protected <T> RelationalPersistentEntity<T> createPersistentEntity(TypeInformation<T> typeInformation) {
|
||||
|
||||
@@ -91,10 +87,6 @@ public class RelationalMappingContext
|
||||
return entity;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mapping.context.AbstractMappingContext#createPersistentProperty(org.springframework.data.mapping.model.Property, org.springframework.data.mapping.model.MutablePersistentEntity, org.springframework.data.mapping.model.SimpleTypeHolder)
|
||||
*/
|
||||
@Override
|
||||
protected RelationalPersistentProperty createPersistentProperty(Property property,
|
||||
RelationalPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) {
|
||||
|
||||
@@ -79,10 +79,6 @@ class RelationalPersistentEntityImpl<T> extends BasicPersistentEntity<T, Relatio
|
||||
this.forceQuote = forceQuote;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.mapping.model.RelationalPersistentEntity#getTableName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getTableName() {
|
||||
|
||||
@@ -114,19 +110,11 @@ class RelationalPersistentEntityImpl<T> extends BasicPersistentEntity<T, Relatio
|
||||
: null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.mapping.model.RelationalPersistentEntity#getIdColumn()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getIdColumn() {
|
||||
return getRequiredIdProperty().getColumnName();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("RelationalPersistentEntityImpl<%s>", getType());
|
||||
|
||||
@@ -43,10 +43,6 @@ public class AbstractRelationalEventListener<E> implements ApplicationListener<A
|
||||
this.domainClass = typeArgument == null ? Object.class : typeArgument;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.context.ApplicationListener#onApplicationEvent(org.springframework.context.ApplicationEvent)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void onApplicationEvent(AbstractRelationalEvent<?> event) {
|
||||
|
||||
@@ -643,10 +643,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#is(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria is(Object value) {
|
||||
|
||||
@@ -655,10 +651,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.EQ, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#not(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria not(Object value) {
|
||||
|
||||
@@ -667,10 +659,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.NEQ, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#in(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public Criteria in(Object... values) {
|
||||
|
||||
@@ -685,10 +673,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.IN, Arrays.asList(values));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#in(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public Criteria in(Collection<?> values) {
|
||||
|
||||
@@ -698,10 +682,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.IN, values);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#notIn(java.lang.Object[])
|
||||
*/
|
||||
@Override
|
||||
public Criteria notIn(Object... values) {
|
||||
|
||||
@@ -716,10 +696,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.NOT_IN, Arrays.asList(values));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#notIn(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public Criteria notIn(Collection<?> values) {
|
||||
|
||||
@@ -729,10 +705,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.NOT_IN, values);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#between(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria between(Object begin, Object end) {
|
||||
|
||||
@@ -742,10 +714,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.BETWEEN, Pair.of(begin, end));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#notBetween(java.lang.Object, java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria notBetween(Object begin, Object end) {
|
||||
|
||||
@@ -755,10 +723,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.NOT_BETWEEN, Pair.of(begin, end));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#lessThan(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria lessThan(Object value) {
|
||||
|
||||
@@ -767,10 +731,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.LT, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#lessThanOrEquals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria lessThanOrEquals(Object value) {
|
||||
|
||||
@@ -779,10 +739,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.LTE, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#greaterThan(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria greaterThan(Object value) {
|
||||
|
||||
@@ -791,10 +747,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.GT, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#greaterThanOrEquals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria greaterThanOrEquals(Object value) {
|
||||
|
||||
@@ -803,10 +755,6 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.GTE, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#like(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria like(Object value) {
|
||||
|
||||
@@ -815,47 +763,27 @@ public class Criteria implements CriteriaDefinition {
|
||||
return createCriteria(Comparator.LIKE, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#notLike(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public Criteria notLike(Object value) {
|
||||
Assert.notNull(value, "Value must not be null!");
|
||||
return createCriteria(Comparator.NOT_LIKE, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#isNull()
|
||||
*/
|
||||
@Override
|
||||
public Criteria isNull() {
|
||||
return createCriteria(Comparator.IS_NULL, null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#isNotNull()
|
||||
*/
|
||||
@Override
|
||||
public Criteria isNotNull() {
|
||||
return createCriteria(Comparator.IS_NOT_NULL, null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#isTrue()
|
||||
*/
|
||||
@Override
|
||||
public Criteria isTrue() {
|
||||
return createCriteria(Comparator.IS_TRUE, null);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.query.Criteria.CriteriaStep#isFalse()
|
||||
*/
|
||||
@Override
|
||||
public Criteria isFalse() {
|
||||
return createCriteria(Comparator.IS_FALSE, null);
|
||||
|
||||
@@ -32,10 +32,6 @@ abstract class AbstractImportValidator implements Visitor {
|
||||
Set<Table> from = new HashSet<>();
|
||||
@Nullable Visitable parent;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitor#enter(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
public void enter(Visitable segment) {
|
||||
|
||||
@@ -53,10 +49,6 @@ abstract class AbstractImportValidator implements Visitor {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitor#leave(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
public void leave(Visitable segment) {}
|
||||
|
||||
@@ -67,10 +59,6 @@ abstract class AbstractImportValidator implements Visitor {
|
||||
|
||||
private @Nullable Select selectFilter;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitor#enter(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
public void enter(Visitable segment) {
|
||||
|
||||
@@ -88,10 +76,6 @@ abstract class AbstractImportValidator implements Visitor {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitor#leave(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
public void leave(Visitable segment) {
|
||||
|
||||
|
||||
@@ -32,10 +32,6 @@ abstract class AbstractSegment implements Segment {
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitable#visit(org.springframework.data.relational.core.sql.Visitor)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Visitor visitor) {
|
||||
|
||||
@@ -48,19 +44,11 @@ abstract class AbstractSegment implements Segment {
|
||||
visitor.leave(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return obj instanceof Segment && toString().equals(obj.toString());
|
||||
|
||||
@@ -42,19 +42,11 @@ class AliasedExpression extends AbstractSegment implements Aliased, Expression {
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Aliased#getAlias()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return expression + " AS " + alias;
|
||||
|
||||
@@ -65,10 +65,6 @@ public class AssignValue extends AbstractSegment implements Assignment {
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -51,10 +51,6 @@ public class AsteriskFromTable extends AbstractSegment implements Expression {
|
||||
return table;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -23,10 +23,6 @@ package org.springframework.data.relational.core.sql;
|
||||
*/
|
||||
public class BindMarker extends AbstractSegment implements Expression {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "?";
|
||||
@@ -40,19 +36,11 @@ public class BindMarker extends AbstractSegment implements Expression {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Named#getName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getName() {
|
||||
return SqlIdentifier.unquoted(name);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.BindMarker#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "?[" + name + "]";
|
||||
|
||||
@@ -27,19 +27,11 @@ public class BooleanLiteral extends Literal<Boolean> {
|
||||
super(content);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Literal#getContent()
|
||||
*/
|
||||
@Override
|
||||
public Boolean getContent() {
|
||||
return super.getContent();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Literal#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getContent() ? "TRUE" : "FALSE";
|
||||
|
||||
@@ -321,10 +321,6 @@ public class Column extends AbstractSegment implements Expression, Named {
|
||||
return Assignments.value(this, value);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Named#getName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getName() {
|
||||
return name;
|
||||
@@ -347,10 +343,6 @@ public class Column extends AbstractSegment implements Expression, Named {
|
||||
return table;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -382,28 +374,16 @@ public class Column extends AbstractSegment implements Expression, Named {
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Aliased#getAlias()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Column#getReferenceName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getReferenceName() {
|
||||
return getAlias();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Column#from(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public Column from(Table table) {
|
||||
|
||||
@@ -412,10 +392,6 @@ public class Column extends AbstractSegment implements Expression, Named {
|
||||
return new AliasedColumn(getName(), table, getAlias());
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Column#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getPrefix() + getName() + " AS " + getAlias();
|
||||
|
||||
@@ -42,28 +42,16 @@ class CompositeSqlIdentifier implements SqlIdentifier {
|
||||
this.parts = parts;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<SqlIdentifier> iterator() {
|
||||
return Arrays.asList(parts).iterator();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#transform(java.util.function.UnaryOperator)
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier transform(UnaryOperator<String> transformationFunction) {
|
||||
throw new UnsupportedOperationException("Composite SQL Identifiers cannot be transformed");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#toSql(org.springframework.data.relational.domain.IdentifierProcessing)
|
||||
*/
|
||||
@Override
|
||||
public String toSql(IdentifierProcessing processing) {
|
||||
|
||||
@@ -76,19 +64,11 @@ class CompositeSqlIdentifier implements SqlIdentifier {
|
||||
return stringJoiner.toString();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#getReference(org.springframework.data.relational.domain.IdentifierProcessing)
|
||||
*/
|
||||
@Override
|
||||
public String getReference(IdentifierProcessing processing) {
|
||||
throw new UnsupportedOperationException("Composite SQL Identifiers can't be used for reference name retrieval");
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -103,19 +83,11 @@ class CompositeSqlIdentifier implements SqlIdentifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return toSql(IdentifierProcessing.ANSI);
|
||||
|
||||
@@ -35,10 +35,6 @@ class DefaultDelete implements Delete {
|
||||
this.where = where != null ? new Where(where) : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitable#visit(org.springframework.data.relational.core.sql.Visitor)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Visitor visitor) {
|
||||
|
||||
@@ -55,10 +51,6 @@ class DefaultDelete implements Delete {
|
||||
visitor.leave(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -29,10 +29,6 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
|
||||
private @Nullable Table from;
|
||||
private @Nullable Condition where;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.DeleteBuilder#from(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public DeleteWhere from(Table table) {
|
||||
|
||||
@@ -42,10 +38,6 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.DeleteBuilder.DeleteWhere#where(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public DeleteWhereAndOr where(Condition condition) {
|
||||
|
||||
@@ -54,10 +46,6 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.DeleteBuilder.DeleteWhereAndOr#and(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public DeleteWhereAndOr and(Condition condition) {
|
||||
|
||||
@@ -66,10 +54,6 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.DeleteBuilder.DeleteWhereAndOr#or(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public DeleteWhereAndOr or(Condition condition) {
|
||||
|
||||
@@ -78,10 +62,6 @@ class DefaultDeleteBuilder implements DeleteBuilder, DeleteBuilder.DeleteWhereAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.DeleteBuilder.BuildDelete#build()
|
||||
*/
|
||||
@Override
|
||||
public Delete build() {
|
||||
|
||||
|
||||
@@ -32,19 +32,11 @@ class DefaultIdentifierProcessing implements IdentifierProcessing {
|
||||
this.letterCasing = letterCasing;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.IdentifierProcessing#quote(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String quote(String identifier) {
|
||||
return quoting.apply(identifier);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.IdentifierProcessing#standardizeLetterCase(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public String standardizeLetterCase(String identifier) {
|
||||
return letterCasing.apply(identifier);
|
||||
|
||||
@@ -40,10 +40,6 @@ class DefaultInsert implements Insert {
|
||||
this.values = new Values(new ArrayList<>(values));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitable#visit(org.springframework.data.relational.core.sql.Visitor)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Visitor visitor) {
|
||||
|
||||
@@ -58,10 +54,6 @@ class DefaultInsert implements Insert {
|
||||
visitor.leave(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -36,10 +36,6 @@ class DefaultInsertBuilder
|
||||
private List<Column> columns = new ArrayList<>();
|
||||
private List<Expression> values = new ArrayList<>();
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder#into(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public InsertIntoColumnsAndValuesWithBuild into(Table table) {
|
||||
|
||||
@@ -49,10 +45,6 @@ class DefaultInsertBuilder
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder.InsertIntoColumnsAndValues#column(org.springframework.data.relational.core.sql.Column)
|
||||
*/
|
||||
@Override
|
||||
public InsertIntoColumnsAndValuesWithBuild column(Column column) {
|
||||
|
||||
@@ -63,10 +55,6 @@ class DefaultInsertBuilder
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder.InsertIntoColumnsAndValues#columns(org.springframework.data.relational.core.sql.Column[])
|
||||
*/
|
||||
@Override
|
||||
public InsertIntoColumnsAndValuesWithBuild columns(Column... columns) {
|
||||
|
||||
@@ -75,10 +63,6 @@ class DefaultInsertBuilder
|
||||
return columns(Arrays.asList(columns));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder.InsertIntoColumnsAndValues#columns(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public InsertIntoColumnsAndValuesWithBuild columns(Collection<Column> columns) {
|
||||
|
||||
@@ -89,10 +73,6 @@ class DefaultInsertBuilder
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder.InsertIntoColumnsAndValuesWithBuild#value(org.springframework.data.relational.core.sql.Expression)
|
||||
*/
|
||||
@Override
|
||||
public InsertValuesWithBuild value(Expression value) {
|
||||
|
||||
@@ -103,10 +83,6 @@ class DefaultInsertBuilder
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder.InsertIntoColumnsAndValuesWithBuild#values(org.springframework.data.relational.core.sql.Expression[])
|
||||
*/
|
||||
@Override
|
||||
public InsertValuesWithBuild values(Expression... values) {
|
||||
|
||||
@@ -115,10 +91,6 @@ class DefaultInsertBuilder
|
||||
return values(Arrays.asList(values));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder.InsertIntoColumnsAndValuesWithBuild#values(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public InsertValuesWithBuild values(Collection<? extends Expression> values) {
|
||||
|
||||
@@ -129,10 +101,6 @@ class DefaultInsertBuilder
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.InsertBuilder.BuildInsert#build()
|
||||
*/
|
||||
@Override
|
||||
public Insert build() {
|
||||
return new DefaultInsert(this.into, this.columns, this.values);
|
||||
|
||||
@@ -56,37 +56,21 @@ class DefaultSelect implements Select {
|
||||
this.lockMode = lockMode;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Select#getFrom()
|
||||
*/
|
||||
@Override
|
||||
public From getFrom() {
|
||||
return this.from;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Select#getOrderBy()
|
||||
*/
|
||||
@Override
|
||||
public List<OrderByField> getOrderBy() {
|
||||
return this.orderBy;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Select#getLimit()
|
||||
*/
|
||||
@Override
|
||||
public OptionalLong getLimit() {
|
||||
return limit == -1 ? OptionalLong.empty() : OptionalLong.of(limit);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Select#getOffset()
|
||||
*/
|
||||
@Override
|
||||
public OptionalLong getOffset() {
|
||||
return offset == -1 ? OptionalLong.empty() : OptionalLong.of(offset);
|
||||
@@ -97,20 +81,12 @@ class DefaultSelect implements Select {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Select#getLockMode()
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public LockMode getLockMode() {
|
||||
return lockMode;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitable#visit(org.springframework.data.relational.core.sql.Visitor)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Visitor visitor) {
|
||||
|
||||
|
||||
@@ -46,10 +46,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
private final List<OrderByField> orderBy = new ArrayList<>();
|
||||
private @Nullable LockMode lockMode;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder#top(int)
|
||||
*/
|
||||
@Override
|
||||
public SelectBuilder top(int count) {
|
||||
|
||||
@@ -57,30 +53,18 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder#select(org.springframework.data.relational.core.sql.Expression)
|
||||
*/
|
||||
@Override
|
||||
public DefaultSelectBuilder select(Expression expression) {
|
||||
selectList.add(expression);
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder#select(org.springframework.data.relational.core.sql.Expression[])
|
||||
*/
|
||||
@Override
|
||||
public DefaultSelectBuilder select(Expression... expressions) {
|
||||
selectList.addAll(Arrays.asList(expressions));
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder#select(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public DefaultSelectBuilder select(Collection<? extends Expression> expressions) {
|
||||
selectList.addAll(expressions);
|
||||
@@ -93,49 +77,29 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFrom#from(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin from(String table) {
|
||||
return from(Table.create(table));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectAndFrom#from(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin from(TableLike table) {
|
||||
from.add(table);
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectAndFrom#from(org.springframework.data.relational.core.sql.Table[])
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin from(TableLike... tables) {
|
||||
from.addAll(Arrays.asList(tables));
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectAndFrom#from(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin from(Collection<? extends TableLike> tables) {
|
||||
from.addAll(tables);
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndJoin#limitOffset(long, long)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin limitOffset(long limit, long offset) {
|
||||
this.limit = limit;
|
||||
@@ -143,30 +107,18 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndJoin#limit(long)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin limit(long limit) {
|
||||
this.limit = limit;
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndJoin#offset(long)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin offset(long offset) {
|
||||
this.offset = offset;
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndOrderBy#orderBy(org.springframework.data.relational.core.sql.OrderByField[])
|
||||
*/
|
||||
@Override
|
||||
public DefaultSelectBuilder orderBy(OrderByField... orderByFields) {
|
||||
|
||||
@@ -175,10 +127,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndOrderBy#orderBy(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public DefaultSelectBuilder orderBy(Collection<? extends OrderByField> orderByFields) {
|
||||
|
||||
@@ -187,10 +135,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndOrderBy#orderBy(org.springframework.data.relational.core.sql.Column[])
|
||||
*/
|
||||
@Override
|
||||
public DefaultSelectBuilder orderBy(Column... columns) {
|
||||
|
||||
@@ -201,10 +145,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectWhere#where(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public SelectWhereAndOr where(Condition condition) {
|
||||
|
||||
@@ -212,10 +152,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectWhereAndOr#and(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public SelectWhereAndOr and(Condition condition) {
|
||||
|
||||
@@ -223,10 +159,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectWhereAndOr#or(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public SelectWhereAndOr or(Condition condition) {
|
||||
|
||||
@@ -234,28 +166,16 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectJoin#join(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public SelectOn join(String table) {
|
||||
return join(Table.create(table));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectJoin#join(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public SelectOn join(TableLike table) {
|
||||
return new JoinBuilder(table, this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectJoin#join(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public SelectOn leftOuterJoin(TableLike table) {
|
||||
return new JoinBuilder(table, this, JoinType.LEFT_OUTER_JOIN);
|
||||
@@ -267,10 +187,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectLock#lock(org.springframework.data.relational.core.sql.LockMode)
|
||||
*/
|
||||
@Override
|
||||
public SelectLock lock(LockMode lockMode) {
|
||||
|
||||
@@ -278,10 +194,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.BuildSelect#build()
|
||||
*/
|
||||
@Override
|
||||
public Select build() {
|
||||
|
||||
@@ -314,10 +226,6 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
this(table, selectBuilder, JoinType.JOIN);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectOn#on(org.springframework.data.relational.core.sql.Expression)
|
||||
*/
|
||||
@Override
|
||||
public SelectOnConditionComparison on(Expression column) {
|
||||
|
||||
@@ -337,20 +245,12 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectOnConditionComparison#equals(org.springframework.data.relational.core.sql.Expression)
|
||||
*/
|
||||
@Override
|
||||
public JoinBuilder equals(Expression column) {
|
||||
this.to = column;
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectOnCondition#and(org.springframework.data.relational.core.sql.Expression)
|
||||
*/
|
||||
@Override
|
||||
public SelectOnConditionComparison and(Expression column) {
|
||||
|
||||
@@ -381,120 +281,72 @@ class DefaultSelectBuilder implements SelectBuilder, SelectAndFrom, SelectFromAn
|
||||
return new Join(joinType, table, condition);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectOrdered#orderBy(org.springframework.data.relational.core.sql.OrderByField[])
|
||||
*/
|
||||
@Override
|
||||
public SelectOrdered orderBy(OrderByField... orderByFields) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.orderBy(orderByFields);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectOrdered#orderBy(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public SelectOrdered orderBy(Collection<? extends OrderByField> orderByFields) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.orderBy(orderByFields);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectOrdered#orderBy(org.springframework.data.relational.core.sql.Column[])
|
||||
*/
|
||||
@Override
|
||||
public SelectOrdered orderBy(Column... columns) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.orderBy(columns);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectWhere#where(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public SelectWhereAndOr where(Condition condition) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.where(condition);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectJoin#join(java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public SelectOn join(String table) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.join(table);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectJoin#join(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public SelectOn join(TableLike table) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.join(table);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectJoin#leftOuterJoin(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public SelectOn leftOuterJoin(TableLike table) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.leftOuterJoin(table);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndJoinCondition#limitOffset(long, long)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin limitOffset(long limit, long offset) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.limitOffset(limit, offset);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndJoinCondition#limit(long)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin limit(long limit) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.limit(limit);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectFromAndJoinCondition#offset(long)
|
||||
*/
|
||||
@Override
|
||||
public SelectFromAndJoin offset(long offset) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.offset(offset);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.SelectLock#lock(org.springframework.data.relational.core.sql.LockMode)
|
||||
*/
|
||||
@Override
|
||||
public SelectLock lock(LockMode lockMode) {
|
||||
selectBuilder.join(finishJoin());
|
||||
return selectBuilder.lock(lockMode);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.SelectBuilder.BuildSelect#build()
|
||||
*/
|
||||
@Override
|
||||
public Select build() {
|
||||
selectBuilder.join(finishJoin());
|
||||
|
||||
@@ -41,19 +41,11 @@ class DefaultSqlIdentifier implements SqlIdentifier {
|
||||
this.quoted = quoted;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#iterator()
|
||||
*/
|
||||
@Override
|
||||
public Iterator<SqlIdentifier> iterator() {
|
||||
return Collections.<SqlIdentifier> singleton(this).iterator();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#transform(java.util.function.UnaryOperator)
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier transform(UnaryOperator<String> transformationFunction) {
|
||||
|
||||
@@ -62,28 +54,16 @@ class DefaultSqlIdentifier implements SqlIdentifier {
|
||||
return new DefaultSqlIdentifier(transformationFunction.apply(name), quoted);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#toSql(org.springframework.data.relational.domain.IdentifierProcessing)
|
||||
*/
|
||||
@Override
|
||||
public String toSql(IdentifierProcessing processing) {
|
||||
return quoted ? processing.quote(getReference(processing)) : getReference(processing);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.domain.SqlIdentifier#getReference(org.springframework.data.relational.domain.IdentifierProcessing)
|
||||
*/
|
||||
@Override
|
||||
public String getReference(IdentifierProcessing processing) {
|
||||
return name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
||||
@@ -98,19 +78,11 @@ class DefaultSqlIdentifier implements SqlIdentifier {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return toString().hashCode();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return quoted ? toSql(IdentifierProcessing.ANSI) : this.name;
|
||||
|
||||
@@ -40,10 +40,6 @@ class DefaultUpdate implements Update {
|
||||
this.where = where != null ? new Where(where) : null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitable#visit(org.springframework.data.relational.core.sql.Visitor)
|
||||
*/
|
||||
@Override
|
||||
public void visit(Visitor visitor) {
|
||||
|
||||
@@ -61,10 +57,6 @@ class DefaultUpdate implements Update {
|
||||
visitor.leave(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -38,10 +38,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
private List<Assignment> assignments = new ArrayList<>();
|
||||
private @Nullable Condition where;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder#table(org.springframework.data.relational.core.sql.Table)
|
||||
*/
|
||||
@Override
|
||||
public UpdateAssign table(Table table) {
|
||||
|
||||
@@ -52,10 +48,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder.UpdateAssign#set(org.springframework.data.relational.core.sql.Assignment)
|
||||
*/
|
||||
@Override
|
||||
public DefaultUpdateBuilder set(Assignment assignment) {
|
||||
|
||||
@@ -66,10 +58,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder.UpdateAssign#set(org.springframework.data.relational.core.sql.Assignment...)
|
||||
*/
|
||||
@Override
|
||||
public UpdateWhere set(Assignment... assignments) {
|
||||
|
||||
@@ -78,10 +66,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
return set(Arrays.asList(assignments));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder.UpdateAssign#set(java.util.Collection)
|
||||
*/
|
||||
@Override
|
||||
public UpdateWhere set(Collection<? extends Assignment> assignments) {
|
||||
|
||||
@@ -92,10 +76,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder.UpdateWhere#where(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public UpdateWhereAndOr where(Condition condition) {
|
||||
|
||||
@@ -106,10 +86,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder.UpdateWhereAndOr#and(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public UpdateWhereAndOr and(Condition condition) {
|
||||
|
||||
@@ -120,10 +96,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder.UpdateWhereAndOr#or(org.springframework.data.relational.core.sql.Condition)
|
||||
*/
|
||||
@Override
|
||||
public UpdateWhereAndOr or(Condition condition) {
|
||||
|
||||
@@ -134,10 +106,6 @@ class DefaultUpdateBuilder implements UpdateBuilder, UpdateWhere, UpdateWhereAnd
|
||||
return this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.UpdateBuilder.BuildUpdate#build()
|
||||
*/
|
||||
@Override
|
||||
public Update build() {
|
||||
return new DefaultUpdate(this.table, this.assignments, this.where);
|
||||
|
||||
@@ -27,10 +27,6 @@ public class FalseCondition implements Condition {
|
||||
|
||||
private FalseCondition() {}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1 = 0";
|
||||
|
||||
@@ -46,10 +46,6 @@ public class From extends AbstractSegment {
|
||||
return this.tables;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FROM " + StringUtils.collectionToDelimitedString(tables, ", ");
|
||||
|
||||
@@ -149,10 +149,6 @@ public class In extends AbstractSegment implements Condition {
|
||||
return new In(columnOrExpression, Arrays.asList(expressions), true);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Condition#not()
|
||||
*/
|
||||
@Override
|
||||
public Condition not() {
|
||||
return new In(left, expressions, !notIn);
|
||||
@@ -166,10 +162,6 @@ public class In extends AbstractSegment implements Condition {
|
||||
return !expressions.isEmpty();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -68,10 +68,6 @@ public class InlineQuery extends AbstractSegment implements TableLike {
|
||||
return create(select, SqlIdentifier.unquoted(alias));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Named#getName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getName() {
|
||||
return alias;
|
||||
@@ -86,10 +82,6 @@ public class InlineQuery extends AbstractSegment implements TableLike {
|
||||
return alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(" + select + ") AS " + alias;
|
||||
|
||||
@@ -41,10 +41,6 @@ public class Into extends AbstractSegment {
|
||||
this.tables = tables;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "INTO " + StringUtils.collectionToDelimitedString(tables, ", ");
|
||||
|
||||
@@ -53,10 +53,6 @@ public class IsNull extends AbstractSegment implements Condition {
|
||||
return new IsNull(expression);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Condition#not()
|
||||
*/
|
||||
@Override
|
||||
public Condition not() {
|
||||
return new IsNull(expression, !negated);
|
||||
@@ -66,10 +62,6 @@ public class IsNull extends AbstractSegment implements Condition {
|
||||
return negated;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return expression + (negated ? " IS NOT NULL" : " IS NULL");
|
||||
|
||||
@@ -63,10 +63,6 @@ public class Join extends AbstractSegment {
|
||||
return on;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return type + " " + joinTable + " ON " + on;
|
||||
|
||||
@@ -39,10 +39,6 @@ public class Literal<T> extends AbstractSegment implements Expression {
|
||||
return content;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -42,10 +42,6 @@ public abstract class MultipleCondition extends AbstractSegment implements Condi
|
||||
return conditions;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
|
||||
@@ -27,10 +27,6 @@ public class NestedCondition extends MultipleCondition implements Condition {
|
||||
super("", condition);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(" + super.toString() + ")";
|
||||
|
||||
@@ -30,19 +30,11 @@ public class Not extends AbstractSegment implements Condition {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Condition#not()
|
||||
*/
|
||||
@Override
|
||||
public Condition not() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NOT " + condition;
|
||||
|
||||
@@ -29,10 +29,6 @@ public class NumericLiteral extends Literal<Number> {
|
||||
super(content);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Literal#getContent()
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public Number getContent() {
|
||||
|
||||
@@ -109,10 +109,6 @@ public class OrderByField extends AbstractSegment {
|
||||
return nullHandling;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return direction != null ? expression.toString() + " " + direction : expression.toString();
|
||||
|
||||
@@ -34,10 +34,6 @@ public class SelectList extends AbstractSegment {
|
||||
this.selectList = selectList;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return StringUtils.collectionToDelimitedString(selectList, ", ");
|
||||
|
||||
@@ -79,10 +79,6 @@ class SelectValidator extends AbstractImportValidator {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Visitor#enter(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
public void enter(Visitable segment) {
|
||||
|
||||
@@ -128,10 +124,6 @@ class SelectValidator extends AbstractImportValidator {
|
||||
super.enter(segment);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.AbstractImportValidator#leave(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
public void leave(Visitable segment) {
|
||||
|
||||
|
||||
@@ -69,10 +69,6 @@ public class SimpleCondition extends AbstractSegment implements Condition {
|
||||
return predicate;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return expression.toString() + " " + comparator + " " + predicate;
|
||||
|
||||
@@ -97,10 +97,6 @@ public class SimpleFunction extends AbstractSegment implements Expression {
|
||||
return Collections.unmodifiableList(expressions);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return functionName + "(" + StringUtils.collectionToDelimitedString(expressions, ", ") + ")";
|
||||
@@ -118,10 +114,6 @@ public class SimpleFunction extends AbstractSegment implements Expression {
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Aliased#getAlias()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getAlias() {
|
||||
return alias;
|
||||
|
||||
@@ -31,10 +31,6 @@ public class SimpleSegment extends AbstractSegment {
|
||||
return sql;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getSql();
|
||||
|
||||
@@ -29,20 +29,12 @@ public class StringLiteral extends Literal<CharSequence> {
|
||||
super(content);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Literal#getContent()
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
public CharSequence getContent() {
|
||||
return super.getContent();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Literal#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "'" + super.toString() + "'";
|
||||
|
||||
@@ -32,10 +32,6 @@ public class SubselectExpression extends AbstractSegment implements Expression {
|
||||
this.subselect = subselect;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(" + subselect + ")";
|
||||
|
||||
@@ -108,10 +108,6 @@ public class Table extends AbstractSegment implements TableLike {
|
||||
return new AliasedTable(name, alias);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Named#getName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getName() {
|
||||
return name;
|
||||
@@ -126,10 +122,6 @@ public class Table extends AbstractSegment implements TableLike {
|
||||
return name;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return name.toString();
|
||||
@@ -158,28 +150,16 @@ public class Table extends AbstractSegment implements TableLike {
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Aliased#getAlias()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getAlias() {
|
||||
return alias;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Table#getReferenceName()
|
||||
*/
|
||||
@Override
|
||||
public SqlIdentifier getReferenceName() {
|
||||
return getAlias();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.Table#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName() + " AS " + getAlias();
|
||||
|
||||
@@ -27,10 +27,6 @@ public class TrueCondition implements Condition {
|
||||
|
||||
private TrueCondition() {}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1 = 1";
|
||||
|
||||
@@ -41,10 +41,6 @@ public class Values extends AbstractSegment {
|
||||
this.tables = expressions;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VALUES(" + StringUtils.collectionToDelimitedString(tables, ", ") + ")";
|
||||
|
||||
@@ -32,10 +32,6 @@ public class Where extends AbstractSegment {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WHERE " + condition.toString();
|
||||
|
||||
@@ -41,10 +41,6 @@ class AssignmentVisitor extends TypedSubtreeVisitor<Assignment> {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.FilteredSubtreeVisitor#enterNested(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
Delegation enterNested(Visitable segment) {
|
||||
|
||||
@@ -59,10 +55,6 @@ class AssignmentVisitor extends TypedSubtreeVisitor<Assignment> {
|
||||
throw new IllegalStateException("Cannot provide visitor for " + segment);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.FilteredSubtreeVisitor#leaveNested(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
Delegation leaveNested(Visitable segment) {
|
||||
|
||||
@@ -80,10 +72,6 @@ class AssignmentVisitor extends TypedSubtreeVisitor<Assignment> {
|
||||
return super.leaveNested(segment);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.FilteredSubtreeVisitor#leaveMatched(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
Delegation leaveMatched(Assignment segment) {
|
||||
|
||||
|
||||
@@ -47,10 +47,6 @@ class BetweenVisitor extends FilteredSubtreeVisitor {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.FilteredSubtreeVisitor#enterNested(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
Delegation enterNested(Visitable segment) {
|
||||
|
||||
@@ -69,10 +65,6 @@ class BetweenVisitor extends FilteredSubtreeVisitor {
|
||||
throw new IllegalStateException("Cannot provide visitor for " + segment);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.FilteredSubtreeVisitor#leaveNested(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
Delegation leaveNested(Visitable segment) {
|
||||
|
||||
@@ -109,10 +101,6 @@ class BetweenVisitor extends FilteredSubtreeVisitor {
|
||||
return super.leaveNested(segment);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.relational.core.sql.render.FilteredSubtreeVisitor#leaveMatched(org.springframework.data.relational.core.sql.Visitable)
|
||||
*/
|
||||
@Override
|
||||
Delegation leaveMatched(Visitable segment) {
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user