DATAJDBC-374 - Introduce shortcuts for Embedded#onEmpty(…)
@Embedded.Nullable & @Embedded.Empty offer shortcuts for @Embedded(onEmpty = USE_NULL) and @Embedded(onEmpty = USE_EMPTY) to reduce verbositility and simultaneously set JSR-305 @javax.annotation.Nonnull accordingly.
@Embedded.Nullable
EmbeddedEntity embeddedEntity;
Original pull request: #154.
This commit is contained in:
committed by
Jens Schauder
parent
5830b83cf4
commit
55a3f9c372
@@ -558,13 +558,13 @@ public class EntityRowMapperUnitTests {
|
||||
static class WithEmptyEmbeddedImmutableValue {
|
||||
|
||||
@Id Long id;
|
||||
@Embedded(onEmpty = OnEmpty.USE_EMPTY) ImmutableValue embeddedImmutableValue;
|
||||
@Embedded.Empty ImmutableValue embeddedImmutableValue;
|
||||
}
|
||||
|
||||
static class WithEmbeddedPrimitiveImmutableValue {
|
||||
|
||||
@Id Long id;
|
||||
@Embedded(onEmpty = OnEmpty.USE_NULL) ImmutablePrimitiveValue embeddedImmutablePrimitiveValue;
|
||||
@Embedded.Nullable ImmutablePrimitiveValue embeddedImmutablePrimitiveValue;
|
||||
}
|
||||
|
||||
@Value
|
||||
|
||||
Reference in New Issue
Block a user