public static UI getCurrentUI() {
return MyVaadinUI.getCurrent();
}
public static <T> JPAContainer<T> make(Class<T> entityClass){
JPAContainer container = JPAContainerFactory.
make(entityClass,
MyVaadinUI.CONTEXT.getBean(EntityManagerFactory.class).createEntityManager());
container.setAutoCommit(true);
return container;
}