Class InjectingPersisterFactory

java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.AbstractInjectingFactory<org.hibernate.persister.internal.PersisterFactoryImpl>
ch.tocco.nice2.persist.core.impl.hibernate.InjectingPersisterFactory
All Implemented Interfaces:
Serializable, org.hibernate.persister.spi.PersisterFactory, org.hibernate.service.Service, org.hibernate.service.spi.ServiceRegistryAwareService

public class InjectingPersisterFactory extends AbstractInjectingFactory<org.hibernate.persister.internal.PersisterFactoryImpl> implements org.hibernate.persister.spi.PersisterFactory, org.hibernate.service.spi.ServiceRegistryAwareService
A PersisterFactory which delegates object creation to PersisterFactoryImpl and then injects services into the persisters if a suitable setter is found. The available services for injection are passed in the constructor.
See Also:
  • Constructor Details

    • InjectingPersisterFactory

      public InjectingPersisterFactory(Map<Class<?>,Object> services)
  • Method Details

    • createEntityPersister

      public org.hibernate.persister.entity.EntityPersister createEntityPersister(org.hibernate.mapping.PersistentClass persistentClass, org.hibernate.cache.spi.access.EntityDataAccess entityDataAccess, org.hibernate.cache.spi.access.NaturalIdDataAccess naturalIdDataAccess, org.hibernate.metamodel.spi.RuntimeModelCreationContext creationContext) throws org.hibernate.HibernateException
      Specified by:
      createEntityPersister in interface org.hibernate.persister.spi.PersisterFactory
      Throws:
      org.hibernate.HibernateException
    • createCollectionPersister

      public org.hibernate.persister.collection.CollectionPersister createCollectionPersister(org.hibernate.mapping.Collection collection, org.hibernate.cache.spi.access.CollectionDataAccess collectionDataAccess, org.hibernate.metamodel.spi.RuntimeModelCreationContext creationContext) throws org.hibernate.HibernateException
      Specified by:
      createCollectionPersister in interface org.hibernate.persister.spi.PersisterFactory
      Throws:
      org.hibernate.HibernateException