Author: steve.ebersole(a)jboss.com
Date: 2009-12-15 12:28:51 -0500 (Tue, 15 Dec 2009)
New Revision: 18229
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerImplementor.java
Log:
HHH-4697 - Add means to get HibernateEntityManagerFactory from
HibernateEntityManagerImplementor
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java 2009-12-15
17:23:00 UTC (rev 18228)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/AbstractEntityManagerImpl.java 2009-12-15
17:28:51 UTC (rev 18229)
@@ -449,6 +449,13 @@
/**
* {@inheritDoc}
*/
+ public HibernateEntityManagerFactory getFactory() {
+ return entityManagerFactory;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public CriteriaBuilder getCriteriaBuilder() {
return getEntityManagerFactory().getCriteriaBuilder();
}
Modified:
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerImplementor.java
===================================================================
---
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerImplementor.java 2009-12-15
17:23:00 UTC (rev 18228)
+++
core/trunk/entitymanager/src/main/java/org/hibernate/ejb/HibernateEntityManagerImplementor.java 2009-12-15
17:28:51 UTC (rev 18229)
@@ -37,6 +37,13 @@
*/
public interface HibernateEntityManagerImplementor extends HibernateEntityManager {
/**
+ * Get access to the Hibernate extended EMF contract.
+ *
+ * @return The Hibernate EMF contract for this EM.
+ */
+ public HibernateEntityManagerFactory getFactory();
+
+ /**
* Provides access to whether a transaction is currently in progress.
*
* @return True if a transaction is considered currently in progress; false otherwise.
Show replies by date