diff --git a/core/src/main/java/io/github/mmm/entity/id/Id.java b/core/src/main/java/io/github/mmm/entity/id/Id.java index bd3b173..c48d852 100644 --- a/core/src/main/java/io/github/mmm/entity/id/Id.java +++ b/core/src/main/java/io/github/mmm/entity/id/Id.java @@ -3,6 +3,7 @@ package io.github.mmm.entity.id; import java.time.Instant; +import java.util.function.Supplier; import io.github.mmm.entity.Entity; @@ -45,7 +46,7 @@ * @see AbstractId * @since 1.0.0 */ -public interface Id { +public interface Id extends Supplier { /** Marshalling property name of the {@link #getPk() primary-key}. */ String PROPERTY_PK = "pk"; @@ -76,6 +77,12 @@ public interface Id { */ Object getPk(); + @Override + default Object get() { + + return getPk(); + } + /** * @return the {@link #getPk() primary key} as {@link String} for marshalling. */