Skip to content

DATAJDBC-138 -Improve package structure and naming. #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jdbc</artifactId>
<version>1.0.0.BUILD-SNAPSHOT</version>
<version>1.0.0.DATAJDBC-138-SNAPSHOT</version>

<name>Spring Data JDBC</name>
<description>Spring Data module for JDBC repositories.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.function.Consumer;
import java.util.function.Function;

import org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty;
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
import org.springframework.data.mapping.PropertyPath;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

import java.util.Map;

import org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty;
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
import org.springframework.data.mapping.PropertyPath;

/**
* Abstraction for accesses to the database that should be implementable with a single SQL statement and relates to a single entity as opposed to {@link JdbcEntityOperations} which provides interactions related to complete aggregates.
* Abstraction for accesses to the database that should be implementable with a single SQL statement and relates to a single entity as opposed to {@link JdbcAggregateOperations} which provides interactions related to complete aggregates.
*
* @author Jens Schauder
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.dao.NonTransientDataAccessException;
import org.springframework.data.jdbc.mapping.model.BasicJdbcPersistentEntityInformation;
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntity;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntityInformation;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty;
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.support.JdbcUtil;
import org.springframework.data.mapping.PropertyHandler;
import org.springframework.data.mapping.PropertyPath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import org.springframework.data.jdbc.core.conversion.DbAction.Insert;
import org.springframework.data.jdbc.core.conversion.DbAction.Update;
import org.springframework.data.jdbc.core.conversion.Interpreter;
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntity;
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import java.util.Map;

import org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty;
import org.springframework.data.jdbc.core.mapping.model.JdbcPersistentProperty;
import org.springframework.data.mapping.PropertyPath;
import org.springframework.util.Assert;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.convert.ClassGeneratingEntityInstantiator;
import org.springframework.data.convert.EntityInstantiator;
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntity;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty;
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.mapping.MappingException;
import org.springframework.data.mapping.PersistentProperty;
import org.springframework.data.mapping.PersistentPropertyAccessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @author Jens Schauder
* @since 1.0
*/
public interface JdbcEntityOperations {
public interface JdbcAggregateOperations {

<T> void save(T instance, Class<T> domainType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
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.mapping.event.AfterDeleteEvent;
import org.springframework.data.jdbc.mapping.event.AfterLoadEvent;
import org.springframework.data.jdbc.mapping.event.AfterSaveEvent;
import org.springframework.data.jdbc.mapping.event.BeforeDeleteEvent;
import org.springframework.data.jdbc.mapping.event.BeforeSaveEvent;
import org.springframework.data.jdbc.mapping.event.Identifier;
import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.mapping.model.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;
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 JdbcEntityOperations} implementation, storing aggregates in and obtaining them from a JDBC data store.
* {@link JdbcAggregateOperations} implementation, storing aggregates in and obtaining them from a JDBC data store.
*
* @author Jens Schauder
* @author Mark Paluch
* @since 1.0
*/
public class JdbcEntityTemplate implements JdbcEntityOperations {
public class JdbcAggregateTemplate implements JdbcAggregateOperations {

private final ApplicationEventPublisher publisher;
private final JdbcMappingContext context;
Expand All @@ -51,8 +51,8 @@ public class JdbcEntityTemplate implements JdbcEntityOperations {

private final DataAccessStrategy accessStrategy;

public JdbcEntityTemplate(ApplicationEventPublisher publisher, JdbcMappingContext context,
DataAccessStrategy dataAccessStrategy) {
public JdbcAggregateTemplate(ApplicationEventPublisher publisher, JdbcMappingContext context,
DataAccessStrategy dataAccessStrategy) {

this.publisher = publisher;
this.context = context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/**
* Builder for creating Select-statements. Not intended for general purpose, but only for the needs of the
* {@link JdbcEntityTemplate}.
* {@link JdbcAggregateTemplate}.
*
* @author Jens Schauder
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
package org.springframework.data.jdbc.core;

import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntity;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty;
import org.springframework.data.jdbc.repository.SimpleJdbcRepository;
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.repository.support.SimpleJdbcRepository;
import org.springframework.data.mapping.PropertyHandler;
import org.springframework.data.mapping.PropertyPath;
import org.springframework.data.util.Lazy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.HashMap;
import java.util.Map;

import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;

/**
* Provides {@link SqlGenerator}s per domain type. Instances get cached, so when asked multiple times for the same domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package org.springframework.data.jdbc.core.conversion;

import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;

/**
* Converts an entity that is about to be deleted into {@link DbAction}s inside a {@link AggregateChange} that need to be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

import org.springframework.data.jdbc.core.conversion.DbAction.Insert;
import org.springframework.data.jdbc.core.conversion.DbAction.Update;
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntity;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentEntityInformation;
import org.springframework.data.jdbc.mapping.model.JdbcPersistentProperty;
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.mapping.PersistentProperty;
import org.springframework.data.mapping.PersistentPropertyAccessor;
import org.springframework.data.util.StreamUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package org.springframework.data.jdbc.core.conversion;

import org.springframework.data.convert.EntityWriter;
import org.springframework.data.jdbc.mapping.model.JdbcMappingContext;
import org.springframework.data.jdbc.core.mapping.model.JdbcMappingContext;

/**
* Common infrastructure needed by different implementations of {@link EntityWriter}<Object, AggregateChange>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import java.util.Optional;

import org.springframework.data.jdbc.core.conversion.AggregateChange;
import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;

/**
* Gets published after deletion of an entity. It will have a {@link Specified} identifier. If the entity is empty or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;

/**
* Gets published after instantiation and setting of all the properties of an entity. This allows to do some
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import org.springframework.data.jdbc.core.conversion.AggregateChange;
import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;

/**
* Subclasses of this get published after a new instance or a changed instance was saved in the database.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import java.util.Optional;

import org.springframework.data.jdbc.core.conversion.AggregateChange;
import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;

/**
* Gets published when an entity is about to get deleted.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import org.springframework.data.jdbc.core.conversion.AggregateChange;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import java.util.Optional;

import org.springframework.data.jdbc.core.conversion.AggregateChange;
import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;

/**
* A {@link SimpleJdbcEvent} guaranteed to have an identifier.
Expand All @@ -41,7 +41,7 @@ public JdbcEventWithId(Specified id, Optional<Object> entity, AggregateChange ch

/*
* (non-Javadoc)
* @see org.springframework.data.jdbc.mapping.event.JdbcEvent#getId()
* @see org.springframework.data.jdbc.core.mapping.event.JdbcEvent#getId()
*/
@Override
public Specified getId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import lombok.Getter;

import java.util.Optional;

import org.springframework.data.jdbc.core.conversion.AggregateChange;
import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;

/**
* A {@link SimpleJdbcEvent} which is guaranteed to have an identifier and an entity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import java.util.Optional;

Expand Down Expand Up @@ -45,7 +45,7 @@ class SimpleJdbcEvent extends ApplicationEvent implements JdbcEvent {

/*
* (non-Javadoc)
* @see org.springframework.data.jdbc.mapping.event.JdbcEvent#getId()
* @see org.springframework.data.jdbc.core.mapping.event.JdbcEvent#getId()
*/
@Override
public Identifier getId() {
Expand All @@ -54,7 +54,7 @@ public Identifier getId() {

/*
* (non-Javadoc)
* @see org.springframework.data.jdbc.mapping.event.JdbcEvent#getOptionalEntity()
* @see org.springframework.data.jdbc.core.mapping.event.JdbcEvent#getOptionalEntity()
*/
@Override
public Optional<Object> getOptionalEntity() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.jdbc.mapping.event;
package org.springframework.data.jdbc.core.mapping.event;

import lombok.Value;

import java.util.Optional;

import org.springframework.data.jdbc.mapping.event.Identifier.Specified;
import org.springframework.data.jdbc.core.mapping.event.Identifier.Specified;

/**
* Simple value object for {@link Specified}.
Expand All @@ -35,7 +35,7 @@ class SpecifiedIdentifier implements Specified {

/*
* (non-Javadoc)
* @see org.springframework.data.jdbc.mapping.event.Identifier#getOptionalValue()
* @see org.springframework.data.jdbc.core.mapping.event.Identifier#getOptionalValue()
*/
@Override
public Optional<? extends Object> getOptionalValue() {
Expand Down
Loading