All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.cfg.JPAConfiguration Maven / Gradle / Ivy

There is a newer version: 5.6.15.Final
Show newest version
package org.hibernate.cfg;

import java.util.Properties;

import javax.persistence.EntityManagerFactory;

import org.hibernate.boot.Metadata;
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;

public class JPAConfiguration extends Configuration {
	
	private Properties properties = new Properties();
	private Metadata metadata = null;
	
	public JPAConfiguration(EntityManagerFactoryBuilderImpl entityManagerFactoryBuilder) {
		EntityManagerFactory entityManagerFactory = 
				entityManagerFactoryBuilder.build();
		metadata = entityManagerFactoryBuilder.getMetadata();
		properties.putAll(entityManagerFactory.getProperties());
	}
	
	public Metadata getMetadata() {
		return metadata;
	}
	
	public Properties getProperties() {
		return properties;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy