public class DefaultEntityManagerHandler extends Object implements EntityManagerHandler
Constructor and Description |
---|
DefaultEntityManagerHandler(JpaSettingsFactory jpaSettingsFactory,
JpaSettingsStorage jpaSettingsStorage) |
Modifier and Type | Method and Description |
---|---|
void |
closeEntityManager() |
void |
closeEntityManager(String persistenceUnitName) |
<R> R |
withEntityManager(EntityManagerCallback<R> callback) |
<R> R |
withEntityManager(String persistenceUnitName,
EntityManagerCallback<R> callback) |
@Inject public DefaultEntityManagerHandler(@Nonnull JpaSettingsFactory jpaSettingsFactory, @Nonnull JpaSettingsStorage jpaSettingsStorage)
@Nullable public <R> R withEntityManager(@Nonnull EntityManagerCallback<R> callback)
withEntityManager
in interface EntityManagerHandler
@Nullable public <R> R withEntityManager(@Nonnull String persistenceUnitName, @Nonnull EntityManagerCallback<R> callback)
withEntityManager
in interface EntityManagerHandler
public void closeEntityManager()
closeEntityManager
in interface EntityManagerHandler
public void closeEntityManager(@Nonnull String persistenceUnitName)
closeEntityManager
in interface EntityManagerHandler