DATAJDBC-138 - Polishing.
Moved all types from mapping.model into model to align with the setup of other Spring Data modules. Original pull request: #67.
This commit is contained in:
@@ -21,7 +21,7 @@ import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.jdbc.core;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,11 +27,11 @@ import java.util.stream.StreamSupport;
|
||||
import org.springframework.dao.EmptyResultDataAccessException;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.dao.NonTransientDataAccessException;
|
||||
import org.springframework.data.jdbc.core.mapping.model.BasicJdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.BasicJdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.support.JdbcUtil;
|
||||
import org.springframework.data.mapping.PropertyHandler;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
@@ -23,9 +23,9 @@ import org.springframework.data.jdbc.core.conversion.DbAction.Delete;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.DeleteAll;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Insert;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Update;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.conversion.Interpreter;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.jdbc.core;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.data.convert.ClassGeneratingEntityInstantiator;
|
||||
import org.springframework.data.convert.EntityInstantiator;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.mapping.MappingException;
|
||||
import org.springframework.data.mapping.PersistentProperty;
|
||||
import org.springframework.data.mapping.PersistentPropertyAccessor;
|
||||
|
||||
@@ -23,6 +23,8 @@ import org.springframework.data.jdbc.core.conversion.AggregateChange.Kind;
|
||||
import org.springframework.data.jdbc.core.conversion.Interpreter;
|
||||
import org.springframework.data.jdbc.core.conversion.JdbcEntityDeleteWriter;
|
||||
import org.springframework.data.jdbc.core.conversion.JdbcEntityWriter;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.event.AfterDeleteEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.AfterLoadEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.AfterSaveEvent;
|
||||
@@ -30,8 +32,6 @@ import org.springframework.data.jdbc.core.mapping.event.BeforeDeleteEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.BeforeSaveEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.Identifier;
|
||||
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntityInformation;
|
||||
|
||||
/**
|
||||
* {@link JdbcAggregateOperations} implementation, storing aggregates in and obtaining them from a JDBC data store.
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
*/
|
||||
package org.springframework.data.jdbc.core;
|
||||
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.repository.support.SimpleJdbcRepository;
|
||||
import org.springframework.data.mapping.PropertyHandler;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
@@ -20,7 +20,7 @@ import lombok.RequiredArgsConstructor;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
|
||||
/**
|
||||
* Provides {@link SqlGenerator}s per domain type. Instances get cached, so when asked multiple times for the same domain
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.conversion;
|
||||
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
|
||||
/**
|
||||
* Converts an entity that is about to be deleted into {@link DbAction}s inside a {@link AggregateChange} that need to be
|
||||
|
||||
@@ -25,10 +25,10 @@ import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Insert;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Update;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.mapping.PersistentProperty;
|
||||
import org.springframework.data.mapping.PersistentPropertyAccessor;
|
||||
import org.springframework.data.util.StreamUtils;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
package org.springframework.data.jdbc.core.conversion;
|
||||
|
||||
import org.springframework.data.convert.EntityWriter;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
|
||||
/**
|
||||
* Common infrastructure needed by different implementations of {@link EntityWriter}<Object, AggregateChange>.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import org.springframework.data.domain.Persistable;
|
||||
import org.springframework.data.repository.core.support.PersistentEntityInformation;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.temporal.Temporal;
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.ClassUtils;
|
||||
* @author Greg Turnquist
|
||||
* @since 1.0
|
||||
*/
|
||||
public class BasicJdbcPersistentProperty extends AnnotationBasedPersistentProperty<JdbcPersistentProperty>
|
||||
class BasicJdbcPersistentProperty extends AnnotationBasedPersistentProperty<JdbcPersistentProperty>
|
||||
implements JdbcPersistentProperty {
|
||||
|
||||
private static final Map<Class<?>, Class<?>> javaToDbType = new LinkedHashMap<>();
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import org.springframework.core.convert.support.GenericConversionService;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import org.springframework.data.util.ParsingUtils;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import static java.util.Arrays.*;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import org.springframework.data.mapping.model.MutablePersistentEntity;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import org.springframework.data.repository.core.EntityInformation;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import org.springframework.data.mapping.PersistentProperty;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
/**
|
||||
* Interface and default implementation of a naming strategy. Defaults to no schema, table name based on {@link Class}
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -19,9 +19,9 @@ import lombok.RequiredArgsConstructor;
|
||||
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.data.auditing.AuditingHandler;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.event.BeforeSaveEvent;
|
||||
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.repository.config.EnableJdbcAuditing;
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,8 +27,8 @@ import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.DefaultDataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.DelegatingDataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.SqlGeneratorSource;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
@@ -19,9 +19,9 @@ import java.util.Optional;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.jdbc.core.mapping.model.ConversionCustomizer;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.ConversionCustomizer;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.lang.reflect.Method;
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.EntityRowMapper;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.repository.RowMapperMap;
|
||||
import org.springframework.data.projection.ProjectionFactory;
|
||||
import org.springframework.data.repository.core.NamedQueries;
|
||||
|
||||
@@ -20,8 +20,8 @@ import java.util.Optional;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.JdbcAggregateTemplate;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.repository.RowMapperMap;
|
||||
import org.springframework.data.repository.core.EntityInformation;
|
||||
import org.springframework.data.repository.core.RepositoryInformation;
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.context.ApplicationEventPublisherAware;
|
||||
import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.DefaultDataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.SqlGeneratorSource;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.repository.RowMapperMap;
|
||||
import org.springframework.data.repository.Repository;
|
||||
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.jdbc.repository.support;
|
||||
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.dao.EmptyResultDataAccessException;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.repository.query.RepositoryQuery;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.data.jdbc.core.JdbcAggregateOperations;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityInformation;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
/**
|
||||
@@ -34,19 +34,8 @@ import org.springframework.data.repository.CrudRepository;
|
||||
@RequiredArgsConstructor
|
||||
public class SimpleJdbcRepository<T, ID> implements CrudRepository<T, ID> {
|
||||
|
||||
private final JdbcPersistentEntityInformation<T, ID> entityInformation;
|
||||
|
||||
private final JdbcAggregateOperations entityOperations;
|
||||
|
||||
/**
|
||||
* Creates a new {@link SimpleJdbcRepository}.
|
||||
*/
|
||||
public SimpleJdbcRepository(JdbcAggregateTemplate entityOperations,
|
||||
JdbcPersistentEntityInformation<T, ID> entityInformation) {
|
||||
|
||||
this.entityOperations = entityOperations;
|
||||
this.entityInformation = entityInformation;
|
||||
}
|
||||
private final @NonNull JdbcAggregateOperations entityOperations;
|
||||
private final @NonNull JdbcPersistentEntityInformation<T, ID> entityInformation;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Collections;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.jdbc.core.FunctionCollector.CombinedDataAccessException;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link CascadingDataAccessStrategy}.
|
||||
|
||||
@@ -26,8 +26,8 @@ import java.util.HashMap;
|
||||
import org.junit.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
import org.springframework.jdbc.core.namedparam.SqlParameterSource;
|
||||
import org.springframework.jdbc.support.KeyHolder;
|
||||
|
||||
@@ -27,10 +27,10 @@ import org.mockito.ArgumentCaptor;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Insert;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.conversion.JdbcPropertyPath;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,10 +41,10 @@ import org.springframework.core.convert.support.DefaultConversionService;
|
||||
import org.springframework.core.convert.support.GenericConversionService;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.convert.Jsr310Converters;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.testing.TestConfiguration;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.rules.SpringClassRule;
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Mockito;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.mybatis.MyBatisContext;
|
||||
import org.springframework.data.jdbc.mybatis.MyBatisDataAccessStrategy;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
@@ -24,9 +24,9 @@ import java.util.function.Consumer;
|
||||
import org.assertj.core.api.SoftAssertions;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,10 +20,10 @@ import static org.assertj.core.api.Assertions.*;
|
||||
import org.assertj.core.api.SoftAssertions;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,10 +24,10 @@ import org.assertj.core.api.SoftAssertions;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.conversion.AggregateChange.Kind;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Delete;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
|
||||
/**
|
||||
* Unit tests for the {@link JdbcEntityDeleteWriter}
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.data.jdbc.core.conversion.AggregateChange.Kind;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Delete;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Insert;
|
||||
import org.springframework.data.jdbc.core.conversion.DbAction.Update;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
|
||||
/**
|
||||
* Unit tests for the {@link JdbcEntityWriter}
|
||||
|
||||
@@ -13,13 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.domain.Persistable;
|
||||
import org.springframework.data.jdbc.core.mapping.BasicJdbcPersistentEntityInformation;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
@@ -24,6 +24,11 @@ import java.time.ZonedDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.jdbc.core.mapping.BasicJdbcPersistentProperty;
|
||||
import org.springframework.data.jdbc.core.mapping.Column;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentProperty;
|
||||
import org.springframework.data.mapping.PropertyHandler;
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
@@ -24,6 +24,9 @@ import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.DelimiterNamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
|
||||
/**
|
||||
* Unit tests for the {@link DelimiterNamingStrategy}.
|
||||
@@ -13,13 +13,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.core.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
|
||||
/**
|
||||
@@ -13,11 +13,15 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityImpl;
|
||||
import org.springframework.data.jdbc.core.mapping.Table;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link JdbcPersistentEntityImpl}.
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.data.jdbc.mapping.model;
|
||||
package org.springframework.data.jdbc.core.mapping;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
|
||||
@@ -22,7 +22,10 @@ import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntityImplUnitTests.DummySubEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntity;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcPersistentEntityImplUnitTests.DummySubEntity;
|
||||
|
||||
/**
|
||||
* Unit tests for the {@link NamingStrategy}.
|
||||
@@ -31,7 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
|
||||
import org.springframework.data.jdbc.testing.TestConfiguration;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
|
||||
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
|
||||
import org.springframework.data.jdbc.repository.support.SimpleJdbcRepository;
|
||||
|
||||
@@ -36,6 +36,7 @@ import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.DefaultDataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.SqlGeneratorSource;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.event.AfterDeleteEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.AfterLoadEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.AfterSaveEvent;
|
||||
@@ -43,7 +44,6 @@ import org.springframework.data.jdbc.core.mapping.event.BeforeDeleteEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.BeforeSaveEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.event.Identifier;
|
||||
import org.springframework.data.jdbc.core.mapping.event.JdbcEvent;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
|
||||
import org.springframework.data.jdbc.repository.support.SimpleJdbcRepository;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.data.annotation.LastModifiedBy;
|
||||
import org.springframework.data.annotation.LastModifiedDate;
|
||||
import org.springframework.data.auditing.DateTimeProvider;
|
||||
import org.springframework.data.domain.AuditorAware;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.text.NumberFormat;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.repository.RowMapperMap;
|
||||
import org.springframework.data.jdbc.repository.config.ConfigurableRowMapperMap;
|
||||
import org.springframework.data.jdbc.repository.query.Query;
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.DefaultDataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.repository.RowMapperMap;
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.test.util.ReflectionTestUtils;
|
||||
|
||||
@@ -28,9 +28,9 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.jdbc.core.DataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.DefaultDataAccessStrategy;
|
||||
import org.springframework.data.jdbc.core.SqlGeneratorSource;
|
||||
import org.springframework.data.jdbc.core.mapping.model.ConversionCustomizer;
|
||||
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.model.NamingStrategy;
|
||||
import org.springframework.data.jdbc.core.mapping.ConversionCustomizer;
|
||||
import org.springframework.data.jdbc.core.mapping.JdbcMappingContext;
|
||||
import org.springframework.data.jdbc.core.mapping.NamingStrategy;
|
||||
import org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations;
|
||||
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||
|
||||
Reference in New Issue
Block a user