Commit Graph

197 Commits

Author SHA1 Message Date
Mark Paluch a857fbf4a9 DATAJDBC-250 - Release version 1.0 GA (Lovelace). 1.0.0.RELEASE 2018-09-21 07:08:39 -04:00
Mark Paluch 76be2791fc DATAJDBC-250 - Prepare 1.0 GA (Lovelace). 2018-09-21 07:07:51 -04:00
Mark Paluch 70ba5850d8 DATAJDBC-250 - Updated changelog. 2018-09-21 07:07:50 -04:00
Mark Paluch bf81c728b2 DATAJDBC-267 - Polishing.
Add author tags. Extend Javadoc.

Original pull request: #89.
2018-09-21 06:44:00 -04:00
Christoph Strobl 234a17d4c2 DATAJDBC-267 - Favor JdbcCustomConversions over CustomConversions in return type.
Original pull request: #89.
2018-09-21 06:37:43 -04:00
Michael J. Simons be7c04cfed DATAJDBC-267 - Explicitly use the own custom conversions bean.
Original pull request: #89.
2018-09-21 06:37:38 -04:00
Jens Schauder 84de41a87d DATAJDBC-264 - Polishing.
Added a test.
Added an author tag.
Minor formatting.

Original pull request: #88.
2018-09-18 15:35:52 +02:00
Yoichi Imai 8434f6e3dd DATAJDBC-264 - Fix insert statement for empty parameter list.
When an entity consists only of it's id column, the value list contained a single `:`.
This commit fixes this.

Original pull request: #88.
2018-09-18 15:35:32 +02:00
Jens Schauder 08ee846e71 DATAJDBC-218 - The Column annotation affects the back reference too.
Also:
Added documentation for the new behavior.
Made the value of the column annotation optional by providing a default.

Original pull request: #83.
2018-09-18 15:25:55 +02:00
Jens Schauder 335a7cbe65 DATAJDBC-218 - Polishing.
Added line breaks for better readability.
Added braces to if/else statements.
Used StringUtils instead of .equals("").

Original pull request: #83.
2018-09-18 15:05:36 +02:00
Florian Lüdiger 0a86f3a43b DATAJDBC-218 - Add support for key column in @Column annotation.
Original pull request: #83.
2018-09-18 15:05:36 +02:00
Mark Paluch 1c15215735 DATAJDBC-265 - Include documentation about Object Mapping Fundamentals.
Related ticket: DATACMNS-1374.
2018-09-18 13:30:42 +02:00
Jens Schauder 863bf225f6 DATAJDBC-261 - Added link to license.txt in README. 2018-09-12 08:11:44 +02:00
Florian Lüdiger ba5ce90374 DATAJDBC-260 - Fix links in the reference documentation.
Original pull request: #87.
2018-09-12 07:41:24 +02:00
Oliver Gierke 3cbe2935ba DATAJDBC-252 - Make sure SimpleJdbcRepository.save(…) returns saved instance.
Previously, SimpleJdbcRepository.save(…) returned the original instance as result of the operation. That assumed that the JdbcAggregateOperations would only manipulate that instance, not return a new one. We now properly return the result of the delegating method call.
2018-08-21 12:03:38 +02:00
Oliver Gierke 84379b28e9 DATAJDBC-252 - Polishing.
Original pull request: #86.
2018-08-21 11:04:26 +02:00
Jens Schauder 2a55aeb2b8 DATAJDBC-252 - Optimize population of (immutable) entities to be created.
The entity creation not skips the property population entirely if the metamodel indicates that the instantiation already creates a complete entity. If there's need to actively populate properties, we now correctly skip the ones already consumed by the constructor.

Original pull request: #86.
2018-08-21 11:04:23 +02:00
Jens Schauder 63b9754180 DATAJDBC-251 - Polishing.
Removed superfluous whitespace.

Original pull request: #85.
2018-08-20 22:30:08 +02:00
Jens Schauder 55c901b43b DATAJDBC-251 - Back-reference for dependent entity gets properly set.
If a parent DbAction does not offer a generated id, the id of the entity is used instead. This behavior was broken by DATAJDBC-241.

Related tickets: DATAJDBC-241.
Original pull request: #85.
2018-08-20 22:26:49 +02:00
Oliver Gierke d158cd062d DATAJDBC-245 - After release cleanups. 2018-08-20 10:56:53 +02:00
Oliver Gierke c755fea13d DATAJDBC-245 - Prepare next development iteration. 2018-08-20 10:56:52 +02:00
Oliver Gierke 11db6e78f6 DATAJDBC-245 - Release version 1.0 RC2 (Lovelace). 1.0.0.RC2 2018-08-20 10:40:11 +02:00
Oliver Gierke e680a2764e DATAJDBC-245 - Prepare 1.0 RC2 (Lovelace). 2018-08-20 10:39:44 +02:00
Oliver Gierke 6c6d37af2d DATAJDBC-245 - Updated changelog. 2018-08-20 10:39:43 +02:00
Jens Schauder e398db544c DATAJDBC-241 - Support for immutable entities.
Immutable entities can now be saved and loaded and the immutability will be honored.

This feature is currently limited to a single level of reference.

In order to implement this the logic for updating IDs with those generated from the database got moved out of the DefaultDataAccessStrategy into the AggregateChange.
As part of that move DataAccessStrategy.save now returns a generated id, if available.

See also: DATAJDBC-248.
2018-08-20 09:42:22 +02:00
Mark Paluch eb69f4206c DATAJDBC-242 - Polishing.
Slight rewording of individual parts. Include namespace/populator/return type includes. Use spring-framework-docs variable where possible.

Original pull request: #81.
2018-08-02 09:56:20 +02:00
Jens Schauder 2642d1be8f DATAJDBC-242 - Updated documentation.
Introduced variable for linking to JavaDoc.
Used the `revnumber` in there in order to link to the proper version of the JavaDoc.
Changed package and class names matching the changes of DATAJDBC-226.
Fixed some typos.

Original pull request: #81.
2018-08-02 09:56:14 +02:00
Jens Schauder 4c179a93ec DATAJDBC-229 - Added UUID.class as simple type.
Also made RelationalMappingContext actually use the JdbcSimpleTypes.

In order for this to work the database needs to be able to handle parameters of type UUID and store them either as such or internally convert them.
Currently no conversion by Spring Data JDBC happens.

Original pull request: #76.
2018-07-27 14:37:45 +02:00
Toshiaki Maki 21c9bd2144 DATAJDBC-229 Added test demonstrating java.util.UUID is not a simple type.
Original pull request: #76.
2018-07-27 14:33:07 +02:00
Mark Paluch d23962d46e DATAJDBC-215 - After release cleanups. 2018-07-26 12:32:29 +02:00
Mark Paluch 32a873fba2 DATAJDBC-215 - Prepare next development iteration. 2018-07-26 12:32:26 +02:00
Mark Paluch 53094a028d DATAJDBC-215 - Release version 1.0 RC1 (Lovelace). 1.0.0.RC1 2018-07-26 12:06:35 +02:00
Mark Paluch 264235703e DATAJDBC-215 - Prepare 1.0 RC1 (Lovelace). 2018-07-26 12:04:31 +02:00
Mark Paluch 7ab5d3f32d DATAJDBC-215 - Updated changelog. 2018-07-26 12:04:29 +02:00
Mark Paluch d30116921e DATAJDBC-243 - Remove JdbcConfiguration import in EnableJdbcRepositories.
We now no longer import JdbcConfiguration to prevent bean overrides when creating a configuration class that extends JdbcConfiguration. Using EnableJdbcRepositories requires either an import of the configuration class inside the application code or registration of the required RelationalConverter and RelationalMappingContext beans.

Related ticket: DATAJDBC-244
2018-07-26 10:38:46 +02:00
Mark Paluch 6c79b04033 DATAJDBC-233 - Polishing.
Enhance Javadoc. Fix generics for AggregateChange in JdbcAggregateTemplate. Use Lombok's Data annotation where possible. Typos.

Original pull request: #80.
2018-07-25 09:26:37 +02:00
Jens Schauder 1085918135 DATAJDBC-233 - Changed API in order to support immutable entities.
Note: Immutable entities still aren't supported yet, these are just the API changes plus implementations that work for mutable entities.

The API of DbActions will need further evolution.

Original pull request: #80.
2018-07-25 09:26:32 +02:00
Jens Schauder 962513627c DATAJDBC-235 - JdbcConfiguration is now suitable to be extended.
All the methods in JdbcConfiguration are now protected so the class can be extended and the methods overwritten in order to customize the configuration of Spring Data JDBC.
2018-07-20 16:35:39 +02:00
Jens Schauder 0445aa61db DATAJDBC-238 - JdbcRepositoryFactory.getEntityInformation never returns null.
Instead it throws an exception as this is required by the interface it implements.
2018-07-20 13:49:43 +02:00
Jens Schauder 8ee15fb1fd DATAJDBC-237 - Removed @since annotations.
@since annotation are only supposed to be used for classes introduced after the initial release.
2018-07-20 13:39:51 +02:00
Mark Paluch 12d539a017 DATAJDBC-227 - Polishing.
Return List<DbChange<?>> in RelationalEntityWriters so AggregateChange can be assembled in less places to reduce the number of abstractions per method. Change ResultOrException in FunctionCollector to static class so instances no longer retain a reference to their enclosing class. Fix DbAction generics in AggregateChange. Replace simple constructors with Lombok usage. Javadoc, typos, formatting.

Original pull request: #79.
2018-07-19 15:34:01 +02:00
Jens Schauder bdefd3da9a DATAJDBC-227 - Refactored JdbcEntityWriter and DbActions.
JdbcEntityWriter and JdbcDeleteEntityWriter now use an iterative approach based on PersistentPropertyPath instead of a recursive one.

DbAction is now split into multiple interfaces representing different variants of actions.
The implementations are simple value types without any implementation inheritance hierarchy.
All elements of a DbAction implementation are not null making usage and construction of instances much easier.

Original pull request: #79.
2018-07-19 15:33:46 +02:00
Jens Schauder c412aad6b8 DATAJDBC-235 - Polishing.
Corrected nullability annotations.
Minor improvements in Javadoc.
Added @author tags.
Removed unused imports.
2018-07-19 10:38:52 +02:00
Mark Paluch 2c5489b070 DATAJDBC-235 - Incorporate feedback from review.
Refactor ResultSetParameterValueProvider into Function<Parameter, Object>. Remove unnecessary assertions.
2018-07-19 10:38:52 +02:00
Mark Paluch fb858bf1b1 DATAJDBC-235 - Add support for configurable conversion.
We now support configurable conversion by introducing CustomConversions and RelationalConverter. CustomConversions is a registry for converters that should be applied on a per-type basis for properties. CustomConversions is typically registered as bean and fed into RelationalMappingContext and the newly introduced RelationalConverter to consider simple types and conversion rules.

RelationalConverter with its implementation BasicRelationalConverter encapsulates conversion infrastructure such as EntityInstantiator, CustomConversions, and MappingContext that is required during relational value conversion. BasicRelationalConverter is responsible for simple value conversion and entity instantiation to pull related code together. It's not in full charge of row result to object mapping as this responsibility remains as part of DataAccessStrategy.

This change supersedes and removes ConversionCustomizer.
2018-07-19 10:38:52 +02:00
Mark Paluch 9ad0cf0296 DATAJDBC-235 - Polishing.
Change InceptionYear to a single year as it's not a range.
2018-07-19 10:38:52 +02:00
Oliver Gierke 95d316367b DATAJDBC-232 - Adapt code to changes to support immutable entities.
We now treat all properties of an entity mutable and continue to use the reflective PersistentPropertyAccessor implementation to make sure we don't break the old behavior of reflectively mutating immutable objects.

This is a workaround for now and has to be replaced by more exhaustive changes later.

Related tickets: DATACMNS-1322.
2018-07-13 16:50:30 +02:00
Oliver Gierke 9991946d92 DATAJDBC-226 - Renamed all types named Jdbc… in relational package Relational…. 2018-06-22 15:40:32 +02:00
Oliver Gierke 8a67e52b61 DATAJDBC-226 - Extracted packages not directly tied to JDBC into separate package. 2018-06-22 15:33:13 +02:00
Jens Schauder 0a0e774129 DATAJDBC-137 - Fixes warnings and improves Javadoc.
All packages now use @NoNullApi.
All warnings related to that fixed, except a few cases where upstream annotations are simply wrong.
Added null checks.
Fixed generic types where possible.
Improved Javadoc.
Code Formatting.
2018-06-11 16:15:52 +02:00