-
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 ecosystem id + getters in permission port
- Loading branch information
1 parent
2c4fd98
commit 1548a62
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/main/java/onlydust/com/marketplace/kernel/model/EcosystemId.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,23 @@ | ||
package onlydust.com.marketplace.kernel.model; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.NoArgsConstructor; | ||
import lombok.NonNull; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
import java.util.UUID; | ||
|
||
@NoArgsConstructor(staticName = "random") | ||
@EqualsAndHashCode(callSuper = true) | ||
@SuperBuilder | ||
public class EcosystemId extends UuidWrapper { | ||
public static EcosystemId of(@NonNull final UUID uuid) { | ||
return EcosystemId.builder().uuid(uuid).build(); | ||
} | ||
|
||
@JsonCreator | ||
public static EcosystemId of(@NonNull final String uuid) { | ||
return EcosystemId.of(UUID.fromString(uuid)); | ||
} | ||
} |
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