Java 类org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor 实例源码

项目:kc-rice    文件:KradEntityManagerFactoryBean.java   
/**
   * 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());
      }
  }
项目:rice    文件:KradEntityManagerFactoryBean.java   
/**
   * 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());
  }
项目:kc-rice    文件:KradEntityManagerFactoryBean.java   
/**
 * 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()]);
}
项目:syncope    文件:CommonEntityManagerFactoryConf.java   
public PersistenceUnitPostProcessor[] getPersistenceUnitPostProcessors() {
    return postProcessors;
}
项目:syncope    文件:CommonEntityManagerFactoryConf.java   
public void setPersistenceUnitPostProcessors(final PersistenceUnitPostProcessor... postProcessors) {
    this.postProcessors = postProcessors;
}
项目:rice    文件:KradEntityManagerFactoryBean.java   
/**
 * 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()]);
}
项目:lams    文件:LocalContainerEntityManagerFactoryBean.java   
/**
 * 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);
}
项目:spring4-understanding    文件:LocalContainerEntityManagerFactoryBean.java   
/**
 * 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);
}
项目:kc-rice    文件:KradEntityManagerFactoryBean.java   
/**
 * 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()]);
}
项目:kc-rice    文件:KradEntityManagerFactoryBean.java   
/**
 * 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));
}
项目:class-guard    文件:LocalContainerEntityManagerFactoryBean.java   
/**
 * 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);
}
项目:rice    文件:KradEntityManagerFactoryBean.java   
/**
 * 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()]);
}
项目:rice    文件:KradEntityManagerFactoryBean.java   
/**
 * 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));
}