google-nomulus/config
Ben McIlwain 4ed23f6813 Add a jpaTm().query(...) convenience method (#1023)
* 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(...).
2021-03-19 16:34:37 -04:00
..
checkstyle Upgradle JUnit to 4.13 (#442) 2020-01-14 10:54:09 -05:00
dependency-license Update more dependencies to newer versions (#999) 2021-03-10 11:22:07 -05:00
nom_build.py Fix flyway invocation in Gradle script (#993) 2021-03-08 13:59:28 -05:00
nom_build_test.py Generate ER diagrams in :nom:generate_golden_file (#867) 2020-11-10 10:03:28 -05:00
presubmits.py Add a jpaTm().query(...) convenience method (#1023) 2021-03-19 16:34:37 -04:00
show_upgrade_diffs.py Added "show_upgrade_diffs" script (#981) 2021-03-09 07:48:06 -05:00