当前位置: 首页>>代码示例>>Java>>正文


Java PersistenceUnitPostProcessor类代码示例

本文整理汇总了Java中org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor的典型用法代码示例。如果您正苦于以下问题:Java PersistenceUnitPostProcessor类的具体用法?Java PersistenceUnitPostProcessor怎么用?Java PersistenceUnitPostProcessor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PersistenceUnitPostProcessor类属于org.springframework.orm.jpa.persistenceunit包,在下文中一共展示了PersistenceUnitPostProcessor类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: KradEntityManagerFactoryBean

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
/**
   * Creates a default KRAD-managed factory bean.
   */
  public KradEntityManagerFactoryBean() throws Exception {
      this.persistenceUnitPostProcessors = new ArrayList<PersistenceUnitPostProcessor>();
      this.managedClassNames = new ArrayList<String>();
this.converterPackageNames = new ArrayList<String>();
converterPackageNames.add(DEFAULT_CONVERTERS_PACKAGE); // set as default
      this.persistenceUnitManager = createPersistenceUnitManager();
      this.internalFactoryBean = createInternalFactoryBean(this.persistenceUnitManager);
      this.internalFactoryBean.setJpaPropertyMap(createDefaultJpaProperties());

      final Object jpaVendorAdapterClass = getJpaPropertyMap().get(JPA_VENDOR_ADAPTER_CLASS);
      if (jpaVendorAdapterClass != null) {
          setJpaVendorAdapter((JpaVendorAdapter) Class.forName((String) jpaVendorAdapterClass).newInstance());
      }
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:KradEntityManagerFactoryBean.java

示例2: KradEntityManagerFactoryBean

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
/**
   * Creates a default KRAD-managed factory bean.
   */
  public KradEntityManagerFactoryBean() {
      this.persistenceUnitPostProcessors = new ArrayList<PersistenceUnitPostProcessor>();
      this.managedClassNames = new ArrayList<String>();
this.converterPackageNames = new ArrayList<String>();
converterPackageNames.add(DEFAULT_CONVERTERS_PACKAGE); // set as default
      this.persistenceUnitManager = createPersistenceUnitManager();
      this.internalFactoryBean = createInternalFactoryBean(this.persistenceUnitManager);
      this.internalFactoryBean.setJpaPropertyMap(createDefaultJpaProperties());
  }
 
开发者ID:kuali,项目名称:rice,代码行数:13,代码来源:KradEntityManagerFactoryBean.java

示例3: assemblePersistenceUnitPostProcessors

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
/**
 * Assembles the {@link PersistenceUnitPostProcessor}s into an array.
 *
 * @return an array of the {@link PersistenceUnitPostProcessor}s.
 */
protected PersistenceUnitPostProcessor[] assemblePersistenceUnitPostProcessors() {
    this.persistenceUnitPostProcessors = new ArrayList<PersistenceUnitPostProcessor>(this.persistenceUnitPostProcessors);
    this.persistenceUnitPostProcessors.add(new InternalPersistenceUnitPostProcessor());
    return this.persistenceUnitPostProcessors.toArray(new PersistenceUnitPostProcessor[this.persistenceUnitPostProcessors.size()]);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:KradEntityManagerFactoryBean.java

示例4: getPersistenceUnitPostProcessors

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
public PersistenceUnitPostProcessor[] getPersistenceUnitPostProcessors() {
    return postProcessors;
}
 
开发者ID:apache,项目名称:syncope,代码行数:4,代码来源:CommonEntityManagerFactoryConf.java

示例5: setPersistenceUnitPostProcessors

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
public void setPersistenceUnitPostProcessors(final PersistenceUnitPostProcessor... postProcessors) {
    this.postProcessors = postProcessors;
}
 
开发者ID:apache,项目名称:syncope,代码行数:4,代码来源:CommonEntityManagerFactoryConf.java

示例6: setPersistenceUnitPostProcessors

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
/**
 * Set the PersistenceUnitPostProcessors to be applied to the
 * PersistenceUnitInfo used for creating this EntityManagerFactory.
 * <p>Such post-processors can, for example, register further entity
 * classes and jar files, in addition to the metadata read from
 * {@code persistence.xml}.
 * <p><b>NOTE: Only applied if no external PersistenceUnitManager specified.</b>
 * @see #setPersistenceUnitManager
 */
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) {
	this.internalPersistenceUnitManager.setPersistenceUnitPostProcessors(postProcessors);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:LocalContainerEntityManagerFactoryBean.java

示例7: getPersistenceUnitPostProcessors

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
/**
 * Returns an array of the {@link PersistenceUnitPostProcessor} instances which have been configured on this
 * factory bean.
 *
 * @return array of post processors, may be empty but will never return null
 */
public PersistenceUnitPostProcessor[] getPersistenceUnitPostProcessors() {
    return persistenceUnitPostProcessors.toArray(new PersistenceUnitPostProcessor[persistenceUnitPostProcessors.size()]);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:KradEntityManagerFactoryBean.java

示例8: setPersistenceUnitPostProcessors

import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; //导入依赖的package包/类
/**
 * Set the PersistenceUnitPostProcessors to be applied to the * PersistenceUnitInfo used for creating this
 * EntityManagerFactory.
 *
 * <p>
 * Note that if executed before {@link #afterPropertiesSet()} then this factory bean may introduce its own post
 * processor instances. If invoked after, then this method will override internally configured post processors.
 * </p>
 *
 * <p>
 * Such post-processors can, for example, register further entity classes and jar files, in addition to the metadata
 * read from {@code persistence.xml}.
 * </p>
 *
 * @param postProcessors one or more post processors to set
 */
public void setPersistenceUnitPostProcessors(PersistenceUnitPostProcessor... postProcessors) {
    // persistence unit post processors will get applied to the internal factory bean during afterPropertiesSet(),
    // this allows us to add our own internal post processor to the list)
    this.persistenceUnitPostProcessors = new ArrayList<PersistenceUnitPostProcessor>(Arrays.asList(postProcessors));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:KradEntityManagerFactoryBean.java


注:本文中的org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。