public class EntityManagerFactoryImpl extends Object implements EntityManagerFactory
EntityManagerFactory.| Constructor and Description |
|---|
EntityManagerFactoryImpl(String name,
PersistenceParser parser) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNamedQuery(String name,
JpqlQuery jpqlQuery)
Adds the named query to the entity manager factory.
|
void |
addNamedQuery(String name,
Query query)
Adds the query to the named queries.
|
protected void |
assertOpen()
Checks if the entity manager factory is open.
|
void |
close() |
EntityManagerImpl |
createEntityManager() |
EntityManager |
createEntityManager(Map<String,Object> map) |
CacheImpl |
getCache() |
ClassLoader |
getClassloader()
Returns the classloader of the entity manager factory.
|
CriteriaBuilderImpl |
getCriteriaBuilder() |
JpqlQuery |
getJpqlQuery(String qlString)
Returns a lazy created
JpqlQuery for the query. |
MetamodelImpl |
getMetamodel() |
JpqlQuery |
getNamedQuery(String name)
Returns the named query with the name
name. |
PersistenceUnitUtil |
getPersistenceUnitUtil() |
Class<?>[] |
getPersistValidators()
Returns the set of persist validators.
|
Map<String,Object> |
getProperties() |
Object |
getProperty(String key)
Returns the persistence property.
|
Class<?>[] |
getRemoveValidators()
Returns the set of remove validators.
|
Class<?>[] |
getUpdateValidators()
Returns the set of update validators.
|
javax.validation.ValidatorFactory |
getValidationFactory()
Returns the validation factory.
|
boolean |
hasValidators()
Returns if the persistence unit has validators
|
boolean |
isOpen() |
<T> T |
unwrap(Class<T> cls) |
public EntityManagerFactoryImpl(String name, PersistenceParser parser)
name - the name of the entity manager factoryparser - the persistence parserpublic void addNamedQuery(String name, JpqlQuery jpqlQuery)
name - the name of the queryjpqlQuery - the compiled querypublic void addNamedQuery(String name, Query query)
name - the name fo the queryquery - the queryprotected void assertOpen()
public void close()
close in interface EntityManagerFactorypublic EntityManagerImpl createEntityManager()
createEntityManager in interface EntityManagerFactorypublic EntityManager createEntityManager(Map<String,Object> map)
createEntityManager in interface EntityManagerFactorypublic CacheImpl getCache()
getCache in interface EntityManagerFactorypublic ClassLoader getClassloader()
public CriteriaBuilderImpl getCriteriaBuilder()
getCriteriaBuilder in interface EntityManagerFactorypublic JpqlQuery getJpqlQuery(String qlString)
JpqlQuery for the query.qlString - the JPQL query stringpublic MetamodelImpl getMetamodel()
getMetamodel in interface EntityManagerFactorypublic JpqlQuery getNamedQuery(String name)
name.name - the name of the querypublic PersistenceUnitUtil getPersistenceUnitUtil()
getPersistenceUnitUtil in interface EntityManagerFactorypublic Class<?>[] getPersistValidators()
public Map<String,Object> getProperties()
getProperties in interface EntityManagerFactorypublic Object getProperty(String key)
key - the key for the propertypublic Class<?>[] getRemoveValidators()
public Class<?>[] getUpdateValidators()
public javax.validation.ValidatorFactory getValidationFactory()
public boolean hasValidators()
public boolean isOpen()
isOpen in interface EntityManagerFactorypublic <T> T unwrap(Class<T> cls)
unwrap in interface EntityManagerFactoryCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.