-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9a3e7e
commit ff32db0
Showing
158 changed files
with
2,517 additions
and
3,314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
...egates/src/main/java/org/fuin/cqrs4j/example/aggregates/DuplicatePersonNameException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
...avasecdi/cmd/domain/PersonRepository.java → ...ggregates/EventStorePersonRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 2 additions & 54 deletions
56
aggregates/src/main/java/org/fuin/cqrs4j/example/aggregates/PersonRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,11 @@ | ||
/** | ||
* Copyright (C) 2015 Michael Schnell. All rights reserved. http://www.fuin.org/ | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License along with this library. If not, see | ||
* http://www.gnu.org/licenses/. | ||
*/ | ||
package org.fuin.cqrs4j.example.aggregates; | ||
|
||
import jakarta.validation.constraints.NotNull; | ||
|
||
import org.fuin.cqrs4j.example.shared.PersonId; | ||
import org.fuin.ddd4j.ddd.EntityType; | ||
import org.fuin.ddd4j.esrepo.EventStoreRepository; | ||
import org.fuin.esc.api.EventStore; | ||
import org.fuin.objects4j.common.NotThreadSafe; | ||
import org.fuin.ddd4j.ddd.Repository; | ||
|
||
/** | ||
* Event sourced repository for storing a {@link Person} aggregate. | ||
*/ | ||
@NotThreadSafe | ||
public class PersonRepository extends EventStoreRepository<PersonId, Person> { | ||
|
||
/** | ||
* Constructor all mandatory data. | ||
* | ||
* @param eventStore | ||
* Event store. | ||
*/ | ||
public PersonRepository(final EventStore eventStore) { | ||
super(eventStore); | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public Class<Person> getAggregateClass() { | ||
return Person.class; | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public EntityType getAggregateType() { | ||
return PersonId.TYPE; | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public Person create() { | ||
return new Person(); | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public String getIdParamName() { | ||
return "personId"; | ||
} | ||
public interface PersonRepository extends Repository<PersonId, Person> { | ||
|
||
} |
12 changes: 0 additions & 12 deletions
12
aggregates/src/main/java/org/fuin/cqrs4j/example/aggregates/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"event-id": "5601097d-6e2e-4df1-a7b2-ecc4f443c068", | ||
"event-timestamp": "2024-01-07T10:00:00.000+01:00[Europe/Berlin]", | ||
"entity-id-path": "PERSON 954177c4-aeb7-4d1e-b6d7-3e02fe9432cb", | ||
"name": "Harry Osborn" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"event-id": "4bf5bb56-4fe8-47a3-8358-25144e15497d", | ||
"event-timestamp": "2024-01-07T09:00:00.000+01:00[Europe/Berlin]", | ||
"entity-id-path": "PERSON 568df38c-fdc3-4f60-81aa-d3cce9ebfd7b", | ||
"name": "Mary Jane Watson" | ||
} |
Oops, something went wrong.