Commit Graph

1510 Commits

Author SHA1 Message Date
Oliver Gierke
2c20377cfa DATACMNS-1166 - Upgrade to Vavr 0.9.1. 2017-09-21 09:25:11 +02:00
Oliver Gierke
e7ae4a8bb8 DATACMNS-1165 - Added support for Streamable as repository return type.
We now allow users to use our own Streamable interface as query method return types to easily invoke ….stream() on everything that returns an Iterable using non-parallel streaming by default.
2017-09-20 16:31:29 +02:00
Oliver Gierke
1a199847cd DATACMNS-1162 - Improved support for immutable aggregates.
AbstractAggregateRoot is now generified to be able to use its concrete type on methods returning an instance of itself. Added new methods andEvent(…) and andEventsFrom(…) to easily transfer events from another aggregate instance. Added unit tests for fundamental functionality of the base class.
2017-09-20 11:45:37 +02:00
Oliver Gierke
72b927ea2c DATACMNS-1163 - EventPublishingInterceptor now prefers arguments over return values for event publication.
We now prefer to inspect the arguments handed to save(…) methods over inspecting the return value as the invocation of the actual method is free to exchange the instance handed into it and return a completely new one with the events contained in the parameter completely wiped.
2017-09-20 11:09:25 +02:00
Mark Paluch
a8cc4783bf DATACMNS-1159 - Upgrade to OpenWebBeans 2.0.1. 2017-09-18 15:05:47 +02:00
Oliver Gierke
687d7449be DATACMNS-1130 - After release cleanups. 2017-09-11 17:40:20 +02:00
Oliver Gierke
0966e3f476 DATACMNS-1130 - Prepare next development iteration. 2017-09-11 17:40:18 +02:00
Oliver Gierke
2d70e2843e DATACMNS-1130 - Release version 2.0 RC3 (Kay). 2017-09-11 17:24:44 +02:00
Oliver Gierke
a56e88d095 DATACMNS-1130 - Prepare 2.0 RC3 (Kay). 2017-09-11 17:23:51 +02:00
Oliver Gierke
09208814da DATACMNS-1130 - Updated changelog. 2017-09-11 17:23:37 +02:00
Mark Paluch
4c66061b61 DATACMNS-1131 - Updated changelog. 2017-09-11 12:43:46 +02:00
Oliver Gierke
cdc6201fce DATACMNS-1011 - Rewrote chapter on repository projections. 2017-09-08 15:45:19 +02:00
Johnny Lim
fb19d84c75 DATACMNS-1153 - Removed unreachable assertion in XmlRepositoryConfigurationSource.
Original pull request: #236.
2017-09-07 15:22:35 +02:00
Oliver Gierke
2cfd6b8966 DATACMNS-1152 - Setup of ProjectingJackson2HttpMessageConverter now tries to use unique ObjectMapper from ApplicationContext.
We're now trying to look up a uniquely available ObjectMapper instance from the application context falling back to a simple new instance in case none can be found.
2017-09-06 17:11:51 +02:00
Oliver Gierke
4b323eca11 DATACMNS-1150 - Projection methods with SpEL expressions can now use method parameters.
We now forward method parameters of methods on projection interfaces to the expression evaluation. The parameters are exposed via an array named "args".
2017-09-04 19:15:04 +02:00
Mark Paluch
c091d4db56 DATACMNS-1148 - Return primitive boolean in PartTree.isExistsProjection(…).
Declare primitive return type to avoid nullable return values.
2017-08-28 15:52:26 +02:00
Mark Paluch
67f52d5d70 DATACMNS-1141 - Polishing.
Remove superfluous null checks in places where state cannot be null. Add nullable annotations to nullable variables. Remove whitespaces.
2017-08-28 15:52:25 +02:00
Christoph Strobl
0669632a61 DATACMNS-1141 - Add missing NonNullApi and Nullable annotations. 2017-08-28 13:32:47 +02:00
Mark Paluch
1e134cbd33 DATACMNS-1141 - Fix line endings. 2017-08-28 13:32:47 +02:00
Mark Paluch
3a2b6b601b DATACMNS-1141 - Add missing NonNullApi and Nullable annotations.
Add Nullable annotation to ParsingUtils, Sort.Order and PropertyValueProvider.

Add getRequiredAnnotation(…) to PersistentEntity and PersistentProperty to provide methods returning required, non-null annotations.
2017-08-28 13:32:15 +02:00
Mark Paluch
d657b17e74 DATACMNS-1147 - Do not consider @NoRepositoryBean interfaces as fragment interfaces.
We filter interfaces annotated with @NoRepositoryBean from fragment interface candidates and not longer scan for implementations of these.

Extending a base repository usually requires an interface which is used as base interface instead of Repository/CrudRepository in user repositories. If the naming scheme of the extended interface and the implementation fits to fragment interfaces, then we previously registered the class additionally as fragment implementation. The bean registration caused container startup failures because of unsatisfied dependencies or would shadow the base repository implementation.

Original pull request #239.
2017-08-28 12:54:17 +02:00
Oliver Gierke
22b6971318 DATACMNS-1126 - Polishing.
Moved PreferredConstructorDiscoverers into PreferredConstructorDiscoverer to hide more API. Renamed ClassGeneratingKotlinEntityInstantiator to KotlinClassGeneratingEntityInstantiator.

Use org.springframework.util.Assert instead of com.mysema.commons.lang.Assert.

Original pull request: #233.
2017-08-25 15:00:45 +02:00
Mark Paluch
b05c4e74fb DATACMNS-1126 - Polishing.
Trailing whitespace in ReflectionUtils.

Original pull request: #233.
2017-08-25 13:04:28 +02:00
Mark Paluch
22b37800ec DATACMNS-1126 - Add class-generating entity instantiation support for Kotlin.
We now discover Kotlin constructors and apply parameter defaulting to allow construction of immutable value objects. Constructor discovery uses primary constructors by default and considers PersistenceConstructor annotations.

KotlinClassGeneratingEntityInstantiator can instantiate Kotlin classes with default parameters by resolving the synthetic constructor. Null values translate to parameter defaults.

class Person(val firstname: String = "Walter") {
}

class Address(val street: String, val city: String) {

	@PersistenceConstructor
	constructor(street: String = "Unknown", city: String = "Unknown", country: String) : this(street, city)
}

Original pull request: #233.
2017-08-25 13:04:28 +02:00
Mark Paluch
e4e677d6b1 DATACMNS-1140 - Polishing.
Extend javadoc. Remove trailing whitespaces.

Original pull request: #238.
2017-08-25 09:31:04 +02:00
Christoph Strobl
0ff4961853 DATACMNS-1140 - Open up Query by Example to allow extension in module implementations.
We turned Example and ExampleMatcher into interfaces with default implementations created via the static of methods. The default ExampleMatcher has strongly typed default implementation. This change allows store implementations to create their very own flavor of Example and ExampleMatcher allowing eg. non typed ones.

Original pull request: #238.
2017-08-25 09:28:54 +02:00
Oliver Gierke
d018757995 DATACMNS-1144 - @JsonPath now supports multiple path expressions.
Path expressions are now evaluated one by one with the first one actually available in the payload being used for value lookup. Also tweaked the default behavior to return null in case of an single, invalid path.
2017-08-24 12:56:19 +02:00
Oliver Gierke
ce7a2e8ea5 DATACMNS-1143 - Improve design of AbstractAggregateRoot.
Methods for domain event registration and access are now not following bean semantics anymore to avoid those accidentally leaking into formats that use the bean spec (e.g. Jackson to produce JSON).
2017-08-23 15:47:50 +02:00
Mark Paluch
fc402184e2 DATACMNS-1136 - Update reference documentation for composite repositories. 2017-08-14 16:56:23 +02:00
Oliver Gierke
fb9d38d79c DATACMNS-1139 - AbstractPersistentProperty.getRawType() now correctly resolves generics.
We're now favoring the generic TypeInformation over trying to resolve the property type via field or PropertyDescriptor as only the former does proper generic type resolution.
2017-08-14 14:06:16 +02:00
Oliver Gierke
fab854c906 DATACMNS-1138 - TypeInformation.specialize(…) now only specializes unresolved parameterized types.
Type specialization - i.e. enrichment of a raw type with a current generic context - is now only done if the current type is not yet resolved completely. This allows wildcarded target references to just fall back to the type to specialize, which will then by definition carry more generics information than the one to be specialized.
2017-08-11 16:15:54 +02:00
Oliver Gierke
756396a065 DATACMNS-1135 - Fixed generics lookup for recursively nested container references.
Revert the merging of a parent type's type variable map and only apply the locally available declared generics in case of parameterized types. Moved that augmentation into ParameterizedTypeInformation.
2017-08-03 15:39:54 +02:00
Mark Paluch
0ff80930a3 DATACMNS-1080 - Inject generated property accessor classes via ReflectUtils.defineClass(…).
We now use CGLibs ReflectUtils.defineClass(…) to inject classes into the entity's class loader instead of our own code. ReflectUtils itself discovers whether the class loader is encapsulated and falls back to Unsafe for class definition. We no longer require our own code so the evil class was removed.

Original pull request: #234.
2017-07-27 08:43:09 +02:00
Oliver Gierke
85fb08a797 DATACMNS-1127 - Updated changelog. 2017-07-27 00:48:48 +02:00
Mark Paluch
3c66ce423f DATACMNS-1077 - Remove RxJava1CrudRepository and RxJava1SortingRepository interfaces.
RxJava 1 development is phased out over time (Feature freeze in June 2017, EOL in March 2018) and we don't want to ship newly developed first-class support for libraries known to be no longer maintained. RxJava 1 type adoption support is not affected. Single and Observable can be still used in user-space code declaration, also copies of RxJava1CrudRepository (in user-space code) remain working.
2017-07-26 14:36:54 +02:00
Oliver Gierke
b86f42b9fb DATACMNS-1128 - After release cleanups. 2017-07-25 16:10:38 +02:00
Oliver Gierke
8768f31044 DATACMNS-1128 - Prepare next development iteration. 2017-07-25 16:10:33 +02:00
Oliver Gierke
986222ccc6 DATACMNS-1128 - Release version 2.0 RC2 (Kay). 2017-07-25 15:34:22 +02:00
Oliver Gierke
22e141b62d DATACMNS-1128 - Prepare 2.0 RC2 (Kay). 2017-07-25 15:33:32 +02:00
Oliver Gierke
1d30d1d628 DATACMNS-1128 - Updated changelog. 2017-07-25 15:33:17 +02:00
Oliver Gierke
6f44a40ecb DATACMNS-1129 - Polishing.
Formatting.
2017-07-25 13:52:16 +02:00
Oliver Gierke
7960786083 DATACMNS-1129 - A PartTree is now an empty iterable if no predicate is given. 2017-07-25 13:52:16 +02:00
Oliver Gierke
6c55d7e03b DATACMNS-1090 - After release cleanups. 2017-07-25 10:00:08 +02:00
Oliver Gierke
f039fb6b0c DATACMNS-1090 - Prepare next development iteration. 2017-07-25 10:00:02 +02:00
Oliver Gierke
631aff202c DATACMNS-1090 - Release version 2.0 RC1 (Kay). 2017-07-25 09:48:48 +02:00
Oliver Gierke
116ae703fc DATACMNS-1090 - Prepare 2.0 RC1 (Kay). 2017-07-25 09:48:00 +02:00
Oliver Gierke
96f0fd8e5c DATACMNS-1090 - Updated changelog. 2017-07-25 09:47:47 +02:00
Oliver Gierke
beebcf1f7c DATACMNS-1114 - Updated Javadoc of Sort.and(…) to match nullability requirements. 2017-07-24 23:03:58 +02:00
Oliver Gierke
83410752ae DATACMNS-1084 - Updated changelog. 2017-07-24 22:20:34 +02:00
Oliver Gierke
a53a331813 DATACMNS-1124 - Upgraded to Javaslang 2.0.6. 2017-07-24 14:17:44 +02:00