Requires an EntityManagerFactory or EntityManager to be set,
providing a JpaTemplate based on it to subclasses. Can alternatively
be initialized directly via a JpaTemplate, to reuse the latter's
settings such as the EntityManagerFactory, JpaDialect, flush mode, etc.

This class will create its own JpaTemplate if an EntityManagerFactory
or EntityManager reference is passed in. A custom JpaTemplate instance
can be used through overriding createJpaTemplate.