-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add typealias guides into README (#35)
- Loading branch information
1 parent
05e2552
commit fd5bc30
Showing
7 changed files
with
100 additions
and
3 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
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
32 changes: 32 additions & 0 deletions
32
...ava/com/navercorp/eventeria/guide/boot/domain/SerializeOnlyTypeAliasPostCreatedEvent.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,32 @@ | ||
package com.navercorp.eventeria.guide.boot.domain; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
import com.navercorp.eventeria.messaging.contract.event.AbstractDomainEvent; | ||
|
||
@Getter | ||
@ToString(callSuper = true) | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class SerializeOnlyTypeAliasPostCreatedEvent extends AbstractDomainEvent { | ||
|
||
private long postId; | ||
private String writerId; | ||
|
||
public SerializeOnlyTypeAliasPostCreatedEvent(long postId, String writerId) { | ||
super(String.valueOf(postId)); | ||
this.postId = postId; | ||
this.writerId = writerId; | ||
} | ||
|
||
public static SerializeOnlyTypeAliasPostCreatedEvent from(Post post) { | ||
return new SerializeOnlyTypeAliasPostCreatedEvent(post.id(), post.writerId()); | ||
} | ||
|
||
@Override | ||
public String getSourceType() { | ||
return Post.class.getName(); | ||
} | ||
} |
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