package pl.ppl.common.infrastructure.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;

import java.io.Serializable;

@NoRepositoryBean
public interface FetchableJpaRepository<T, ID extends Serializable> extends JpaRepository<T, ID> {

    T fetchById(ID id);
}

@@ -167,16 +167,66 @@
 yBean;%0A%0A
+import javax.persistence.EntityNotFoundException;%0A
 import j
@@ -365,16 +365,461 @@
  ID%3E %7B%0A%0A
+    /**%0A     * Retrieves an entity by its id or thorws EntityNotFoundException if such entity does not exists.%0A     *%0A     * Please bare in mind that Spring Framework automatically translates EntityNotFoundException into JpaObjectRetrievalFailureException.%0A     *%0A     * @param id must not be %7B@literal null%7D.%0A     * @return the entity with the given id%0A     * @throws EntityNotFoundException if entity with the given id does not exists%0A     */%0A
     T fe

add javadocs