本文整理了Java中javax.persistence.EntityManager.getProperties()
方法的一些代码示例,展示了EntityManager.getProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EntityManager.getProperties()
方法的具体详情如下:
包路径:javax.persistence.EntityManager
类名称:EntityManager
方法名:getProperties
[英]Get the properties and hints and associated values that are in effect for the entity manager. Changing the contents of the map does not change the configuration in effect.
[中]获取对实体管理器有效的属性、提示和关联值。更改映射的内容不会更改有效的配置。
代码示例来源:origin: rapidoid/rapidoid
@Override
public Map<String, Object> getProperties() {
return em.getProperties();
}
代码示例来源:origin: rapidoid/rapidoid
@Override
public Map<String, Object> getProperties() {
return em().getProperties();
}
代码示例来源:origin: BroadleafCommerce/BroadleafCommerce
public static boolean isTransactionalEntityManager(EntityManager em) {
EntityManager target = EntityManagerFactoryUtils.doGetTransactionalEntityManager(
em.getEntityManagerFactory(), em.getProperties(), true);
return target != null;
}
代码示例来源:origin: Impetus/Kundera
@Test
public void testPopulateClientProperties()
{
Map props = new HashMap();
props.put("core.test.property", "core-test-property-value");
PersistenceDelegator pd = ((EntityManagerImpl) em).getPersistenceDelegator();
pd.populateClientProperties(props);
Map map = em.getProperties();
Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
CoreTestClient client = (CoreTestClient) clients.get("kunderatest");
Assert.assertEquals("core-test-property-value", client.getCoreTestProperty());
}
代码示例来源:origin: kumuluz/kumuluzee
@Override
public Map<String, Object> getProperties() {
return em.getProperties();
}
代码示例来源:origin: org.apache.tomee/openejb-core
@Override
public Map<String, Object> getProperties() {
return delegate.getProperties();
}
代码示例来源:origin: com.kumuluz.ee/kumuluzee-jpa-common
@Override
public Map<String, Object> getProperties() {
return em.getProperties();
}
代码示例来源:origin: org.evolvis.bsi/kolab-ws
@Override
public Map<String, Object>
getProperties()
{
return delegate.getProperties();
}
代码示例来源:origin: org.apache.aries.jpa/org.apache.aries.jpa.blueprint
/**
* @param em
* @return
*/
private boolean isResourceLocalInternal(EntityManager em) {
PersistenceUnitTransactionType transactionType = (PersistenceUnitTransactionType)em.getProperties()
.get(PersistenceUnitTransactionType.class.getName());
return transactionType == PersistenceUnitTransactionType.RESOURCE_LOCAL;
}
}
代码示例来源:origin: kumuluz/kumuluzee
@Override
public Map<String, Object> getProperties() {
return getEntityManager().getProperties();
}
代码示例来源:origin: org.apache.deltaspike.modules/deltaspike-data-module-impl
@Override
public Map<String, Object> getProperties()
{
return entityManager().getProperties();
}
代码示例来源:origin: org.apache.geronimo.modules/geronimo-persistence-jpa20
@Override
public Map<String, Object> getProperties() {
EntityManager entityManager = getEntityManager(false);
if (entityManager != null) {
return entityManager.getProperties();
} else {
entityManager = createEntityManager();
try {
return entityManager.getProperties();
} finally {
entityManager.close();
}
}
}
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-core
public Map<String, Object> getProperties() {
EntityManager entityManager = getEntityManager();
try {
return entityManager.getProperties();
} finally {
closeIfNoTx(entityManager);
}
}
/* (non-Javadoc)
代码示例来源:origin: org.apache.openejb/openejb-core
public Map<String, Object> getProperties() {
final EntityManager entityManager = getEntityManager();
try {
final Timer timer = Op.getProperties.start(this);
try {
return entityManager.getProperties();
} finally {
timer.stop();
}
} finally {
closeIfNoTx(entityManager);
}
}
代码示例来源:origin: com.querydsl/querydsl-jpa
@Test
public void eclipseLink() {
factory = Persistence.createEntityManagerFactory("h2-eclipselink");
em = factory.createEntityManager();
System.out.println(em.getDelegate().getClass());
System.out.println(em.getProperties());
assertEquals(EclipseLinkTemplates.DEFAULT, JPAProvider.getTemplates(em));
}
代码示例来源:origin: com.mysema.querydsl/querydsl-jpa
@Test
public void EclipseLink() {
factory = Persistence.createEntityManagerFactory("h2-eclipselink");
em = factory.createEntityManager();
System.out.println(em.getDelegate().getClass());
System.out.println(em.getProperties());
assertEquals(EclipseLinkTemplates.DEFAULT, JPAProvider.getTemplates(em));
}
代码示例来源:origin: com.querydsl/querydsl-jpa
@Test
@Ignore // temporarily ignored, since Batoo hangs on EntityManager creation
public void batoo() {
factory = Persistence.createEntityManagerFactory("h2-batoo");
em = factory.createEntityManager();
System.out.println(em.getDelegate().getClass());
System.out.println(em.getProperties());
assertEquals(BatooTemplates.DEFAULT, JPAProvider.getTemplates(em));
}
代码示例来源:origin: com.mysema.querydsl/querydsl-jpa
@Test
@Ignore // doesn't work on JDK 7
public void OpenJPA() {
factory = Persistence.createEntityManagerFactory("derby-openjpa");
em = factory.createEntityManager();
System.out.println(em.getDelegate().getClass());
System.out.println(em.getProperties());
assertEquals(OpenJPATemplates.DEFAULT, JPAProvider.getTemplates(em));
}
代码示例来源:origin: com.mysema.querydsl/querydsl-jpa
@Test
@Ignore // temporarily ignored, since Batoo hangs on EntityManager creation
public void Batoo() {
factory = Persistence.createEntityManagerFactory("h2-batoo");
em = factory.createEntityManager();
System.out.println(em.getDelegate().getClass());
System.out.println(em.getProperties());
assertEquals(BatooTemplates.DEFAULT, JPAProvider.getTemplates(em));
}
代码示例来源:origin: com.querydsl/querydsl-jpa
@Test
@Ignore // doesn't work on JDK 7
public void openJPA() {
factory = Persistence.createEntityManagerFactory("derby-openjpa");
em = factory.createEntityManager();
System.out.println(em.getDelegate().getClass());
System.out.println(em.getProperties());
assertEquals(OpenJPATemplates.DEFAULT, JPAProvider.getTemplates(em));
}
内容来源于网络,如有侵权,请联系作者删除!