org.hibernate.persister.internal
Class PersisterFactoryImpl

java.lang.Object
  extended by org.hibernate.persister.internal.PersisterFactoryImpl
All Implemented Interfaces:
Serializable, PersisterFactory, Service, ServiceRegistryAwareService

public final class PersisterFactoryImpl
extends Object
implements PersisterFactory, ServiceRegistryAwareService

The standard Hibernate PersisterFactory implementation

See Also:
Serialized Form

Field Summary
static Class[] ENTITY_PERSISTER_CONSTRUCTOR_ARGS
          The constructor signature for EntityPersister implementations
static Class[] ENTITY_PERSISTER_CONSTRUCTOR_ARGS_NEW
          The constructor signature for EntityPersister implementations using an EntityBinding.
 
Constructor Summary
PersisterFactoryImpl()
           
 
Method Summary
 CollectionPersister createCollectionPersister(Configuration cfg, Collection collectionMetadata, CollectionRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory)
          Create a collection persister instance.
 CollectionPersister createCollectionPersister(MetadataImplementor metadata, PluralAttributeBinding collectionMetadata, CollectionRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory)
          Create a collection persister instance.
 EntityPersister createEntityPersister(EntityBinding metadata, EntityRegionAccessStrategy cacheAccessStrategy, SessionFactoryImplementor factory, Mapping cfg)
          Create an entity persister instance.
 EntityPersister createEntityPersister(PersistentClass metadata, EntityRegionAccessStrategy cacheAccessStrategy, NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy, SessionFactoryImplementor factory, Mapping cfg)
          Create an entity persister instance.
 void injectServices(ServiceRegistryImplementor serviceRegistry)
          Callback to inject the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTITY_PERSISTER_CONSTRUCTOR_ARGS

public static final Class[] ENTITY_PERSISTER_CONSTRUCTOR_ARGS
The constructor signature for EntityPersister implementations


ENTITY_PERSISTER_CONSTRUCTOR_ARGS_NEW

public static final Class[] ENTITY_PERSISTER_CONSTRUCTOR_ARGS_NEW
The constructor signature for EntityPersister implementations using an EntityBinding.

Constructor Detail

PersisterFactoryImpl

public PersisterFactoryImpl()
Method Detail

injectServices

public void injectServices(ServiceRegistryImplementor serviceRegistry)
Description copied from interface: ServiceRegistryAwareService
Callback to inject the registry.

Specified by:
injectServices in interface ServiceRegistryAwareService
Parameters:
serviceRegistry - The registry

createEntityPersister

public EntityPersister createEntityPersister(PersistentClass metadata,
                                             EntityRegionAccessStrategy cacheAccessStrategy,
                                             NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy,
                                             SessionFactoryImplementor factory,
                                             Mapping cfg)
Description copied from interface: PersisterFactory
Create an entity persister instance.

Specified by:
createEntityPersister in interface PersisterFactory
Parameters:
metadata - 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.

createEntityPersister

public EntityPersister createEntityPersister(EntityBinding metadata,
                                             EntityRegionAccessStrategy cacheAccessStrategy,
                                             SessionFactoryImplementor factory,
                                             Mapping cfg)
Description copied from interface: PersisterFactory
Create an entity persister instance.

Specified by:
createEntityPersister in interface PersisterFactory
Parameters:
metadata - 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.

createCollectionPersister

public CollectionPersister createCollectionPersister(Configuration cfg,
                                                     Collection collectionMetadata,
                                                     CollectionRegionAccessStrategy cacheAccessStrategy,
                                                     SessionFactoryImplementor factory)
                                              throws HibernateException
Description copied from interface: PersisterFactory
Create a collection persister instance.

Specified by:
createCollectionPersister in interface PersisterFactory
Parameters:
cfg - The configuration
collectionMetadata - 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

public CollectionPersister createCollectionPersister(MetadataImplementor metadata,
                                                     PluralAttributeBinding collectionMetadata,
                                                     CollectionRegionAccessStrategy cacheAccessStrategy,
                                                     SessionFactoryImplementor factory)
                                              throws HibernateException
Description copied from interface: PersisterFactory
Create a collection persister instance.

Specified by:
createCollectionPersister in interface PersisterFactory
Parameters:
metadata - The metadata
collectionMetadata - 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-2013 Red Hat, Inc. All Rights Reserved.