org.hibernate.persister.spi
Interface PersisterFactory

All Superinterfaces:
Serializable, Service
All Known Implementing Classes:
PersisterFactoryImpl

public interface PersisterFactory
extends Service

Contract for creating persister instances (both EntityPersister and CollectionPersister varieties).


Method Summary
 CollectionPersister createCollectionPersister(Configuration cfg, Collection model, CollectionRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory)
          Create a collection persister instance.
 CollectionPersister createCollectionPersister(MetadataImplementor metadata, PluralAttributeBinding model, CollectionRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory)
          Create a collection persister instance.
 EntityPersister createEntityPersister(EntityBinding model, EntityRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory, Mapping cfg)
          Create an entity persister instance.
 EntityPersister createEntityPersister(PersistentClass model, EntityRegionAccessStrategy cacheAccessStrategy, NaturalIdRegionAccessStrategy naturalIdAccessStrategy, SessionFactoryImplementor factory, Mapping cfg)
          Create an entity persister instance.
 

Method Detail

createEntityPersister

EntityPersister createEntityPersister(PersistentClass model,
                                      EntityRegionAccessStrategy cacheAccessStrategy,
                                      NaturalIdRegionAccessStrategy naturalIdAccessStrategy,
                                      SessionFactoryImplementor factory,
                                      Mapping cfg)
                                      throws HibernateException
Create an entity persister instance.

Parameters:
model - The O/R mapping metamodel definition for the entity
cacheAccessStrategy - The caching strategy for this entity
factory - The session factory
cfg - The overall mapping
Returns:
An appropriate entity persister instance.
Throws:
HibernateException - Indicates a problem building the persister.

createEntityPersister

EntityPersister createEntityPersister(EntityBinding model,
                                      EntityRegionAccessStrategy cacheAccessStrategy,
                                      SessionFactoryImplementor factory,
                                      Mapping cfg)
                                      throws HibernateException
Create an entity persister instance.

Parameters:
model - The O/R mapping metamodel definition for the entity
cacheAccessStrategy - The caching strategy for this entity
factory - The session factory
cfg - The overall mapping
Returns:
An appropriate entity persister instance.
Throws:
HibernateException - Indicates a problem building the persister.

createCollectionPersister

CollectionPersister createCollectionPersister(Configuration cfg,
                                              Collection model,
                                              CollectionRegionAccessStrategy cacheAccessStrategy,
                                              SessionFactoryImplementor factory)
                                              throws HibernateException
Create a collection persister instance.

Parameters:
cfg - The configuration
model - The O/R mapping metamodel definition for the collection
cacheAccessStrategy - The caching strategy for this collection
factory - The session factory
Returns:
An appropriate collection persister instance.
Throws:
HibernateException - Indicates a problem building the persister.

createCollectionPersister

CollectionPersister createCollectionPersister(MetadataImplementor metadata,
                                              PluralAttributeBinding model,
                                              CollectionRegionAccessStrategy cacheAccessStrategy,
                                              SessionFactoryImplementor factory)
                                              throws HibernateException
Create a collection persister instance.

Parameters:
metadata - The metadata
model - The O/R mapping metamodel definition for the collection
cacheAccessStrategy - The caching strategy for this collection
factory - The session factory
Returns:
An appropriate collection persister instance.
Throws:
HibernateException - Indicates a problem building the persister.


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.