diff --git a/bean/src/main/java/io/github/mmm/entity/property/link/LinkProperty.java b/bean/src/main/java/io/github/mmm/entity/property/link/LinkProperty.java index 874bd72..e0a9898 100644 --- a/bean/src/main/java/io/github/mmm/entity/property/link/LinkProperty.java +++ b/bean/src/main/java/io/github/mmm/entity/property/link/LinkProperty.java @@ -120,6 +120,19 @@ protected void doSet(Link newValue) { super.doSet(newValue); } + /** + * @return the linked {@link EntityBean entity}. + * @see Link#getTarget() + */ + public E getEntity() { + + Link link = get(); + if (link == null) { + return null; + } + return link.getTarget(); + } + /** * @return the {@link Id#getEntityClass() entity class}. */