@@ -26,7 +26,7 @@ import lombok.With;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.annotation.PersistenceConstructor;
|
||||
import org.springframework.data.annotation.PersistenceCreator;
|
||||
|
||||
/**
|
||||
* Coarse classification for {@link LegoSet}s, like "Car", "Plane", "Building" and so on.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.data.annotation.PersistenceConstructor;
|
||||
* @author Jens Schauder
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE, onConstructor = @__(@PersistenceConstructor))
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE, onConstructor = @__(@PersistenceCreator))
|
||||
public class Category {
|
||||
|
||||
private final @Id @With Long id;
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.annotation.PersistenceConstructor;
|
||||
import org.springframework.data.annotation.PersistenceCreator;
|
||||
|
||||
class Minion {
|
||||
@Id
|
||||
@@ -32,7 +32,7 @@ class Minion {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@PersistenceConstructor
|
||||
@PersistenceCreator
|
||||
private Minion(Long id, String name, Collection<Toy> toys) {
|
||||
|
||||
this.id = id;
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.annotation.PersistenceConstructor;
|
||||
import org.springframework.data.annotation.PersistenceCreator;
|
||||
import org.springframework.data.annotation.Version;
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class Minion {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@PersistenceConstructor
|
||||
@PersistenceCreator
|
||||
private Minion(Long id, String name, Collection<Toy> toys, int version) {
|
||||
|
||||
this.id = id;
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.UUID;
|
||||
|
||||
import org.jmolecules.ddd.types.AggregateRoot;
|
||||
import org.jmolecules.ddd.types.Identifier;
|
||||
import org.springframework.data.annotation.PersistenceConstructor;
|
||||
import org.springframework.data.annotation.PersistenceCreator;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
@Getter
|
||||
@ToString
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE, onConstructor = @__(@PersistenceConstructor))
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE, onConstructor = @__(@PersistenceCreator))
|
||||
public class Customer implements AggregateRoot<Customer, CustomerId> {
|
||||
|
||||
private final CustomerId id;
|
||||
|
||||
Reference in New Issue
Block a user