CCM NG: JavaDoc for findById method from last commit.
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5255 8810af33-2d31-482b-a856-94f89814c4df
Former-commit-id: 737f176b23
pull/2/head
parent
a2fcbbaa59
commit
b9518f962b
|
|
@ -177,6 +177,19 @@ public abstract class AbstractEntityRepository<K, E> implements Serializable {
|
||||||
hints));
|
hints));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finds an entity by its ID and does fetch joins for the provided
|
||||||
|
* attributes. Be careful with this method. Do not a too many attributes to
|
||||||
|
* the fetch joins, only does which you really need. Otherwise there can be
|
||||||
|
* a serious performance impact.
|
||||||
|
*
|
||||||
|
* @param entityId The ID of the entity to retrieve.
|
||||||
|
* @param fetchJoins The names of the attributes to join using fetch joins.
|
||||||
|
*
|
||||||
|
* @return An {@link Optional} containing the entity identified by the
|
||||||
|
* provided {@code entityId} or an empty {@link Optional} if there
|
||||||
|
* is no such entity.
|
||||||
|
*/
|
||||||
@Transactional(Transactional.TxType.REQUIRED)
|
@Transactional(Transactional.TxType.REQUIRED)
|
||||||
public Optional<E> findById(final K entityId,
|
public Optional<E> findById(final K entityId,
|
||||||
final String... fetchJoins) {
|
final String... fetchJoins) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue