Skip to content

Commit

Permalink
added Link.getEntity() method
Browse files Browse the repository at this point in the history
  • Loading branch information
hohwille committed Feb 11, 2024
1 parent cae3c28 commit 575d0d7
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,19 @@ protected void doSet(Link<E> newValue) {
super.doSet(newValue);
}

/**
* @return the linked {@link EntityBean entity}.
* @see Link#getTarget()
*/
public E getEntity() {

Link<E> link = get();
if (link == null) {
return null;
}
return link.getTarget();
}

/**
* @return the {@link Id#getEntityClass() entity class}.
*/
Expand Down

0 comments on commit 575d0d7

Please sign in to comment.