public class EntityManagerFactoryImpl extends Object implements javax.persistence.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,
javax.persistence.Query query)
Adds the query to the named queries.
|
protected void |
assertOpen()
Checks if the entity manager factory is open.
|
void |
close() |
EntityManagerImpl |
createEntityManager() |
javax.persistence.EntityManager |
createEntityManager(Map<String,Object> map) |
CacheImpl |
getCache() |
ClassLoader |
getClassloader()
Returns the classloader of the entity manager factory.
|
CriteriaBuilderImpl |
getCriteriaBuilder() |
protected DataSource |
getDatasource()
Returns the datasource of the entity manager factory.
|
protected JdbcAdaptor |
getJdbcAdaptor()
Returns the JDBC Adaptor of the entity manager factory.
|
JpqlQuery |
getJpqlQuery(String qlString)
Returns a lazy created
JpqlQuery for the query. |
int |
getMaxFetchJoinDepth()
Returns the global max fetch join depth.
|
MetamodelImpl |
getMetamodel() |
JpqlQuery |
getNamedQuery(String name)
Returns the named query with the name
name. |
javax.persistence.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> clazz) |
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, javax.persistence.Query query)
name - the name fo the queryquery - the queryprotected void assertOpen()
public void close()
close in interface javax.persistence.EntityManagerFactorypublic EntityManagerImpl createEntityManager()
createEntityManager in interface javax.persistence.EntityManagerFactorypublic javax.persistence.EntityManager createEntityManager(Map<String,Object> map)
createEntityManager in interface javax.persistence.EntityManagerFactorypublic CacheImpl getCache()
getCache in interface javax.persistence.EntityManagerFactorypublic ClassLoader getClassloader()
public CriteriaBuilderImpl getCriteriaBuilder()
getCriteriaBuilder in interface javax.persistence.EntityManagerFactoryprotected DataSource getDatasource()
protected JdbcAdaptor getJdbcAdaptor()
public JpqlQuery getJpqlQuery(String qlString)
JpqlQuery for the query.qlString - the JPQL query stringpublic int getMaxFetchJoinDepth()
public MetamodelImpl getMetamodel()
getMetamodel in interface javax.persistence.EntityManagerFactorypublic JpqlQuery getNamedQuery(String name)
name.name - the name of the querypublic javax.persistence.PersistenceUnitUtil getPersistenceUnitUtil()
getPersistenceUnitUtil in interface javax.persistence.EntityManagerFactorypublic Class<?>[] getPersistValidators()
public Map<String,Object> getProperties()
getProperties in interface javax.persistence.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 javax.persistence.EntityManagerFactorypublic <T> T unwrap(Class<T> clazz)
unwrap in interface javax.persistence.EntityManagerFactoryCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.