use of com.robo4j.db.sql.jpa.PersistenceDescriptorFactory in project robo4j by Robo4J.
the class PersistenceContextBuilder method build.
public PersistenceContextBuilder build() {
PersistenceDescriptorFactory persistenceDescriptorFactory = new PersistenceDescriptorFactory();
PersistenceUnitInfo persistenceUnitInfo = persistenceDescriptorFactory.get(RoboClassLoader.getInstance().getClassLoader(), sourceType, packages);
PersistenceUnitDescriptor persistenceUnitDescriptor = new PersistenceUnitInfoDescriptor(persistenceUnitInfo);
EntityManagerFactoryBuilder builder = new EntityManagerFactoryBuilderImpl(persistenceUnitDescriptor, new HashMap<>());
registeredClasses = persistenceDescriptorFactory.registeredClasses();
dataSourceContext = new DataSourceProxy(builder.build());
return this;
}
Aggregations