List of usage examples for javax.persistence PersistenceUnitUtil isLoaded
public boolean isLoaded(Object entity);
From source file:br.ufba.dcc.mestrado.computacao.repository.impl.ProjectRepositoryImpl.java
@Override public OpenHubProjectEntity findById(Long id) { OpenHubProjectEntity result = getEntityManager().find(getEntityClass(), id); PersistenceUnitUtil unitUtil = getEntityManager().getEntityManagerFactory().getPersistenceUnitUtil(); if (unitUtil.isLoaded(result)) { initializeProject(result);// w w w .j av a 2s .c o m } return result; /* return result;*/ }