java - How to use Spring Data Repositories as Vaadin JPAContainer -
is possible use org.springframework.data.jpa.repository.jparepository
repositories jpacontainer
vaadin?
we setting new vaadin 7 project scratch spring 3.2.
the spring integration done spring vaadin integration addon.
as far can entityprovider jparepository or somewhere else can use jpacontainer this:
entitymanager entitymanager = getentitymanager(campaign.class)); mutablelocalentityprovider<campaign.class)> provider; provider = new cachingmutablelocalentityprovider<campaign.class)>(campaign.class), entitymanager); provider.settransactionshandledbyprovider(false); jpacontainer<campaign> container = new jpacontainer<campaign>(campaign.class); container.setentityprovider(entityproviderutil.get().getentityprovider(campaign.class));
or jsut simple
entitymanager entitymanager = getentitymanager(campaign.class)); jpacontainer<campaign> container = jpacontainerfactory.make(campaign.class, entitymanager)
well, should read following post , decide if did not want use jparepository model layer , wrap beanitemcontainer, cuz jpacontainer looks has performance issues point of view.
Comments
Post a Comment