Changed methods using flush in GenericJpaDao