mirror of
https://github.com/google/nomulus.git
synced 2025-04-29 19:47:51 +02:00
* Add a jpaTm().query(...) convenience method This replaces the more ungainly jpaTm().getEntityManager().createQuery(...). Note that this is in JpaTransactionManager, not the parent TransactionManager, because this is not an operation that Datastore can support. Once we finish migrating away from Datastore this won't matter anyway because JpaTransactionManager will be merged into TransactionManager and then deleted. In the process of writing this PR I discovered several other methods available on the EntityManager that may merit their own convenience methods if we start using them enough. The more commonly used ones will be addressed in subsequent PRs. They are: jpaTm().getEntityManager().getMetamodel().entity(...).getName() jpaTm().getEntityManager().getCriteriaBuilder().createQuery(...) jpaTm().getEntityManager().createNativeQuery(...) jpaTm().getEntityManager().find(...) This PR also addresses some existing callsites that were calling getEntityManager() rather than using extant convenience methods, such as jpa().insert(...). |
||
---|---|---|
.. | ||
checkstyle | ||
dependency-license | ||
nom_build.py | ||
nom_build_test.py | ||
presubmits.py | ||
show_upgrade_diffs.py |