-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-806 - Add archive support for JPA.
Co-authored-by: Oliver Drotbohm <[email protected]>
- Loading branch information
1 parent
900e074
commit a93690f
Showing
4 changed files
with
300 additions
and
165 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...pa/src/main/java/org/springframework/modulith/events/jpa/ArchivedJpaEventPublication.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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.springframework.modulith.events.jpa; | ||
|
||
import jakarta.persistence.Entity; | ||
import jakarta.persistence.Table; | ||
|
||
import java.time.Instant; | ||
import java.util.UUID; | ||
|
||
/** | ||
* JPA entity to represent archived event publications. | ||
* | ||
* @author Oliver Drotbohm | ||
*/ | ||
@Entity | ||
@Table(name = "EVENT_PUBLICATION_ARCHIVE") | ||
class ArchivedJpaEventPublication extends JpaEventPublication { | ||
|
||
/** | ||
* Creates a new {@link ArchivedJpaEventPublication} for the given publication date, listener id, serialized event and | ||
* event type. | ||
* | ||
* @param id | ||
* @param publicationDate must not be {@literal null}. | ||
* @param listenerId must not be {@literal null} or empty. | ||
* @param serializedEvent must not be {@literal null} or empty. | ||
* @param eventType must not be {@literal null}. | ||
*/ | ||
public ArchivedJpaEventPublication(UUID id, Instant publicationDate, String listenerId, String serializedEvent, | ||
Class<?> eventType) { | ||
super(id, publicationDate, listenerId, serializedEvent, eventType); | ||
} | ||
|
||
public ArchivedJpaEventPublication() {} | ||
} |
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
Oops, something went wrong.