@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2019-2021 the original author or authors.
|
* Copyright 2021 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
*/
|
*/
|
||||||
package org.springframework.data.relational.core.conversion;
|
package org.springframework.data.relational.core.conversion;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
import org.springframework.core.convert.ConversionService;
|
import org.springframework.core.convert.ConversionService;
|
||||||
import org.springframework.core.convert.support.ConfigurableConversionService;
|
import org.springframework.core.convert.support.ConfigurableConversionService;
|
||||||
import org.springframework.core.convert.support.DefaultConversionService;
|
import org.springframework.core.convert.support.DefaultConversionService;
|
||||||
@@ -37,10 +41,6 @@ import org.springframework.lang.Nullable;
|
|||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.ClassUtils;
|
import org.springframework.util.ClassUtils;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link RelationalConverter} that uses a {@link MappingContext} to apply basic conversion of relational values to
|
* {@link RelationalConverter} that uses a {@link MappingContext} to apply basic conversion of relational values to
|
||||||
* property values.
|
* property values.
|
||||||
@@ -63,7 +63,7 @@ public class BasicRelationalConverter implements RelationalConverter {
|
|||||||
/**
|
/**
|
||||||
* Creates a new {@link BasicRelationalConverter} given {@link MappingContext}.
|
* Creates a new {@link BasicRelationalConverter} given {@link MappingContext}.
|
||||||
*
|
*
|
||||||
* @param context must not be {@literal null}. org.springframework.data.jdbc.core.DefaultDataAccessStrategyUnitTests
|
* @param context must not be {@literal null}.
|
||||||
*/
|
*/
|
||||||
public BasicRelationalConverter(
|
public BasicRelationalConverter(
|
||||||
MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context) {
|
MappingContext<? extends RelationalPersistentEntity<?>, ? extends RelationalPersistentProperty> context) {
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public class BasicRelationalPersistentProperty extends AnnotationBasedPersistent
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty#getColumnName()
|
* @see org.springframework.data.relational.core.mapping.model.RelationalPersistentProperty#getColumnName()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SqlIdentifier getColumnName() {
|
public SqlIdentifier getColumnName() {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import org.springframework.data.util.TypeInformation;
|
|||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link MappingContext} implementation for JDBC.
|
* {@link MappingContext} implementation.
|
||||||
*
|
*
|
||||||
* @author Jens Schauder
|
* @author Jens Schauder
|
||||||
* @author Greg Turnquist
|
* @author Greg Turnquist
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ package org.springframework.data.relational.core.mapping;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.springframework.data.mapping.model.BasicPersistentEntity;
|
import org.springframework.data.mapping.model.BasicPersistentEntity;
|
||||||
import org.springframework.data.mapping.model.PersistentPropertyAccessorFactory;
|
|
||||||
import org.springframework.data.relational.core.sql.SqlIdentifier;
|
import org.springframework.data.relational.core.sql.SqlIdentifier;
|
||||||
import org.springframework.data.util.Lazy;
|
import org.springframework.data.util.Lazy;
|
||||||
import org.springframework.data.util.TypeInformation;
|
import org.springframework.data.util.TypeInformation;
|
||||||
@@ -74,7 +73,7 @@ class RelationalPersistentEntityImpl<T> extends BasicPersistentEntity<T, Relatio
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.springframework.data.jdbc.mapping.model.JdbcPersistentEntity#getTableName()
|
* @see org.springframework.data.relational.mapping.model.RelationalPersistentEntity#getTableName()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SqlIdentifier getTableName() {
|
public SqlIdentifier getTableName() {
|
||||||
@@ -90,7 +89,7 @@ class RelationalPersistentEntityImpl<T> extends BasicPersistentEntity<T, Relatio
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
* @see org.springframework.data.jdbc.core.mapping.model.JdbcPersistentEntity#getIdColumn()
|
* @see org.springframework.data.relational.core.mapping.model.RelationalPersistentEntity#getIdColumn()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SqlIdentifier getIdColumn() {
|
public SqlIdentifier getIdColumn() {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
|
|||||||
/**
|
/**
|
||||||
* {@link BeforeConvertCallback} to capture auditing information on persisting and updating entities.
|
* {@link BeforeConvertCallback} to capture auditing information on persisting and updating entities.
|
||||||
* <p>
|
* <p>
|
||||||
* An instance of this class gets registered when you enable auditing for Spring Data JDBC.
|
* An instance of this class gets registered when you enable auditing for Spring Data Relational.
|
||||||
*
|
*
|
||||||
* @author Jens Schauder
|
* @author Jens Schauder
|
||||||
* @author Mark Paluch
|
* @author Mark Paluch
|
||||||
|
|||||||
Reference in New Issue
Block a user